Server 2013

Bookmarks
AddFileBookmark
AddLinkedPDFBookmark
AddPageBookmark
AddURLBookmark
Color
ConvertCMYKToRGB
UCRandBGInfo
Convert to PDF
ConvertImageToPDF
ConvertPCLToPDF
ConvertPSToPDF
ConvertXPSToPDF
Debug
Debug
TestPrintToPDF
Digital Certificates
InvisiblySignFile
Email
AddEMail
AddEMailAttachment
AddToBcc
AddToCC
ClearEmailAttachments
ClearEMails
EMailAttachOutput
EMailReadReceipt
EMailSubject
RemoveEMail
SetEMailBody
SetRecipientInfo
SetReplyToInfo
SetSenderInfo
SetSMTPCredentials
SetSMTPInfo
FTP
AddFTPAttachment
AddFTPRequest
ClearFTPAttachments
ClearFTPs
FTPAttachOutput
RemoveFTP
SetFTPCredentials
File Output
NewDocumentName
NewUniqueID
OutputDirectory
Fonts
EmbedAllFonts
EmbedBase14Fonts
SubsetFonts
Image Quality
ColorImageDownsampleThreshold
ColorImageDownsampleType
ColorImageFilter
ColorImageResolution
GrayImageDownsampleThreshold
GrayImageDownsampleType
GrayImageFilter
GrayImageResolution
MonoImageDownsampleThreshold
MonoImageDownsampleType
MonoImageFilter
MonoImageResolution
Metadata
SetMetadata
Other Output Options
ASCIIEncode
PreserveHalftone
PreserveOverprint
PreserveTransferFunction
PDF Quality
Resolution
PDF Specification
CompatibilityLevel
Format
PS Commands
AddPDFMark
ClearPDFMarks
Page Control
AutoRotate
Print to PDF
BeginPrintToPDF
EndPrintToPDF
Security (PDF)
SetPDFSecurity
SetPDFSecurity128
SetPDFSecurityAES
Stamping
AddStampCollection
AddStampImage
AddStampText
ClearStampCollections
RemoveStampCollection
SetStampColor
SetStampStrokeColor
StampBackground
StampColorNET
StampFillMode
StampFont
StampFontSize
StampFontTransparency
StampRotation
StampStrokeColorNET
Timeout
Timeout
TimeoutSpan
View
SetViewMode
Web View
LinearizePDF

Adding PDF Marks with Server

# Copyright (c) 2019 ActivePDF, Inc.
# ActivePDF Server 2013
# Example generated 11/20/19 

require 'win32ole'

# Get current path
strPath = File.expand_path(File.dirname(__FILE__)) + "\\"

# Instantiate Object
oSVR = WIN32OLE.new("APServer.Object")

# Add PDF marks to be used in the converted PDF
# PDF Mark Reference:
# http://www.adobe.com/content/dam/Adobe/en/devnet/acrobat/pdfs/pdfmark_reference.pdf

# Notes (Page 20 - PDF Marks Reference)
oSVR.AddPDFMark('[ /SrcPg 1 /Rect [32 32 216 144] /Open false /Title (activePDF Comment) /Contents (Note Type Comment Example.) /Color [1 0 0] /Subtype /Text /ANN pdfmark')

# Free Text (Page 17 - PDF Marks Reference)
# Used for the text in the link created below
oSVR.AddPDFMark('[ /SrcPg 1 /Rect [262 26 350 46] /Contents (activePDF.com) /DA ([0 0 1] rg /Helv 12 Tf) /BS << /W 0 >> /Q 1 /Subtype /FreeText /ANN pdfmark')

# Links (Page  - PDF Marks Reference)
# Add a link around the activePDF.com text created above
oSVR.AddPDFMark('[ /SrcPg 1 /Rect [262 26 350 46] /Contents (activePDF.com) /BS << /W 0 >> /Action << /Subtype /URI /URI (http://activePDF.com) >> /Subtype /Link /ANN pdfmark')

# Bookmarks (Page 26 - PDF Marks Reference)
oSVR.AddPDFMark('[ /Count -5 /Title (Lorem ipsum) /Page 1 /F 2 /OUT pdfmark')
oSVR.AddPDFMark('[ /Page 1 /View [/Fit] /Title (Page 1) /C [0 0 0] /F 2 /OUT pdfmark')
oSVR.AddPDFMark('[ /Page 2 /View [/Fit] /Title (Page 2) /C [0 0 0] /F 2 /OUT pdfmark')
oSVR.AddPDFMark('[ /Page 3 /View [/Fit] /Title (Page 3) /C [0 0 0] /F 2 /OUT pdfmark')
oSVR.AddPDFMark('[ /Page 4 /View [/Fit] /Title (Page 4) /C [0 0 0] /F 2 /OUT pdfmark')
oSVR.AddPDFMark('[ /Page 5 /View [/Fit] /Title (Page 5) /C [0 0 0] /F 2 /OUT pdfmark')

# Document Information (Page 28 - PDF Marks Reference)
oSVR.AddPDFMark('[ /Title (PDF Marks) /Author (activePDF Server) /Subject (PDF Marks) /Keywords (pdfmark, server, example) /DOCINFO pdfmark')

# Document View Options (Page 29 - PDF Marks Reference)
oSVR.AddPDFMark('[ /PageMode /UseOutlines /Page 1 /View [/Fit] /DOCVIEW pdfmark')

# Document Open Options
oSVR.AddPDFMark('[ {Catalog} << /ViewerPreferences << /HideToolbar true  /HideMenubar true >> >> /PUT pdfmark')

# Convert the PostScript file into PDF
results = oSVR.ConvertPSToPDF(strPath + 'PS.ps', strPath + 'PDFMark.pdf')
if results.ServerStatus != 0
  puts "Error with ConvertPSToPDF:"
  puts "#{results.ServerStatus}"
  puts results.Details
  exit 1
end

# Clear the marks so that the next conversion does not have them
oSVR.ClearPDFMarks()

# Release Object
oSVR = ''

# Process Complete
puts "Done!"

Copyright © 2019 ActivePDF, Inc