Go to CutePDF.com
   About Us  |   Contacts  
   
   
Overview
Developer Kit
Sample Code System Requirements License and Price

Developer Kit (PDF Writer with programmatic access only)

Integrating custom PDF Writer with your application is quite easy. You can print to the PDF Printer driver just as you would any other printer. The registry keys below allow programmatic access to the display mode and filename.

Setting the display mode: 
HKEY_CURRENT_USER\Software\Custom PDF Printer\BypassSaveAs 
(0 = show Save as dialog box after spooling, 1 = do not show Save as dialog box.) 
 
Note: the values above are of type string (REG_SZ), not DWORD.
 
Setting the filename:
HKEY_CURRENT_USER\Software\Custom PDF Printer\OutputFile 
(Use the key above to set the output file for the PDF. A full pathname is required.
 Also, you can use format specifier "%{n}d" in OutputFile to put each output in a separate file; for
 instance abc%d.pdf -> abc1.pdf, abc2.pdf ...; abc%03d.pdf -> abc001.pdf, abc002.pdf ... )

Setting the start number for the format specifier:
HKEY_CURRENT_USER\Software\PDF Writer\StartAt
(This value is of type REG_DWORD.)

Extension Module can be used to add security and apply background

Use the registry keys below to add security to your generated PDF document programmatically.
 
Setting the security:

HKEY_CURRENT_USER\Software\Custom PDF Printer\AddSecurity
(1 = create encrypted PDF file, 0 = do not add security to PDF file.)
 
HKEY_CURRENT_USER\Software\Custom PDF Printer\Level
(1 = 128-bit encryption, 0 = 40-bit encryption.)

Setting the passwords:
HKEY_CURRENT_USER\Software\Custom PDF Printer\userPassword
(Use the key above to set Password required to open document.)

HKEY_CURRENT_USER\Software\Custom PDF Printer\masterPassword
(Use the key above to set Password required to change permissions and passwords.)

Setting the permissions:
HKEY_CURRENT_USER\Software\Custom PDF Printer\noPrinting
(1 = prevent users from printing the file.)

HKEY_CURRENT_USER\Software\Custom PDF Printer\noModifyContents
(1 = prevent users from creating form fields, as well as making any other changes.)

HKEY_CURRENT_USER\Software\Custom PDF Printer\noModifyAnnotations
(1 = prevent users from adding or changing Comments or Form Fields.)

HKEY_CURRENT_USER\Software\Custom PDF Printer\noCopy
(1 = prevent users from copying text and graphics.)
 
Note:
the values above are all of type string (REG_SZ), not DWORD. 
 
You can use any single or 2-page PDF file (letterhead, pre-printed form, watermark etc) as a background and then print other content on top of it to create an overlaid PDF document. For 2-page background file, the second page will be used for all document pages other than the first.
 
Use the registry keys below to apply a background.
 
Setting the background:

HKEY_CURRENT_USER\Software\Custom PDF Printer\AddBackground
(1 = add background, 0 = do not apply background.)
 
Setting the source filename:

HKEY_CURRENT_USER\Software\Custom PDF Printer\BackgroundFile
(Use the key above to set a file for background. A full pathname is required. )
 
Setting the first page only option:
HKEY_CURRENT_USER\Software\Custom PDF Printer\FirstPageOnly
(1 = print background on the first page of the document only. 0 = repeated.)
 
Note: the values above are all of type string (REG_SZ), not DWORD. 
 
Use the registry keys below to combining jobs into a single PDF file. 
Each time PDF Writer appends a job, it decrements the counter until 0. You can set the CombinePDFs value to the number of PDFs you want to merge.
 
HKEY_CURRENT_USER\Software\Custom PDF Printer\CombinePDFs
(0 = Existing files are overwritten, 1 (>1) = appended job at the end of existing file.)
 
Note: This value is of type REG_DWORD.. 
 
The registry keys below allow programmatic set the properties of the
generated PDF document.

 
   HKEY_CURRENT_USER\Software\Custom PDF Printer\Author
   HKEY_CURRENT_USER\Software\Custom PDF Printer\Title
   HKEY_CURRENT_USER\Software\Custom PDF Printer\Subject
   HKEY_CURRENT_USER\Software\Custom PDF Printer\Keywords
   HKEY_CURRENT_USER\Software\Custom PDF Printer\Creator
   HKEY_CURRENT_USER\Software\Custom PDF Printer\Producer

Note: the values above are all of type string (REG_SZ). 
 
Note: Our free CutePDF Writer does not support above registry settings. That's for custom PDF Writer with programmatic access package only
 
 
Overview
Developer Kit
Sample Code System Requirements License and Price