Add metadata
Add metadata from Lotus Notes document
Function MetadataSample(doc As NotesDocument) As String
Dim s As New NotesSession
Dim swPDF As New SwPDFCreator
Dim swPDFDoc As SwPDFDocument
Dim pdfErr As SwPDFError
' Initialize PDF creation process; license key is required
If swPDF.Init("") Then
' Transfer all the items from Notes document to PDF metadata
swPDF.PDFSettings.EnableMetadata = True
' Also, set built-in PDF properties
Call swPDF.SetPdfProperties(doc.Title(0), "", s.CommonUserName, "Sample document")
' Convert doc to PDF
Set swPDFDoc = swPDF.ProcessDocument(doc)
If Not swPDFDoc Is Nothing Then
MetadataSample = swPDFDoc.GetMetadata()
Else
' There was an error in PDF conversion
Set pdfErr = swPDF.GetError()
MsgBox pdfErr.Message, 0+16, "ERROR"
End If
Else
' There was an error in PDF initialization
Set pdfErr = swPDF.GetError()
MsgBox pdfErr.Message, 0+16, "ERROR"
End If
End Function
Add custom metadata + metadata from Lotus Notes document
Add custom metadata only
Last updated
Was this helpful?