| **Navigation:**  [[templates.htm|Templates]] > [[templates by topic.htm|Templates by Topic]] > Advanced Report Generation > Report to PDF Support Extension >====== Report to PDF Procedure Support ====== | [[tplextensionglobalreporttopdf.htm|{{btn_prev_n.gif|Previous page}}]][[templates by topic.htm|{{btn_home_n.gif|Return to chapter overview}}]][[tplextensionglobalreporttotxt.htm|{{btn_next_n.gif|Next page}}]] | | || The Report to PDF Procedure template provides exact control as to when to use the output document format, global overrides of selected string settings, and report controls that need to be hidden or skipped when this output format is enabled. The following options are provided (and only available if the associated Global Extension is active): **Populate on Report** The Report to PDF Global Extension populates this template in //all// reports by default. Select //Never //if you do not want this report to be directed to a PDF document. Select //Always //if you want this output type available always for this report at runtime. Select //Conditional //if you need to make this output available based on a certain condition, specified in the next prompt. **Condition** This prompt is available if you have specified //Conditional// in the **Populate on Report** prompt above. A condition can be a simple variable or an expression. If the variable or expression evaluates to non-zero, the PDF document output capability will be active for this report at runtime. Press the "**E**" button to call the Expression Editor. This dialog is used to help you construct syntactically correct expressions to use in the **Condition** prompt. **General Tab Options** **Output Name Type** If you have directed that the report print to a PDF document file, specify a //Fixed//, //Variable// or //Runtime// name here. //Fixed// will use a default name. //Variable// can be used to designate a fixed name based on a variable condition at runtime, like a date, user name, order number, etc. //Runtime// allows the end user to specify a custom name and optional folder to direct the PDF document to. When a report is generated, PDF pages are generated based on the number of pages generated by the report. Bookmarks identifying jumps to each page can be designated below. **PDF Options** PDF Options include special features only targeted to PDF document types: **Document Title** Enter string text or variable (using the //!variable// format) to populate the Document Title PDF document tag. This information is usually seen in the title bar of the PDF Viewer. **Application Name** Enter string text or variable (using the //!variable// format) to populate the Application Name PDF document tag. This tag is usually used for other programs to access special information from the PDF through web pages, in this case, the application/PDF name tag. **Program Name** Enter string text or variable (using the //!variable// format) to populate the Program Name PDF document tag. This tag is usually seen used by other programs to access special information from the PDF through web pages, in this case, the programname/PDF name tag. **Subject** Enter string text or variable (using the //!variable// format) to populate the Subject PDF document tag. This tag is usually seen used by other programs to access special information from the PDF through web pages, in this case, the subject/PDF name tag. **Author** Enter string text or variable (using the //!variable// format) to populate the Author PDF document tag. This tag is usually seen used by other programs to access special information from the PDF through web pages, in this case, the author/PDF name tag. **Keywords** Enter string text or variable (using the //!variable// format) to populate the Keywords PDF document tag. This tag is usually seen used by other programs to access special information from the PDF through web pages, in this case, the keywords/PDF name tag. **Use Pages as Parent Bookmark** PDF documents provide bookmarks that are similar to a hyperlinked Table of Contents. Check this box to designate that bookmarks will be created for each report page generated. **         Use Scan Copy Mode** This option supports use of any image format and any font. The WMF pages are converted to PNG so the resulting PDF is an exact copy. ** System Requirements 1. If you use this option you must deploy **ClaRunExt.dll** (located in the BIN folder). 2. The systems where this is deployed must have the Microsoft VC++ (x86) 2005 runtime installed 3. The systems where this is deployed must have the Microsoft .Net Framework 2.0 runtime installed Both of these requirements can easily be installed using SetupBuilder, or with the **ClaRunExtSetup.exe** that can be found in the Clarion BIN folder. **Compress Text **and **Compress Images** When generating a report to PDF, you can compress text and line art, and compress all report images. Compression can significantly reduce the size of a PDF file with little or no loss of detail and precision. **Security** Press the Security button to access the following security and permissions options for this generated PDF document: **Encrypt Document** From the drop list select the appropriate option to //Never//, //Always//, or //Conditionally// encrypt this the generated PDF file. If //Conditional// is selected, enter a valid expression (variable or constant value) in the **Condition** entry. Likewise enter a valid variable or constant value in the **Password** entry(Example: //GLO:Password// or //'mypassword'//). If you are encrypting the document, a password is required. **Access Rights** A variety of user access rights are listed here on the //Security// dialog. As with encryption, check the **Use a variable to specify user access rights? **box, and specify a variable name or expression in the **Expression** entry. If the value in the Expression line is TRUE, the checked access rights will be granted to the user. **Controls Tab Options** The Controls tab displays a list box of every report control's Field equate label that is populated on the report structure. A Field equate label (FEQ) can represent text displayed on the generated report output, but can also identify report logic for Headers, Footers, Detail Bands, Form Bands, and Break structures. Select a control in the list box, and press the Properties button to modify a report's target FEQ. {{notebox.jpg|NoteBox.jpg}} The Report to PDF Procedure template supports nearly all report controls, with the exception of .WMF and .BMP files stored in IMAGE controls, and LIST controls. **Controls' PDF Properties** **HIDE (Omit printing)** If a report's FEQ targets a field used specifically for special documents generation (i.e., Hyperlinks, Bookmarks, etc.), check this box to hide (omit) this FEQ from the report's printed output. **SKIP (Omit processing)** A report's contents can be redirected to multiple types of output documents when using the new Advanced Report Generation templates. Check this box to designate that the selected FEQ will not be used for this type of generated document output (e.g., PDF). For example, you would want to skip a control used to generate a special XML tag when generating to PDF. **HIDE on PDF (Omit display on PDF)** Check this box to hide the selected control in the output PDF document. This should be used for controls that generate hidden PDF document information, and do not need to be displayed. **Add Field Action** A PDF document is one of the most common document formats used in the office and on the web today. One of the reasons for this is its document versatility. You can embed many types of special document features throughout the document output. Check this box to designate that the selected report FEQ will use one of these special field types. **Field Action** Select //Hyperlink//, //Command Line//, //Annotation//, or //Page Action// from the drop list. This setting will control the Field Action prompts that follow. **Hyperlink Field Action:** **Target Origin** This prompt is only active if you are not SKIPing the control. Select //Control Text// to allow the PDF generator to create a hyperlink for this control into the output document. For example, you may have a control in your data table that stores hyperlinks to customer's websites. As the control is generated to PDF, the column's text (i.e. 'http://www.softvelocity.com') will be hypertext. Select //HardCoded// from the drop list, and press the ellipsis button on the **Target** prompt to select a variable that holds PDF specific information that will be assigned to a report's FEQ that is static (always generated). By contrast, select //Dynamic //from// //the drop list, and press the ellipsis button on the **Target** prompt to select a variable that holds PDF specific information that will be assigned to a report's FEQ that is conditionally generated. A example of this could be a Detail band that is conditionally generated based on a table column's value. The target variable may hold special PDF tag information that displays additional color, text, formatting, etc. **Hyperlink Type** This prompt is used to seed the proper hyperlink syntax to the target origin. //HTTP //Adds "//HTTP://" //text in front of the selected **Target Origin**. //MAIL //Adds "mailto:" text in front of the selected **Target Origin**. //FTP //Adds "FTP://" text in front of the selected **Target Origin**. //NEWS //Adds "news:" text in front of the selected **Target Origin**. //Other// An additional prompt, **Other Type **appears with this choice. Enter anything into the **Other Type** prompt. This choice is used if you need to add any custom hyperlink that's not included above to your **Target Origin**. //Other Dynamic// An additional prompt, **Other Type, **appears with this choice. Press the ellipsis button to select a variable that will hold the custom hyperlink type information. This choice is used if you need to add any //dynamically changing// or //conditional// hyperlink that's not included above to your **Target Origin**. //None// ' Adds no additional text to the **Target Origin** **Hyperlink Boxed** Check this box if you would like this hyperlink to have a box drawn around it in the PDF document. **Box Color** This prompt is enabled if the **Hyperlink Boxed** check box is checked. The color that you select here is assigned to the box border generated. **Command Line Field Action prompts:** A PDF document can have hot links that can be used to execute an external program. **Command** Press the ellipsis button to select a valid executable program to run from this control specified in the PDF document output. As always, the program should be in a relative path to the PDF document location. **Parameters** Use this prompt and associated ellipsis button to construct an optional parameter list that can be used with the Command program selected above. **Hyperlink Boxed** Check this box if you would like this command line link to have a box drawn around it in the PDF document. **Box Color** This prompt is enabled if the **Hyperlink Boxed** check box is checked. The color that you select here is assigned to the box border generated. **Annotation Field Action prompts:** A PDF annotation is used to provide additional information in a specific area of the PDF document. You normally double-click on an annotation area and a popup window is displayed with additional information. **Annotation Text Origin** Select //Control Text// to allow the PDF generator to create an annotation mark for this control into the output document. Select //HardCoded// from the drop list, and press the ellipsis button on the **Target** prompt to select a variable that holds PDF specific information that will be assigned to a report's FEQ that is static (always generated). By contrast, select //Dynamic //from// //the drop list, and press the ellipsis button on the **Target** prompt to select a variable that holds PDF specific information that will be assigned to a report's FEQ that is conditionally generated. A example of this could be a Detail band that is conditionally generated based on a table column's value. The target variable may hold special PDF tag information that displays additional color, text, formatting, etc. **Page Action Field Action prompts:** Page Action in a PDF document allows a hot link to other pages in the PDF document. **Action** Select the target location of the page Action from the drop list. These options are self-explanatory. **Hyperlink Boxed** Check this box if you would like this Page Action link to have a box drawn around it in the PDF document. **Box Color** This prompt is enabled if the **Hyperlink Boxed** check box is checked. The color that you select here is assigned to the box border generated. **Add Bookmark** Check this box to allow a report's Field Equate Label's contents to be added to the PDF document's bookmarks **Bookmark Text Origin** Select //Control Text// to allow the PDF generator to create a bookmark based on the control's value into the output document. Select //HardCoded// from the drop list, and press the ellipsis button on the **Target** prompt to select a variable that holds PDF specific bookmark information that will be assigned to a report's FEQ that is static (always generated). By contrast, select //Dynamic //from// //the drop list, and press the ellipsis button on the **Target** prompt to select a variable that holds PDF specific bookmark information that will be assigned to a report's FEQ that is conditionally generated. A example of this could be a Detail band that is conditionally generated based on a table column's value. The target variable may hold special PDF tag information that displays additional color, text, formatting, etc. **Add Bookmark Parent** Check this box to designate that this bookmark will be attached to a parent bookmark that is named below. **Parent Bookmark** Select a parent bookmark that will include the selected control's bookmark in the generated PDF output. **Use PDF Font** Check this box to replace the current font used on the report for this control and replace it with a new name. Select a valid PDF font replacement from the drop list provided.