# Class SwPDFSettings

Used for setting various PDF options.

To create a new SwPDFSettings object, use New.

This class is used to define options for PDF conversion process.

**AlternateForm**

String. Read/write. Name of the alternate form that will be used for PDF conversion instead of the form documents has been created with.

**AlternateFormsCol**

Variant. Read/write. Multi-value string list of alternate forms that will be used with document collections.

Each element in this list should contain actual form name and alias form name, separated with "|" character (e.g. "FormName|AliasFormName"). If document from collection is created with a form that is contained in this property, corresponding alias form will be used instead. If form is not contained within this property, AlternateForm property will then be used (if defined; otherwise, original form will be used to create PDF).

**AttachmentsExtractionFolder**

String. Extraction folder for attachments.

This property is used only when AttachmentsOption is set to SWPDF\_EXPORT\_TO\_HDD. Files are extracted to folder using following notation: \[AttachmentsExtractionFolder] + "\\" + \[DocumentUNID] + "-ATT\\" + \[AttachmentName].

**AttachmentsOption**

Integer. Read/write. This property will be used only when IncludeAttachments is set to True.

Possible values are:

`SWPDF_ATTACH_NATIVE (default),`

&#x20;      Attachments are stored in generated PDF document without any modifications.

`SWPDF_CONVERT_AND_ATTACH,`

&#x20;     Attachments are converted to PDF (ones which can be converted) and attached to generated PDF.

`SWPDF_CONVERT_AND_APPEND,`

&#x20;    Attachments are converted to PDF (ones which can be converted) and appended at the end of generated PDF as new pages.

`SWPDF_EXPORT_TO_HDD,`

&#x20;    Attachments are stored to user defined HDD or UNC path (property: **AttachmentsExtractionFolder**).\
&#x20;    Generated PDF document does NOT contain attachments.

`SWPDF_EXPORT_TO_HDD_AND_ATTACH`

&#x20;    Attachments are stored to user defined HDD or UNC path (property: **AttachmentsExtractionFolder**). \
&#x20;    Generated PDF document contains attachments.

**AttachmentIconOption**

Integer. Read/write.&#x20;

Possible values are:

&#x20;   `ATT_ICON_SHOW_ORIGINAL (default),`

&#x20;   `ATT_ICON_SHOW_NO_ATT,`

&#x20;   `ATT_ICON_DONT_SHOW,`

&#x20;   `ATT_ICON_SHOW_PDF`

**BookmarkSeparator**

Integer. Read/write.

Possible values are:

&#x20;   `BOOKMARK_SEP_HORIZONTAL_LINE (default),`

&#x20;   `BOOKMARK_SEP_NEW_PAGE`

**BookmarkTreeRoot**

Integer. Read/write. Adds root values to bookmark tree.

Possible values are:

&#x20;   `BOOKMARK_ROOT_NONE,`

&#x20;   `BOOKMARK_ROOT_DB_NAME,`

&#x20;   `BOOKMARK_ROOT_VIEW_NAME`

