PDF Converter for Notes
DocsSupport RequestWebsite
  • PDF Converter for Notes
  • Installation / uninstallation
    • Installing and activating
      • Installing PDF Converter toolbar icon
      • Installing PDF Converter toolbar icon for multiple users
      • Installing PDF Converter on server for automated archiving
      • Installing PDF Converter on Linux server
      • Offline license activation
      • PDF Converter sample on web
      • System Requirements
    • Uninstalling
      • Removing the PDF Converter toolbar icon
      • Removing the PDF Converter toolbar icon for multiple users
      • Removing PDF Converter completely from your system
    • Upgrading
      • Upgrade PDF Converter to a new release
      • Upgrade PDF Converter design elements in a custom application
    • Release History
  • Getting started
    • PDF Converter terminology
      • PDF package
      • PDF attachments
      • Separate PDF files
      • Flat vs. structured document export
      • Single PDF file with a bookmark view
      • Alternate Notes forms
      • Archiving jobs
    • Screencasts
    • Settings
      • General Settings
      • PDF Settings
      • Toolbar Icon Settings
    • Converting client-side
      • How to export emails to a PDF package
      • How to append emails to a PDF package
      • How to export emails to multiple PDFs
      • How to export mail folders to PDF
      • How to export view categories to PDF
      • How to export all emails to PDF
      • How to export parent-child documents
      • How to manage PDF document settings
      • How to export Notes metadata
      • How to export documents to PDF/A format
      • How to convert attachments to PDF
      • How to export attachments to disk
      • How to set PDF headers and footers
      • How to reduce PDF file size
      • How to use alternate forms
      • How to create a naming rule for the PDFs
      • Summary of export options
    • Converting server-side
      • How to export multiple databases to hard disk
      • How to schedule Notes email export to PDF
      • How to export a custom/programmatic document selection
      • How to export Notes metadata
      • How to classify PDF records using folders
      • How to run post-processing tasks on the PDF files
      • How to apply PDF settings to an archiving job
  • How to...
    • How to use the conversion dialog
    • How to set up a custom naming convention for PDF files
    • How to add header and footer to a PDF document
    • Using alternate forms
    • How to convert a document collection using multiple alternate forms
    • How to convert password protected HTML content
    • How to disable HTTP stream
    • How to enable international characters
    • How to enable/disable the low-level renderer
    • How to export documents ordered as in Lotus Notes view
    • How to find your Notes Installation and Notes Data directories
    • How to enable single category export using high level renderer [embedded views]
    • How to manually activate an API enabled database
    • How to reduce the PDF file size
    • How to search a PDF package
    • How to search PDF attachments
    • How to see your PDF Converter version number
    • How to send error-prone documents/emails to the Support
    • How to set custom PDF settings from LotusScript
    • How to use alternate forms in an archiving job
    • How to set PDF security
    • How to have working doclinks in PDF files
  • Tips / miscellaneous
    • About PDF metadata
    • Are Notes document links supported?
    • Types of output
    • Attachment options
    • Can I export OLE objects to PDF?
    • Deployment check-list
    • Disabling access for non-administrators
    • Do I need to have the latest JRE (Java Runtime Environment) installed on my Workstation/Server?
    • Exporting large sets of documents/emails using the toolbar icon
    • Extracting ZIP archive files
    • How to enable Microsoft Office conversion on Domino server
    • How to enable PDF search in Windows (64-bit)
    • How to get the SharePoint repository ID
    • Java files (jar) list
    • Merging attachments with PDF forms
    • PDF filename Unicode compliance tips
    • PDF/A format description
    • Product limitations
    • Single-Click Exports
    • There's no "Show Java Debug Console" option in my Lotus Notes client
    • What is the SWING PDF Converter installation footprint?
    • Where can I find my attachments?
    • Which view/folder types are supported
  • For developers
    • Enabling your applications
    • API Design elements description
    • LotusScript API reference
      • Class SwPDFDocument
        • Public Function AppendTo(DestFilePath As String)
        • Public Function GetAsRTItem() As NotesRichTextItem
        • Public Function GetAsRTItemEx(attachmentName As String) As NotesRichTextItem
        • Public Function GetFilePath()
        • Public Function GetMetadata() as String
        • Public Function IsCollection() As Boolean
        • Public Function Recycle()
        • Public Function SaveToFile(FilePath As String)
      • Class SwPDFCreator
        • Public Function GetError() As SwPDFError
        • Public Function GetVersion() As String
        • Public Function Init(LicenseKey As String) As Boolean
        • Public Function InitWithActivationResponse(ActivationResponse As String) As Boolean
        • Public Function LoadSettingsFromUNID(PDFSettingsUNID As String, UseGeneralSettings As Boolean) As Bo
        • Public Function ProcessDocCollection(dc As NotesDocumentCollection, DbView As String) As SwPDFDocume
        • Public Function ProcessDocCollectionFromFile(FilePath As String, DbServer As String, DbPath As Strin
        • Public Function ProcessDocument(doc As NotesDocument) As SwPDFDocument
        • Public Function ProcessFolders(dbSrc As NotesDatabase, FoldersList As Variant, IncludeResponses As B
        • Public Function ProcessRTItem(rtItemSource As NotesRichTextItem) As SwPDFDocument
        • Public Function ProcessUrl(url As String) As SwPDFDocument
        • Public Function ProcessViewCategories(view As NotesView, CatList As Variant, IncludeResponses As Boo
        • Public Function SetPdfProperties(Title As String, Subject As String, Author As String, Keywords As S
        • Public Function SetWatermarkFont(fontFamily As String, size As Integer, style As Integer, colorR As
        • Public Function SetWatermarkImage(filePath As String, position As Integer, margin As Double) - Learn
        • Public Function SetWatermarkText(wmText As String, rotation As Double, position As Integer, margin A
      • Class SwPDFSettings
        • Public Function SetHTTPProxy(proxyHost As String, proxyPort As Integer)
        • Public Function SetCustomMetadata(CustomMetadata As Variant, CustomMetadataOnly As Boolean) As Boole
      • Class SwPDFRegistration
        • Public Function GetVersion() As String
        • Public Function GetLicense() As SwPDFLicense
        • Public Function Register(LicenseKey As String) As Variant
      • Class SwPDFLicense
      • Class SwPDFProgress
        • Public Function GetCurrentIndex() As Integer
        • Public Function GetStatus() As Integer
      • Class SwPDFError
    • LotusScript code samples
      • Button on form
      • Button on view
      • Add metadata
      • Add custom header/footer to PDF document
      • PDF conversion on the Web
      • Convert large number of documents
      • Change document orientation
      • Convert single document from UI
      • Doclinks sample for repository
      • View to PDF package
  • Troubleshooting
    • Troubleshooting Guide
    • Error messages
      • Error - Type mismatch in method OP_CHECK_TOS_INST AINSTANCE found, Unknown expected
      • Error - Cannot write or create file (file or disk is read-only)
      • Error - DLL issue on 64-bit servers
      • Error - Domino HTTP Error Loading Java Virtual Machine
      • Error - Exception in thread "Launcher: SwCreatePDF" java.lang.NoClassDefFoundError: -SOME CLASS-
      • Error - ExceptionConverter: java.security.NoSuchAlgorithmException
      • Error - INITIALIZE ERROR: EXTRACTJAVARESOURCES (nn) : 91 - Object variable not set - INIT (nn) - Lea
      • Error - java.security.AccessControlException: Access denied ([SOME CLASS EXCEPTION]) - Learning Cent
      • Error - ReferenceError: openLInkPriv is not defined
      • Error - swllrend.dll corrupted or not extracted
      • Error - SWPDFSAVETODISK (29) : 53 - File not found
      • Error - There is another PDF conversion process already started
      • Error - Type mismatch (13)
    • General issues
      • Archiving jobs agent timeout
      • Concurrent execution issues
      • Conversion speed is slow
      • Document links not working
      • Email images do not appear in PDF
      • Header and footer not visible in my emails
      • Header and footer not visible or partially visible
      • How to enable SWING PDF Converter with Symantec Endpoint Protection (SEP)
      • Numerous "Trust to..." prompts appearing
      • PDF toolbar icon does not appear after installation
      • PDF toolbar icon not shown in IBM Notes 9 toolbar
      • PDF toolbar icon is still on my toolbar after uninstalling
      • Select categories / folders applet is failing to start
      • ZIP files can not be detached from PDF
      • PDF fonts not embedded for Asian/Arabic documents
      • Thai symbols not shown in PDF document
    • History log
      • Archiving job logs
      • Conversion and error logs
      • Notes crashes during conversion
  • Seascape for Notes
  • Support
    • Support Request
    • Premium Export Services
Powered by GitBook
On this page
  • 1. Exporting documents to disk
  • 2. Exporting documents to repository
  • Pairs of Document ID - relative URL in doclinks.xml
  • Code sample
  • SwPDFSettings class properties
  • Conversion-level properties
  • Document-level properties

Was this helpful?

  1. How to...

How to have working doclinks in PDF files

PreviousHow to set PDF securityNextTips / miscellaneous

Last updated 3 years ago

Was this helpful?

Notes documents can contain links (i.e. doclinks) to other Notes documents and preserving these links also in PDF is a challenging task. SWING PDF Converter converts Notes document links to special hyperlinks in the generated PDF files. Each such hyperlink will link to a corresponding PDF file (i.e. the rendering of the target Notes document that the original document link was referring to).

When considering the export of doclinks to PDF, there are two main usage scenarios:

1. Documents are exported to disk 2. Documents are exported to an online document repository (e.g. Microsoft SharePoint, IBM FileNet etc.)

1. Exporting documents to disk

When exporting documents to multiple PDF files using PDF Converter's toolbar icon, the conversion of document links will be enabled by default. In this case, PDF Converter will install an Adobe JavaScript file (swpdfc.js) on your machine and it will also create a doclinks.xml file in the destination folder you selected.

When a user clicks on the converted doclink in the PDF file, the installed JavaScript will read from the doclinks.xml file and if it finds a linked document in doclinks.xml, it will try to open the second PDF file using the location (i.e. the relative file path) which is read from the doclinks.xml file. This will work automatically on any machine where PDF Converter is installed. If you move your PDF files to a machine where PDF Converter is not installed, you will also need to copy the swpdfc.js file manually into the Javascript folder (inside the Adobe Reader installation folder).

Multiple Notes documents may also be exported to a Single PDF file with a Bookmarks view. In this case the document links will also remain functional within the scope of the PDF file (and only if both the source and the target Notes document have been exported to the PDF file).

Additional information is available in the following article:

2. Exporting documents to repository

Preserving the links between generated PDF files (when the files are uploaded into a document repository) is currently possible only by writing a custom code and using our API functions. Before you start writing your code, you will also need to know what the exact URL of each PDF file will be after they get uploaded to a document repository. This is done by specifying root URL in your repository, under which all documents will be available according to its relative paths. Based on this information, you can configure our API functions so that when the PDF files are created, the doclinks will be converted to proper hyperlinks which will link to the correct PDF files on the server.

Each time you run a conversion job using our API functions in this way, PDF Converter will also create (or update if file is already there) a doclinks.xml file which contains "pairing" data (that matches linked Notes document to its PDF representation).

When the generated PDF files have been uploaded to the document repository and the xml file is in place, the users can start using the PDF files and clicking on the provided hyperlinks. When a user clicks on a hyperlink, the hyperlink will open a web page in the user's default web browser. This web page contains a JavaScript code which redirects the user to the linked PDF document.

Most of the process to convert the document links and the XML file is performed automatically, however the administrator will still need to upload the "doclinks.xml" and the "doclinks.html" file to a specified URL (DocLinksIndexUrl), after conversion is finished. Both files will be available in the user defined folder on the disk (this is the same folder where Notes documents will be exported to as well).

Example of an indirect link which replaces a Notes doclink in the resulting PDF file:Structure: <DocLinksIndexHtml>&db=<DB_REPLICA_ID>&doc=<DOC_UNID>

Pairs of Document ID - relative URL in doclinks.xml

<?xml version="1.0" encoding="UTF-8"?>
<data>
    <element id="C1257B48003C4B53-224DF71697F4E942C125794300515040">
        <unid>224DF71697F4E942C125794300515040</unid>
        <dbid>C1257B48003C4B53</dbid>
        <location>SWING PDF Converter v5 - WORK/Samples/Wheel Trucks, ACME Inc..pdf</location>
    </element>
    <element id="C1257B48003C4B53-D3DF6E62619150C0C1257919004CC1DC">
        <unid>D3DF6E62619150C0C1257919004CC1DC</unid>
        <dbid>C1257B48003C4B53</dbid>
        <location>SWING PDF Converter v5 - WORK/Samples/TEST 3.pdf</location>
    </element>
    <element id="C1257B48003C4B53-934D5EB20B88DADFC12577F100491125">
        <unid>934D5EB20B88DADFC12577F100491125</unid>
        <dbid>C1257B48003C4B53</dbid>
        <location>SWING PDF Converter v5 - WORK/Samples/TEST - SWING Integrator - Office integration for Lotus Notes Domino.pdf</location>
    </element>
    <element id="C1257B48003C4B53-5C44B844BF75F633C1257919004BFFDC">
        <unid>5C44B844BF75F633C1257919004BFFDC</unid>
        <dbid>C1257B48003C4B53</dbid>
        <location>SWING PDF Converter v5 - WORK/Samples/SWING Integrator - Office integration for Lotus Notes Domino.pdf</location>
    </element>
</data>

Code sample

LotusScript code samples > Doclinks sample for repository

SwPDFSettings class properties

Conversion-level properties

DocLinksDir

String. 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.

DocLinksIndexUrl

String. 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. 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.

Document-level properties

DocLinkLocation

String. 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.

Are Notes document links supported?
Doclinks sample for repository