BBjForm::preview
Description
In BBj 12.0 and higher, this method adds the maximize, style, zoom, password, and secure parameters.
In BBj 7.0, this method previews the document in a SysGui window.
In BBj 4.0 and higher, this method previews the document.
Syntax
Variable |
Description |
---|---|
void |
preview() |
void |
preview(BBjPrintPreviewpreviewControl) |
void |
preview(boolean maximize, string style, BBjNumber zoom, string editPassword, string openPassword) |
void |
preview(boolean maximize, string style, BBjNumber zoom, boolean secure) |
void |
preview(boolean maximize, string style, BBjNumber zoom, boolean secure) |
Parameters
Variable |
Description |
---|---|
previewControl |
Specifies the preview control in a SysGui window. |
maximize |
Initially maximize the preview. |
style |
Sets the page display style, one of HEIGHT, WIDTH, or TWO. |
zoom |
Sets initial zoom percent. |
editpassword |
Sets admin password for saved PDF. |
openpassword |
Sets password to allow opening the PDF. |
secure |
Create a secure PDF. |
Return Value
None.
Remarks
In BBj 10.0 and higher, these methods apply to PDF forms.
Example 1
|
Example 2 - Window
|
Example 3 - Password
|
Example 4 - Secure
Note: Saved PDF documents are by default secure. To turn off the default security, use the option provided in this example below:
declare BBjPrinter printer! declare BBjForm form! declare BBjFormPage page! declare BBjFormImage image! REM Obtain an instance of a default BBjPrinter object printer!=BBjAPI().getBBjPrinter(1) REM Get BBjForm for the selected printer form!=printer!.getForm(0) REM Get a page page!=form!.createPage() REM Create an image element for the page logo$="https://www.basis.cloud/images/basislogo.jpg" image!=page!.newImage(logo$,0,0,150,53) REM Add the element to the page page!.add(image!) REM Preview the form form!.preview(false,"HEIGHT", 1.0, false) release |
Example - Purchase Requisition
See Also
BBj Object Creation and Assignment
BBjPrintPreviewBuilder::secure
See the BBj Object Diagram for an illustration of the relationship between BBj Objects.