(It is possible to combine values (eg. BOOKMARK\_ROOT\_DB\_NAME + BOOKMARK\_ROOT\_VIEW\_NAME)

**ChangeZipExtension**

Boolean. Set property to True if .zip attachments extension should be renamed to custom set extension

**ConsoleLogging**

Boolean. Enables or disables console logging.\
&#x20;             If Swing PDF Converter is showing too much runtime information on Domino Server, this property forces it to display only critical messages.&#x20;

**ConvertAndAppendAttachmentsOnly**

Boolean. Creates PDF document that contains only PDF attachments converted and merged into single PDF document.\
&#x20;             Lotus Notes document content is IGNORED.

**ConvertProtectedEmails**

Boolean. If Lotus Notes email has prohibited printing, copying and forwarding this option disables conversion of such documents.&#x20;

**CustomCssFilePath**

String. Used to add custom css to HTML content.

**CustomMetadata**

Variant. Multi-value string list. Each element in this list should contain metadata element name and value, separated with "|" character (e.g. "Company|Swing Software").

**MetadataSidecarFormat**

Integer. Defines sidecar metadata XML file format. Currently three values available:

&#x20;    `METADATA_SIDECAR_FORMAT_TAG ->`&#x20;

&#x20;    `METADATA_SIDECAR_FORMAT_ATTRIBUTE ->`

&#x20;    `METADATA_SIDECAR_FORMAT_NESTED ->FormBilling`&#x20;

**CustomMetadataOnly**

Boolean. If set to true Notes document data will be ignored and only custom meta data will be added to pdf document.

**DocCollectionDestination**

Integer. Sets destination when exporting multiple documents.

Allowed values are:

&#x20;   COL\_PACKAGE (default) - single PDF package document.

&#x20;   COL\_BOOKMARKS - single PDF document with bookmarks tree.

**DocLinkLocation**

String. Used only when exporting documents to repository. Generated PDF file path, that will be used as a reference for all documents that contains links to the currently converted document. If document links are enabled, this property needs to be set for every single document that is being exported and should contain the full path to a disk location where generated PDF file is stored.

**DocLinksDir**

String.  Used only when exporting documents to repository. Root folder on disk, where all the PDF documents will be available at. This folder is used to evaluate relative paths to linked documents. For example: if DocLinksDir is set to "c:\PDFExport" and DocLinkLocation is set to "c:\PDFExport\Documents\doc1.pdf", relative path will be evaluated to "Documents/doc1.pdf". This relative path will then be used together with DocLinksBaseHref property, to open correct document link. Also, both "index.html" and "data.xml" will be available in this folder.&#x20;

**DocLinksIndexUrl**

String. Used only when exporting documents to repository. Location of "index.html" (or its code), that will be placed in every PDF file containing document links. This URL must be available at all times if you want doclinks functionality on the web server or repository (for example Sharepoint). If your PDF files are on local machine then Adobe JavaScript is used to open doclinks and this setting need to be empty.

**DocLinksBaseHref**

String. Used only when exporting documents to repository. Base location where generated PDF files will be stored, for example ""<http://mycms.com/>". It will be used by "index.html" to generate actual link to a PDF document another document is linking to.

**Enable128bitEncryption**

Boolean. Read/write. True, if encryption level needs to be set to 128-bit RC4 (Acrobat 5.x¸ 6.x); defaults to False, which is 40-bit RC4 (Acrobat 3.x¸ 4.x) encryption. This property takes effect only when either UserPassword or MasterPassword is set.

**EnableChanging**

Boolean. Read/write. If set to False, modifying PDF document content will be disabled; default is True. This property takes effect only when either UserPassword or MasterPassword is set.

**EnableComments**

Boolean. Read/write. If set to False, PDF document comments will be disabled; default is True. This property takes effect only when either UserPassword or MasterPassword is set.

**EnableCopying**

Boolean. Read/write. If set to False, PDF document copying will be disabled; default is True. This property takes effect only when either UserPassword or MasterPassword is set.

**EnableDocLinks**

Boolean. Read/write. Enables clickable doclinks when exporting separate PDF files

**EnableViewDocLinks**

Boolean. Read/write. Enables clickable doclinks in embedded views when exporting separate PDF files

**EnableInlineImages**

Boolean. Read/write. If set to True images will be displayed in PDF and not attached if image format is supported; default is False.

**EnableFontEmbedding**

Boolean. Default is False. In order to enable font embedding, SystemFontsDir parameter must also be set.

**EnableFormFields**

Boolean. Read/write. If set to False, PDF document form fields will be disabled; default is True. This property takes effect only when either UserPassword or MasterPassword is set.

**EnableHTTPStream**

Boolean. Read/write. If set to False, no external web resources, such as web images pointed in HTML will be downloaded and drawn. This is usefull if computer does not have access to Internet or network connection is slow or unreliable.

**EnableMetadata**

Boolean. Set property to True if metadata needs to be set in resulting PDF.

**EnablePrinting**

Boolean. Read/write. If set to False, PDF document printing will be disabled; default is True. This property takes effect only when either UserPassword or MasterPassword is set.

**HeaderFooterDocUNID**

String. Notes document UNID that contains custom header and/or footer. Header/footer should be defined using predefined rich text fields

HFShowOnFirst

Boolean. Set this property to True if you want to show Header/Footer on first page; default is True.

HTMLContainer

String. Read/write. Name of the field on document that will contain HTML, that needs to be converted to PDF.

Note that this field should be visible in read mode in order to get PDF with rendered HTML.

**HTTPPassword**

String. This propery is used for HTTP authentication if HTML content is converted from protected server.

**HTTPUseNotesProxy**

Boolean. If proxy host and port are not manually set, search for and set Lotus Notes proxy configuration.&#x20;

**HTTPUserName**

String. This propery is used for HTTP authentication if HTML content is converted from protected server.

**HTTPBaseHref**

String. Used to set baseHref path for HTML conversion (f.e. XPages conversion).

**HTTPTimeout**

Integer. Used to set HTTP connection timeout value in milliseconds.

**ImageCompression**

Integer. Read/write. Set this property to desired DPI to compress ovoersized images. Default is 0 (disabled).

**IncludeAttachments**

Boolean. Read/write. True, if Notes document attachments needs to be embedded to a resulting PDF file; otherwise False.

**MarginBottom**

Double. Read/write. Margin bottom in inches; defaults to 1in.

**MarginLeft**

Double. Read/write. Margin left in inches; defaults to 0in.

**MarginRight**

Double. Read/write. Margin right in inches; defaults to 0.5in.

**MarginTop**

Double. Read/write. Margin top in inches; defaults to 1in.

**MasterPassword**

String. Read/write. Password required to change PDF document.

**OOHomeDir**

String. Sets OpenOffice installation folder.

This property will be used only when Attachment Option ATT\_OPTION\_CONVERT\_AND\_APPEND or ATT\_OPTION\_CONVERT\_AND\_ATTACH is used.

**OOPort**&#x20;

Integer. Used for Open Office attachments conversion. Sets Open Office host port.

**PageHeight**

Double. Read/write. Page height in inches; defaults to 11in.

**PageWidth**

Double. Read/write. Page width in inches; defaults to 8.5in.

**PDFACompliance**

Integer. Sets PDF document A compliant.

Possible values are: PDFA\_NONE, PDFA\_1B, PDFA\_2B, PDFA\_3B&#x20;

**ProcessZipFiles**

Boolean. Set property to True if .zip attachments should be unzipped and attached/converted to pdf

**RenderPrintHide**

Boolean. Set property to True if paragraphs marked as "hide when printed" still needs to be rendered. Default is True.

**SystemFontsDir**

String. System folder where fonts are stored (e.g. c:\windows\fonts on Windows OS).

Timeout

Integer. Set this property to limit maximum conversion time (in seconds).\
Setting works only for single documents,not for collection of documents.

Minimum value is 5 seconds.\
Default value is 0 (timeout disabled).

**TranscodeImages**

Boolean.

Option should be enabled only if PDF reader application can not render PDF document images (images shown as black rectangles or "Error loading image" message).

Note that enabling image transcoding can decrease conversion performances.

**UseLowLevelRenderer**

Boolean. Set property to True if DXL rendering with Swing DXL renderer is used (is set to True, SWING PDF Converter will copy a swllrend.dll file to the Notes installation folder during conversion jobs).

**UserPassword**

String. Read/write. Password required to open PDF document.

**ZipExtension**

String. Sets custom zip archive extension. Used with ChangeZipExtension.

## Deprecated methods and properties

String. Read/write. Universal ID of the document containing PDF settings (must be created with ".PDFSettings" form).

If set, it automatically overrides all the other corresponding SwPDFSettings options.

**ConvertHiddenAttachments**

Boolean. Converts attachments that are stored in "$File" but not visible in Lotus Notes document.

(depricated since version 5.0)

**EnableInternationalSupport**

Boolean. Set this property to True, if additional international characters (Hindi) are used. Default is False.

(depricated since version 5.0)

**EnablePdfACompliance**

Boolean. Set property to True if resulting PDF file needs to be PDF/A compliant.

(depricated since version 5.0, use PDFACompliance instead)

**IncludeWebAttachments**

Boolean. Read/write. If set to True, PDF document will also contain "web attachments" (attachments that are not associated with any RTF); default is False.

(depricated since version 5.0)

**OLEObjectImageOption**

Integer.

Available values:

&#x20;   OLE\_OBJECT\_IMAGE\_OPTION\_DEFAULT        Image will be created in PDF, using built-in rendering engine.

&#x20;   OLE\_OBJECT\_IMAGE\_OPTION\_SAVE\_TO\_HDD

&#x20;       Image will not be rendered in PDF, but image file will be saved to a designated location on disk.

(depricated since version 5.0)

**OOHost**

String. Used for Open Office attachments conversion. Sets Open Office host IP address. Note that Open Office must be installed on the same machine where conversion is taking place.

(depricated since version 5.0)

**WinMetaImageOption**

Integer. Options for WinMeta/WinGDI images.

This is an obsolete vector image type and SWING PDF Converter's built-in rendering engine might not allways give satisfactory fidelity.

Available values:

&#x20;   WIN\_META\_OPTION\_NULL

&#x20;       Image will be omitted in output PDF document.

&#x20;   WIN\_META\_OPTION\_IMAGE

&#x20;Image will be created in PDF, using built-in rendering engine.

&#x20;   WIN\_META\_OPTION\_ATT\_TO\_PDF

&#x20;Image will not be rendered, but image attachment will be added to output PDF document.This option is not implemented.&#x20;

&#x20;   WIN\_META\_OPTION\_SAVE\_TO\_HDD

&#x20;       Image will not be rendered in PDF, but image file will be saved to a designated location on disk.

(deprecated since version 4)

**WinMetaExtractionFolder**

String. Extraction folder for WinMeta/WinGDI and OLE object images.&#x20;

Files are named using following notation: \[WinMetaExtractionFolder] + "\Image\_" + \[local time in ms] + ".wmf"
