Neevia
docCreator v3.6
user’s manual
Installing and Uninstalling Neevia docCreator
Neevia docCreator DCOM interface
PDF Encryption related properties
PDF Viewer specific properties
Watermark and Stationery related properties
Virtual Printer related properties
TIFF merging/splitting related
Example 1. Create a PDF file from Visual Basic
Example 2. Convert a MS Word document into PDF (Visual Basic)
Example 3. Convert a MS Excel document into PDF (Visual Basic)
Example 4. Convert a MS PowerPoint document into PDF (Visual Basic)
Example 5. Convert a MS Access report into PDF (Visual Basic).
Example 6. Convert a WordPerfect document into PDF (Visual Basic)
Example 7. Convert an URL / HTML into PDF (Visual Basic)
Example 8. Convert a PostScript file into PDF (Visual Basic)
Example 9. Convert a TIFF file into PDF (Visual Basic)
Example 10. Convert a PDF file into TIFF (Visual Basic)
Example 11. Convert 3 TIFF files into a single PDF (Visual Basic)
Example 12. Encrypt an existing PDF file / 40 bits encryption (Visual Basic)
Example 13. Encrypt an existing PDF file / 128 bits encryption (Visual Basic)
Example 14. Extract Text from an existing PDF file (Visual Basic)
Example 15. Merge 2 existing PDF files (Visual Basic)
Example 16. Extract a page from an existing PDF file (Visual Basic)
Example 17. Split an existing PDF file into single pages (Visual Basic)
Example 18. Watermark an existing PDF file (Visual Basic)
Example 19. Apply stationery to an existing PDF file (Visual Basic)
NEEVIA TECHNOLOGY
ELECTRONIC END USER LICENSE AGREEMENT
For One (1) Computer/Server
This is an End User License Agreement. This is a contract. If you install this software, you must abide by the terms of this agreement. This license is applicable to all software products sold by Neevia Technology (Neevia). The term software includes upgrades, modified versions or updates. This software is licensed and not sold. Only a personal, non-transferable and nonexclusive right to use the Neevia products is granted to the end user.
The following are definitions that should be noted by the user:
a. SERVER
This is a single computer owned, rented or leased by a single individual or entity on which one or more applications load and execute software in the memory space of that computer. Software is installed on a server for one or more users. All servers must be licensed to utilize Neevia software.
b. VIRTUAL SERVER
This is a single computer that is owned, rented or leased by an individual or entity who turns around and rents or leases access to others. The virtual server may have one or more applications on it for the end users to use. The purpose of the virtual server is to give multiple users access to many software programs. This is very common in ISP or ASP environments.
c. DEVELOPMENT
This means that you are programming a specific application or tool that will interact with the software that you are licensing from Neevia Technology.
THIS IS A CONTRACT BETWEEN YOU AND NEEVIA TECHNOLOGY. YOU SHOULD CAREFULLY READ THIS LICENSING AGREEMENT AND MUST ACCEPT ALL THE TERMS AND CONDITIONS BEFORE INSTALLING THIS NEEVIA SOFTWARE. BY INSTALLING THE SOFTWARE, YOU ARE AGREEING TO BE BOUND BY THE TERMS AND CONDITIONS OF THIS LICENSE. IF YOU DO NOT AGREE TO THE TERMS OF THIS LICENSE, DO NOT INSTALL THE SOFTWARE, AND DO NOT USE THE SOFTWARE. IF YOU VIOLATE THIS AGREEMENT, YOU WILL BE SUBJECT TO LEGAL ACTION BY NEEVIA TECHNOLOGY.
Subject to the payment of applicable license fees, Neevia Technology grants you a nonexclusive right to use its accompanying Neevia software product and related documents (the Software) in the terms and conditions provided as follow:
LICENSE
Until such time as Neevia Technology has issued a valid serial number to you, you may only use this software for a 30-day trial period. You agree to remove any copies of the software after the expiration of the trial period. No license is issued to you until you are issued a valid serial number.
(a) Home Use:
The primary user of each computer on which the Software is installed or used may also install the Software on one home or portable computer. However another person may not use the Software on a secondary computer at the same time the Software on the primary computer is being used.
(b) Server or Network Use:
You may store or install one (1) copy of the SOFTWARE on a storage device, such as a network server, for backup and archival purposes only. A license for the SOFTWARE may not be shared or used concurrently on different computers.
(c) Operating system or Language versions:
If you receive two or more copies of the Software with different operating systems or language versions, the total aggregate number of computers on which all versions of the Software are used may not exceed the Permitted Number of Computers. You may not rent, lease, sublicense, lend or transfer versions or copies of the Software you do not use, or Software contained on any unused media.
(d) Archiving:
You may make one copy of the Software solely for archival purposes. If the Software is an upgrade, you may use the Software only in conjunction with upgraded product. If you receive your first copy of the Software electronically, and a second copy on media afterward, the second copy can be used for archival purposes only.
You agree to surrender your license(s) if you violate this agreement. If you violate this agreement, you will not receive a refund upon termination of this license. You agree not to utilize our software to violate the copyright of any third parties. If you do violate the copyright of a third party utilizing our software, you agree to hold Neevia Technology harmless and will indemnify Neevia Technology for any such activity even if the violation is unintentional.
COPYRIGHT
The Software is owned by Neevia Technology and/or its suppliers, and is protected by the copyright and trademark laws of the United States and related applicable laws. You may not copy the Software except as set forth in the "License" section. Any copies that you are permitted to make pursuant to this Agreement must contain the same copyright and other proprietary notices that appear on or in the Software.
You may not rent, lease, sub-license, transfer, or sell the Software. You may not modify, translate, reverse engineer, decompile, disassemble, or create derivative works based on the Software, except to the extent applicable law expressly prohibits such foregoing restriction. You may use the trademarks to identify the Software owner's name, or to identify printed output produced by the Software. Such use of any trademark does not give you any rights of ownership in that trademark.
NO WARRANTY LICENSED SOFTWARE (S) - "AS IS"
The Software is provided AS IS. NEEVIA TECHNOLOGY AND ITS SUPPLIERS MAKE NO WARRANTIES, EXPRESS OR IMPLIED, AS TO THE MERCHANTABILITY, QUALITY, NONINFRINGEMENT OF THIRD PARTY RIGHTS, FITNESS FOR A PARTICULAR PURPOSE, AND THOSE ARISING BY STATUTE OR OTHERWISE IN LAW OR FROM A COURSE OF DEALING OR USAGE OF TRADE. THE ENTIRE RISK AS TO THE QUALITY, RESULTS BY USING THE SOFTWARE, AND PERFORMANCE OF THE SOFTWARE IS WITH THE END USER. Some states or jurisdictions do not allow the exclusion or limitation of incidental, consequential or special damages, or the exclusion of implied warranties or limitations on how long an implied warranty may last, so the above limitations may not apply to your or your company.
LIMITATION OF REMEDIES AND LIABILITY
NEEVIA TECHNOLOGY OR ITS SUPPLIERS OR RESELLERS SHALL NOT UNDER ANY CIRCUMSTANCE BE LIABLE TO YOU FOR ANY DAMAGES, INCLUDING BUT NOT LIMITED TO SPECIAL, INDIRECT, OR CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST SAVINGS, OR FOR ANY CLAIM BY A THIRD PARTY, ARISING OUT OF THE USE OR INABILITY TO USE THE SOFTWARE, EVEN IF NEEVIA TECHNOLOLGY SHALL HAVE BEEN INFORMED OF THE POSSIBILITY OF SUCH DAMAGES, OR FOR ANY CLAIM BY ANY OTHER PARTY.
GENERAL
This Agreement shall be construed, interpreted, and governed by the laws of the State of Florida, excluding the application of its conflicts of law rules. The United Nations Convention on Contracts of the International Sale of Goods, will not govern this Agreement. If any part of this Agreement is found void and unenforceable, it will not affect the validity of the rest of the Agreement, which shall remain valid and enforceable according to its terms.
If you need to redistribute this product with your own software products, you need to contact Neevia and negotiate a separate licensing and royalty agreement.
You may not ship, transfer, or export the Software into any country or used in any manner prohibited by any export laws, restrictions or regulations.
UPGRADES
You must be properly licensed to install upgrades to Neevia Software products. Neevia upgrades replace and or supplement the previous product that formed the basis for your eligibility to for the upgrade. You may use the upgrade only in accordance with the terms of this Agreement. Upgrades may not be separated and used on separate computers.
GOVERNEMENT USERS
For United States government users, the Software and associated Documentation are deemed to be “commercial computer software” and “commercial computer documentation”, respectively pursuant to DFAR 227.7202 and FAR 12.212(b) as applicable.
ENTIRE AGREEMENT
You acknowledge that you have read this Agreement, understand it and agree to be bounded by its terms and conditions. It is the complete and exclusive statement of the Agreement between us, which supersedes any proposal or prior agreement, oral or written, and other communication between us relating to the subject matter of this Agreement.
Neevia Technology
103
NE 4th Street
Fort
Lauderdale,
Florida 33301
Phone: (954)
893.9343
web: http://neevia.com
In today’s business environment there is a tremendous need for companies to convert business content to Adobe PDF. This is apparent by the many requests programmers and IT professionals receive from managers in industries that range from the legal field to the financial and insurance fields. We realized this a few years ago and that is when we began to work on the suite of software products that are offered by Neevia Technology. We understand that we live in a PDF world and we set out to create an application that would change the way people view share and work with e-documents.
Neevia docCreator is a COM object that can be used to generate PDF, PostScript, EPS, TIFF, JPEG, BMP, PCX and PNG files from Active Server Pages, Visual Basic, Borland Delphi or any Windows application that supports COM objects.
There are several ways in which you can use docCreator to create PDF, PostScript, EPS, PNG, PCX, BMP, JPEG, TIFF, TEXT, PSD and PCL-XL files:
A. Capture and convert the print stream.
To capture and convert the print stream with docCreator you will have to print to docCreator from your application and then call the docCreator Create method to create the output file.
B. Convert an existing PostScript, EPS or PDF file.
C. Convert an existing image file.
Before installing and/or using this product, please make sure you carefully read the copyright notice and agree to all of its terms. If you have any questions about the licensing agreement, please feel free to call (954) 981.9252 or email sales@neevia.com.
If you are using an earlier version of Neevia docCreator on your system, it is recommended that you uninstall it before installing Neevia docCreator v3.6.
To install Neevia docCreator:
download and save the http://neevia.com/prods/cr.exe file to your hard disk. After downloading the file, double-click on it and follow the instructions. The installation procedure automatically detects your operating system, copies the needed files to your system directory and installs Neevia docCreator in your system.
To perform an unattended (silent) installation launch docCreator installer with /sp- /verysilent /norestart command line switches. Here is the full list of supported switches:
/SP-
Disables the "This will install... Do you wish to continue?" prompt at the beginning of Setup.
/SILENT, /VERYSILENT
Instructs Setup to be silent or very silent. When Setup is silent the wizard and the background window are not displayed but the installation progress window is. When a setup is very silent this installation progress window is not displayed. Everything else is normal so for example error messages during installation are displayed and the startup prompt is (if you haven't disabled it with '/SP-' command line option explained above). If a restart is necessary and the '/NORESTART' command isn't used (see below) and Setup is silent, it will display a “Reboot now?” dialog. If it's very silent it will reboot without asking.
/NOCANCEL
Prevents the user from canceling
during the installation process, by
disabling the Cancel button and ignoring clicks on the close button. Useful
along with /SILENT.
/NORESTART
Instructs Setup not to reboot even if it's necessary.
/DIR="x:\dirname"
Overrides the default directory name displayed on the Select Destination Directory wizard page. A fully qualified pathname must be specified.
/GROUP="folder name"
Overrides the
default folder name displayed on the Select Start Menu Folder
wizard page.
/user="username", /company="company name", /serial="serial number"
Use these switches to pass the registration info (username, company name and serial number) to the installer.
To remove Neevia docCreator from your system:
1. Select Settings -> Control Panel from the Start menu.
2. In the Control Panel click Add/Remove programs and select Document Creator v3.6 from the list.
3. Click the Add/Remove button to remove the program.
A confirmation prompt is displayed.
To perform an unattended (silent) uninstall, launch unins000.exe from the folder where docCreator has been installed, with /verysilent /norestart command line switches. Here is the full list of supported switches:
/SILENT, /VERYSILENT
When specified, the uninstaller will not ask the user for startup confirmation or display a message stating that uninstall is complete. Shared files that are no longer in use are deleted automatically without prompting. Any critical error messages will still be shown on the screen. When '/VERYSILENT' is specified, the uninstallation progress window is not displayed. If a restart is necessary and the '/NORESTART' command isn't used (see below) and '/VERYSILENT' is specified, the uninstaller will reboot without asking.
/NORESTART
Instructs the uninstaller not to reboot even if it's necessary.
To register Neevia docCreator, launch dcreg.exe from the folder where docCreator has been installed and enter the user name, company name and serial number that have been emailed to you after the purchase.
Note: Make sure you enter the registration info exactly as it is in the email message - serial number is user name / company name dependent.
Class ID
docCreator.docCreatorClass
Example:
Visual Basic: Set docCreator = CreateObject("docCreator.docCreatorClass")
Delphi: docCreator := CreateOLEObject(‘docCreator.docCreatorClass’);
VC#: first add a reference in your project to docCreator library
docCreator.docCreatorClass CR = new docCreator.docCreatorClass();
Class ID
doc_Creator.Application
Example:
Set docCreator = CreateObject("doc_Creator.Application")
docCreator DCOM object can be only invoked (called) from the computer where docCreator is installed.
Recommended DCOM configuration:
1. type dcomcnfg at the command prompt and press Enter;
2. find and select docCreator DCOM library in the Applications list, then press the Properties button;
If you have windows 2003 then type dcomcnfg in the command prompt, expand the Component Services group, expand the Computers group, expand the My Computer group, expand the DCOM Config group, find and select the docCreator DCOM library->right mouse click->Properties.
3. click the Identity tab.
Check the "This user" checkbox, press Browse and
specify
the Administrator account (or a member of the local
Admin user group);
4. enter and re-enter the Administrator password;
5. reboot the computer;
Return the docCreator version.
Syntax
value = docCreator.Version
Data Type: Long
Set the output file name (no path and extension). The file extension will be automatically added depending on the output format.
Syntax
docCreator.DocumentOutputName = value
Data Type: String
Specify the output folder. If the folder does not exist, it will be created.
Syntax
docCreator.DocumentOutputFolder = value
Data Type: String
Set the output file format.
Possible values: "PDF","PDFA","POSTSCRIPT","EPS","JPG","BMP","PCX","PNG","TIF","TXT","PSD","PXL".
Default value: "PDF".
Syntax
docCreator.DocumentOutputFormat = value
Data type: String
TXT output format
The text extraction can be successful only if the printed document itself contains text information. If the document is an image, drawing, metafile, etc, docCreator will not be able to extract any text.
In some cases the printing application sends the text or parts of the text as glyphs. The glyphs codes cannot be converted back to character codes and the text file will contain unreadable characters.
The coordinates of the beginning text are reported by the printing application. The coordinates of the end of the text is calculated by the driver, based on the resolution, font, and the actual characters in the text. A small variation of 1 to 5 pixels is normal.
The coordinates of the text are saved as they are received from the printing application. Some applications, such as Quicken, change the coordinate system during printing. The part of the driver which generates the text output is not aware of this fact. In cases where the printing application changes the coordinate system, the coordinates saved to the text file may not be relative to the upper left corner of the image. There is no workaround for this issue.
When printing content of cells from Excel, the content of the cells is not separated.
Words cut in half. It is possible that the following line "This is a test line" is extracted from a document by the docCreator and is saved to the text file as "T his is a te st lin e". This issue is caused by the printing application, which sends the text as different commands. The printer driver is not aware if the text is "correct", the text will be saved exactly how it is received from the printing application. This is most likely to happen with applications such as Word and Notepad, when for example one part of a word or sentence is using one font and another part of the text is using a different font, or a word was typed and then later edited.
When printing a document with Arabic text document with Unicode Text enabled, the Arabic text in the text output is garbage. The origin of the problem is that some languages use fonts that require shaping. Arabic is one of these. When an application prints Arabic text, no printer driver will receive the text itself but instead receives an array of glyph indices. The glyph index is font specific and points to a character location in the font. Because there is no way to convert back the glyph index into a Unicode character code, it is not possible to retrieve the Unicode text. It is caused by the design of the operating systems way of handling printing these kinds of fonts. This problem is found in all printer drivers that capture text, including the docCreator.
Set the output document resolution.
Possible values: 10...2400.
Default value: 600.
Syntax
docCreator.DocumentResolution = value
Data Type: Single
Note: When DocumentOutputFormat="PDF", DocumentResolution will affect only pattern fills and fonts that must be converted to bitmaps. If you need to change the images resolution then you should set the ColorImageResolution/DownsampleColorImages, GrayImageResolution/DownsampleGrayImages, MonoImageResolution/DownsampleMonoImages properties.
Set the document horizontal resolution (in dpi).
Syntax
docCreator.HResolution = value
Data Type: Single
Set the document vertical resolution (in dpi).
Syntax
docCreator.VResolution = value
Data Type: Single
Set the document page width.
Syntax
docCreator.PageWidth = value
Data Type: Long
Set the document page height.
Syntax
docCreator.PageHeight = value
Data Type: Long
Return an unique identifier. Read Only.
Syntax
value = docCreator.NewGUID
Data Type: String
Specify the first page to start the conversion with.
Syntax
docCreator.FirstPage = value
Data Type: Long
Specify the last page to be converted.
Syntax
docCreator.LastPage = value
Data Type: Long
Specify the TimeOut period for the Create method (minutes).
-1 - no time out.
Syntax
docCreator.TimeOut = value
Data Type: Long
Specify if the PDF file set by the SetInputDocument method has to be reparsed or not when converting into PDF.
Syntax
docCreator.PDFtoPDF = value
Data Type: Boolean
Specify how docCreator should handle missing fonts when converting PDF documents;
Possible values:
0 use only the built-in fonts (the missing fonts will be substituted with Helvetica);
1 use the font mapping file created during the docCreator install to locate the missing fonts;
2 scan the <system>\fonts\ folder for missing fonts; (very slow)
Syntax
docCreator.UseSystemFonts = value
Data Type: Integer
Specify the PDF optimization settings to use.
Possible values: 0 (default),
1 (screen),
2 (printer),
3 (prepress).
Syntax
docCreator.OptimizePDFfor = value
Data Type: String
Note: Can only be set prior to calling the Create method. Will have effect only if DocumentOutputFormat="PDF".
For your convenience there are several sets of predefined settings for creating PDF files. These settings are designed to balance file size with quality, depending on how the PDF file is to be used:
• Default - is intended to be useful across a wide variety of uses, possibly at the expense of a larger output file. All color and grayscale images are downsampled at 72 dpi, monochrome images at 300 dpi; subsets of all fonts used in the file are embedded; and all information is compressed. PDF files created using the Default job option are compatible with Acrobat 4.0 (and later).
• Screen - is for PDF files that will be displayed on the World Wide Web or an intranet, or that will be distributed through an e-mail system for on-screen viewing. This set of options uses compression, downsampling, and a relatively low resolution; converts all colors to RGB; maintains compatibility with Acrobat 3.0; to create a PDF file that is as small as possible. It also optimizes files for byte serving (fast web view).
• Printer - is for PDF files that are intended for desktop printers, digital copiers, publishing on a CD-ROM, or to send to a client as a publishing proof. In this set of options, file size is still important, but it is not the only objective. This set of options uses compression and downsampling to keep the file size down, but it also embeds subsets of all fonts used in the file, tags everything for color management, and prints to a medium resolution to create a reasonably accurate rendition of the original document.
• Prepress - is for PDF files that will be printed as high-quality final output to an imagesetter or platesetter, for example. In this case, file size is not a consideration. The objective is to maintain all the information in a PDF file that a commercial printer or service bureau will need to print the document correctly. This set of options downsamples color and grayscale images at 300 dpi, monochrome images at 1200 dpi, embeds subsets of all fonts used in the file, prints to a higher resolution, and uses other settings to preserve the maximum amount of information about the original document.
Set the output document Title field.
Syntax
docCreator.DocumentTitle = value
Data Type: String
Note: Can only be set prior to calling the Create method. Will have effect only if DocumentOutputFormat="PDF".
Set the output document Subject field.
Syntax
docCreator.DocumentSubject = value
Data Type: String
Note: Can only be set prior to calling the Create method. Will have effect only if DocumentOutputFormat="PDF".
Set the output document author field.
Syntax
docCreator.DocumentAuthor = value
Data Type: String
Note: Can only be set prior to calling the Create method. Will have effect only if DocumentOutputFormat="PDF".
Set the output document keywords field.
Syntax
docCreator.DocumentKeywords = value
Data Type: String
Note: Can only be set prior to calling the Create method. Will have effect only if DocumentOutputFormat="PDF".
Specify if the output document should be linearized or not.
PDF linearization is a way to optimize PDF files for more efficient viewing over the web. Pages are loaded faster and the user does not have to wait until the entire PDF file is uploaded by the browser.
Possible values: true, false
Default value: true
Syntax
docCreator.PDFLinearized = value
Data Type: Boolean
Note: Can only be set prior to calling the Create method. Will have effect only if DocumentOutputFormat="PDF" and will not work if PDFEncryption=true.
Set the compatibility level (a.k.a. PDF version) of the output document. Write Only.
Possible values:
"1.2", (Acrobat 3-and-later compatible)
"1.3", (Acrobat 4-and-later compatible)
"1.4". (Acrobat 5-and-later compatible)
"1.5". (Acrobat 6-and-later compatible)
"1.6". (Acrobat 7-and-later compatible)
Default value: "1.3"
Syntax
docCreator.PDFCompatibilityLevel = value
Data Type: String
Note: Can only be set prior to calling the Create method. Will have effect only if DocumentOutputFormat="PDF".
Possible values:
"None", (will disable the Auto-Rotate Pages option)
"PageByPage", (will rotate each page based on the direction of the text on that page)
"All". (will rotate all pages in the document based on the orientation of the majority of text)
Default value: "None".
Syntax
docCreator.PDFAutoRotatePage = value
Data Type: String
Note: Can only be set prior to calling the Create method. Will have effect only if DocumentOutputFormat="PDF".
Specify if text and line art in the output document should be compressed or not.
Possible values: true, false
Default value: true
Syntax
docCreator.PDFCompressPages = value
Data Type: Boolean
Note: Can only be set prior to calling the Create method. Will have effect only if DocumentOutputFormat="PDF".
Specify if the fonts in the output document should be embedded or not.
Possible values: true, false
Default value: true
Syntax
docCreator.PDFEmbedAllFonts = value
Data Type: Boolean
Note: Can only be set prior to calling the Create method. Will have effect only if DocumentOutputFormat="PDF".
Specify whether or not to include in the output document only those characters from a font, that are used in the document.
Possible values: true, false
Default value: true
Syntax
docCreator.PDFSubsetFonts = value
Data Type: Boolean
Note: Can only be set prior to calling the Create method. Will have effect only if DocumentOutputFormat="PDF".
Set the Subset Fonts threshold. If the percentage of used characters (compared with the total characters of the particular font) exceeds this threshold, the entire font is embedded.
Possible values: 0...100.
Default value: 100.
Syntax
docCreator.PDFFontsMaxSubset = value
Data Type: Long
Note: Can only be set prior to calling the Create method. Will have effect only if DocumentOutputFormat="PDF".
Set the output document color model.
Possible values: "DeviceRGB", "DeviceCMYK", "DeviceGRAY".
Default value: "DeviceCMYK"
Syntax
docCreator.PDFProcessColorModel = value
Data Type: String
Note: Can only be set prior to calling the Create method. Will have effect only if DocumentOutputFormat="PDF" and will not affect images and shadings.
Specify if the CMYK images should be converted to RGB or not.
Possible values: true, false
Default value: true
Syntax
docCreator.ConvertCMYKImagesToRGB = value
Data Type: Boolean
Note: Can only be set prior to calling the Create method. Will have effect only if DocumentOutputFormat="PDF".
Specify if the color images should be compressed or not.
Possible values: true, false
Default value: true
Syntax
docCreator.CompressColorImages = value
Data Type: Boolean
Note: Can only be set prior to calling the Create method. Will have effect only if DocumentOutputFormat="PDF".
Set the color images compression method.
Possible values:
"Automatic", "JPEG-maximum", "JPEG-high", "JPEG-medium", "JPEG-low",
"JPEG-minimum", "ZIP".
Default value: "Automatic".
Syntax
docCreator.ColorCompressMethod = value
Data Type: String
Note: Can only be set prior to calling the Create method. Will have effect only if DocumentOutputFormat="PDF".
Specify if the gray images should be compressed or not.
Possible values: true, false
Default value: true
Syntax
docCreator.CompressGrayImages = value
Data Type: Boolean
Note: Can only be set prior to calling the Create method. Will have effect only if DocumentOutputFormat="PDF".
Set the gray images compression method.
Possible values: "Automatic", "JPEG-maximum", "JPEG-high", "JPEG-medium", "JPEG-low",
"JPEG-minimum", "ZIP".
Default value: "Automatic".
Syntax
docCreator.GrayCompressMethod = value
Data Type: String
Note: Can only be set prior to calling the Create method. Will have effect only if DocumentOutputFormat="PDF".
Specify if the monochrome images should be compressed or not.
Possible values: true, false
Default value: true
Syntax
docCreator.CompressMonoImages = value
Data Type: Boolean
Note: Can only be set prior to calling the Create method. Will have effect only if DocumentOutputFormat="PDF".
Set the monochrome images compression method.
Possible values:
"CCITT", (Compress monochrome images using the CCITT group 4-fax compression method)
"ZIP". (Compress monochrome images using ZIP-compatible compression.)
Default value: "CCITT".
Syntax
docCreator.MonoCompressMethod = value
Data Type: String
Note: Can only be set prior to calling the Create method. Will have effect only if DocumentOutputFormat="PDF".
Set the color images resolution.
Possible values: 10...2400.
Default value: 300
Syntax
docCreator.ColorImageResolution = value
Data Type: Long
Note: Can only be set prior to calling the Create method. Will have effect only if DocumentOutputFormat="PDF".
Set the gray images resolution.
Possible values: 10...2400.
Default value: 300.
Syntax
docCreator.GrayImageResolution = value
Data Type: Long
Note: Can only be set prior to calling the Create method. Will have effect only if DocumentOutputFormat="PDF".
Set the monochrome images resolution.
Possible values: 10...2400.
Default value: 1200.
Syntax
docCreator.MonoImageResolution = value
Data Type: Long
Note: Can only be set prior to calling the Create method. Will have effect only if DocumentOutputFormat="PDF".
Specify if the color images in the output document should be downsampled or not.
Possible values: true, false
Default value: false.
Syntax
docCreator.DownsampleColorImages = value
Data Type: Boolean
Note: Can only be set prior to calling the Create method. Will have effect only if DocumentOutputFormat="PDF".
To downsample color, grayscale, or monochrome images, docCreator combines pixels in a sample area to make one larger pixel. You provide the resolution of your output device in dots per inch (dpi) and select the downsample algorithm:
Average Downsample – this algorithm averages the pixels in a sample area and replaces the entire area with the average pixel color at the specified resolution.
Subsample – this algorithm chooses a pixel in the center of the sample area and replaces the entire area with that pixel at the specified resolution. Subsample significantly reduces the conversion time compared with downsampling but results in images that are less smooth and continuous.
Bicubic Downsample – this algorithm uses a weighted average to determine pixel color and usually yields better results than the simple averaging method of downsampling. Bicubic is the slowest but most precise method, resulting in the smoothest tonal gradations.
Possible values: "Bicubic", "Average", "Subsample".
Default value: "Bicubic".
Syntax
docCreator.ColorImageDownsampleType = value
Data Type: String
Note: Can only be set prior to calling the Create method. Will have effect only if DocumentOutputFormat="PDF".
Specify if the gray images in the output document should be downsampled or not.
Possible values: true, false
Default value: false.
Syntax
docCreator.DownsampleGrayImages = value
Data Type: Boolean
Note: Can only be set prior to calling the Create method. Will have effect only if DocumentOutputFormat="PDF".
Possible values: "Bicubic", "Average", "Subsample".
Default value: "Bicubic".
Syntax
docCreator.GrayImageDownsampleType = value
Data Type: String
Note: Can only be set prior to calling the Create method. Will have effect only if DocumentOutputFormat="PDF".
Specify if the mono images in the output document should be downsampled or not.
Possible values: true, false
Default value: false.
Syntax
docCreator.DownsampleMonoImages = value
Data Type: Boolean
Note: Can only be set prior to calling the Create method. Will have effect only if DocumentOutputFormat="PDF".
NOTE: Downsampling monochrome images can have unexpected viewing results, such as no image display. If this happens, turn off downsampling and convert the file again. This problem is most likely to occur with subsample and least likely with bicubic downsample.
Possible values: "Bicubic", "Average", "Subsample".
Default value: "Bicubic".
Syntax
docCreator.MonoImageDownsampleType = value
Data Type: String
Note: Can only be set prior to calling the Create method. Will have effect only if DocumentOutputFormat="PDF".
Specify the maximum size of an inline image in bytes.
Default value: 4000
Syntax
docCreator.MaxInlineImageSize = value
Data type: Integer
For images larger than this size, docCreator will create a XObject instead of embedding the image into the context stream. Note that redundant inline images must be embedded each time they occur in the document, while multiple references can be made to a single XObject image. Therefore it may be advantageous to set a small or zero value if the source document is expected to contain multiple identical images, reducing the size of the generated PDF.
Set the document output intent.
Possible values: "SRGB", "JC200103", "FOGRA27", "SWOP", "GRAY".
Syntax
docCreator.OutputIntent = value
Data type: String
Note: Will have effect only if DocumentOutputFormat="PDFA".
All Neevia (and Adobe) products enforce the restrictions set by PDF Security (encryption). However, not all third party products fully support and respect these settings. Recipients using such third party products may be able to bypass some of the restrictions you have set.
Specify if the output document should be encrypted or not.
Possible values: true, false
Default value: false.
Syntax
docCreator.PDFEncryption = value
Data Type: Boolean
Note: Can only be set prior to calling the Create method. Will have effect only if DocumentOutputFormat="PDF".
Set the document encryption method.
Possible values: 40, (low - 40 bits encryption – Acrobat 3-and-later compatible)
128. (high - 128 bits encryption – Acrobat 5-and-later compatible)
Syntax
docCreator.PDFEncryptionType = value
Data Type: Long
Note: Can only be set prior to calling the Create method. Will have effect only if PDFEncryption=true.
Set the user password in the output document. Users will be asked to enter this password before Acrobat Reader will allow them to view the document.
Syntax
docCreator.PDFUserPassword = value
Data Type: String
Note: Can only be set prior to calling the Create method. Will have effect only if PDFEncryption=true. In the trial version PDFUserPassword=”neevia”.
Set the output document owner password. This option will force the user of the PDF to enter a password before Acrobat Reader will allow them to change the user password and security permissions.
Syntax
docCreator.PDFOwnerPassword = value
Data Type: String
Note: Can only be set prior to calling the Create method. Will have effect only if PDFEncryption=true. In the trial version PDFOwnerPassword=”neevia”.
Specify if the user of the output document will be allowed to copy text and graphics from the document.
Possible values: true, false
Default value: false.
Syntax
docCreator.PDFNoCopyPermission = value
Data Type: Boolean
Note: Can only be set prior to calling the Create method. Will have effect only if PDFEncryption=true and PDFEncryptionType=40.
Specify if the user of the output document will be allowed to print the document.
Possible values: true, false
Default value: false.
Syntax
docCreator.PDFNoPrintPermission = value
Data Type: Boolean
Note: Can only be set prior to calling the Create method. Will have effect only if PDFEncryption=true and PDFEncryptionType=40.
Specify if the user of the output document will be allowed to change the document.
Possible values: true, false
Default value: false.
Syntax
docCreator.PDFNoChangePermission = value
Data Type: Boolean
Note: Can only be set prior to calling the Create method. Will have effect only if PDFEncryption=true and PDFEncryptionType=40.
Specify if the user of the output document will be allowed to add or change comments and form fields in the document.
Possible values: true, false
Default value: false.
Syntax
docCreator.PDFNoAddPermission = value
Data Type: Boolean
Note: Can only be set prior to calling the Create method. Will have effect only if PDFEncryption=true and PDFEncryptionType=40.
Specify if the user of the output PDF file will be allowed to use the document contents, which is required to support the Acrobat Accessibility feature.
Possible values: true, false
Syntax
docCreator.PDFContentAccess = value
Data Type: Boolean
Note: Can only be set prior to calling the Create method. Will have effect only if PDFEncryption=true and PDFEncryptionType=128.
Specify if the user of the output PDF file will be allowed to select and copy the contents of the document.
Possible values: true, false
Syntax
docCreator.PDFAllowExtraction = value
Data Type: Boolean
Note: Can only be set prior to calling the Create method. Will have effect only if PDFEncryption=true and PDFEncryptionType=128.
Specify the allowed document changes.
Possible values:
0, (None - will prevent users from doing anything with the file, including filling in signature and form fields)
1, (Only Document Assembly - will let users insert, delete, and rotate pages, and create bookmarks and thumbnails)
2, (Only Form Field Fill-in or Signing - will let users sign and fill in forms, but not create them)
3, (Comment Authoring, Form Field Fill-in or Signing - will let users do everything described in the previous options, plus add comments)
4, (General Editing, Comment and Form Field Authoring - will let users do anything to the document except extract contents, and print).
Syntax
docCreator.PDFChangesAllowed = value
Data Type: Integer
Note: Can only be set prior to calling the Create method. Will have effect only if PDFEncryption=true and PDFEncryptionType=128.
Specify the document printing permissions.
Possible values:
0, (Not Allowed – will prevent users from printing the document)
1, (Low Resolution – will let users print, but at a resolution that prevents from recreating the PDF file with different security settings. Printing may be slower because each page will be printed as a bitmapped image)
2, (Fully Allowed – will let users print at any resolution, directing high-quality vector output to PostScript and other printers that support advanced high-quality printing features)
Syntax
docCreator.PDFPrintingPermissions = value
Data Type: Integer
Note: Can only be set prior to calling the Create method. Will have effect only if PDFEncryption=true and PDFEncryptionType=128.
Specify the PDF document initial view.
Possible values:
0, (Page only)
1, (Page and Bookmarks)
2, (Page and Thumbnails)
3, (Full screen)
Syntax
docCreator.PDFOpenView = value
Data Type: Long
Note: Can only be set prior to calling the Create method. Will have effect only if DocumentOutputFormat="PDF".
Specify if the Adobe Acrobat Reader should hide the menu bar when displaying the output PDF document.
Possible values: true, false
Syntax
docCreator.PDFHideMenuBar = value
Data Type: Boolean
Note: Can only be set prior to calling the Create method. Will have effect only if DocumentOutputFormat="PDF".
Specify if the Adobe Acrobat Reader should hide the toolbar when displaying the output PDF document.
Possible values: true, false
Syntax
docCreator.PDFHideToolbar = value
Data Type: Boolean
Note: Can only be set prior to calling the Create method. Will have effect only if DocumentOutputFormat="PDF".
Specify if the Adobe Acrobat Reader should hide the user interface when displaying the output PDF document.
Possible values: true, false
Syntax
docCreator.PDFHideWindowUI = value
Data Type: Boolean
Note: Can only be set prior to calling the Create method. Will have effect only if DocumentOutputFormat="PDF".
Return the media width of the specified page from the PDF document set by ExtractFileInfo method.
Syntax
value = docCreator.GetPageMediaWidth( pageNum )
Data Type: Long
Note: Can only be called after ExtractFileInfo method. Will have effect only for PDF files.
Return the media height of the specified page from the PDF document set by ExtractFileInfo method.
Syntax
value = docCreator.GetPageMediaHeight( pageNum )
Data Type: Long
Note: Can only be called after ExtractFileInfo method. Will have effect only for PDF files.
Return the bounding box x coordinate of the specified page from the PDF document set by ExtractFileInfo method.
Syntax
value = docCreator.GetPageBoundingBoxX( pageNum )
Data Type: Long
Note: Can only be called after ExtractFileInfo method. Will have effect only for PDF files.
Return the bounding box y coordinate of the specified page from the PDF document set by ExtractFileInfo method.
Syntax
value = docCreator.GetPageBoundingBoxY( pageNum )
Data Type: Long
Note: Can only be called after ExtractFileInfo method. Will have effect only for PDF files.
Return the bounding box height of the specified page from the PDF document set by ExtractFileInfo method.
Syntax
value = docCreator.GetPageBoundingBoxH( pageNum )
Data Type: Long
Note: Can only be called after ExtractFileInfo method. Will have effect only for PDF files.
Return the bounding box width of the specified page from the PDF document set by ExtractFileInfo method.
Syntax
value = docCreator.GetPageBoundingBoxW( pageNum )
Data Type: Long
Note: Can only be called after ExtractFileInfo method. Will have effect only for PDF files.
Return the orientation of the specified page from the PDF document set by ExtractFileInfo method.
Syntax
value = docCreator.GetPageOrientation( pageNum )
Data Type: Long
Note: Can only be called after ExtractFileInfo method. Will have effect only for PDF files.
Set the image quality if the output format is "JPG".
Possible values: 1...100.
Default value: 75.
Syntax
docCreator.JPEGImageQuality = value
Data Type: Long
Note: Can only be set prior to calling the Create method. Will have effect only if DocumentOutputFormat="JPG".
Set the image type if the output format is "TIF".
Possible values:
"tiff32nc", (Color – 32bits CMYK output, uncompressed)
"tiff24nc", (Color – 24bits RGB output, uncompressed)
"tiff12nc", (Color – 12bits RGB output, uncompressed)
"tiffcrle", (BW – G3 fax encoding with no EOLs)
"tiffg3", (BW – G3 fax encoding with EOLs)
"tiffg32d", (BW – 2-D G3 fax encoding)
"tiffg4", (BW – G4 fax encoding)
"tifflzw", (BW – LZW-compatible compression)
"tiffpack". (BW – PackBits compression)
Default value: "tiff24nc".
Syntax
docCreator.TIFFType = value
Data Type: String
Note: Can only be set prior to calling the Create method. Will have effect only if DocumentOutputFormat="TIF".
Specify if the output tiff file should be multipage or not.
Possible values: true, false
Syntax
docCreator.MPTIFF = value
Data Type: Boolean
Note: Can only be set prior to calling the Create method. Will have effect only if DocumentOutputFormat="TIF".
Set the fill order for the TIFF output format.
Possible values: "lsb2msb", "msb2lsb"
Syntax
docCreator.TiffFillOrder = value
Data type: String
Note: Will have effect only if DocumentOutputFormat="TIF".
Set the image type if the output format is "BMP".
Possible values:
"bmp16m", (Color – 16m colors RGB output)
"bmp16", (Color – 16 colors RGB output)
"bmp256", (Color – 256 colors RGB output)
"bmpgray", (Gray output)
"bmpmono". (BW output)
Default value: "bmp16m".
Syntax
docCreator.BMPType = value
Data Type: String
Note: Can only be set prior to calling the Create method. Will have effect only if DocumentOutputFormat="BMP".
Set the image type if the output format is "PCX".
Possible values:
"pcx24b", (Color – 16m colors RGB output)
"pcx16", (Color – 16 colors RGB output)
"pcx256", (Color – 256 colors RGB output)
"pcxcmyk", (Color – CMYK output)
"pcxgray", (Grayscale output)
"pcxmono". (Monochrome output)
Default value: "pcx24b".
Syntax
docCreator.PCXType = value
Data Type: String
Note: Can only be set prior to calling the Create method. Will have effect only if DocumentOutputFormat="PCX".
Set the image type if the output format is "PNG".
Possible values:
"png16m", (Color – 16m colors output)
"png16", (Color – 16 colors output)
"png256", (Color – 256 colors output)
"pnggray", (Grayscale output)
"pngmono". (Monochrome output)
Default value: "png16m".
Syntax
docCreator.PNGType = value
Data Type: String
Note: Can only be set prior to calling the Create method. Will have effect only if DocumentOutputFormat="PNG".
This option controls the use of subsample antialiasing for text content. The subsampling box size should be 4 bits for optimum output, but smaller values can be used for faster rendering.
Possible Values: 0, 1, 2, 4
Syntax
docCreator.TextAplhaBits = value
Data type: Integer
This option controls the use of subsample antialiasing for graphics content. The subsampling box size should be 4 bits for optimum output, but smaller values can be used for faster rendering.
Possible Values: 0, 1, 2, 4
Syntax
docCreator.GraphicsAplhaBits = value
Data type: Integer
Note that because of the way antialiasing blends the edges of shapes into the background when they are drawn some files that rely on joining separate filled polygons together to cover an area may not render as expected with Graphics antialiasing at 2 or 4 bits. If you encounter strange lines within solid areas, try rendering that file again with Graphic antialiasing at 1 bit.
Specify if docCreator should remap the device-dependent color values through a CIE color space. This can improve the conversion of CMYK documents to RGB.
Possible Values: true, false
Syntax
docCreator.UseCIEColor = value
Data type: Boolean
Specify if docCreator should use image interpolation. Enabling image interpolation will result in higher quality for scaled images at the expense of speed.
Possible Values: true, false
Syntax
docCreator.Interpolate = value
Data type: Boolean
Specify if Well Tempered Screening algorithm should be used for halftoning.
Possible Values: true, false
Syntax
docCreator.UseWTS = value
Data type: Boolean
If true, then the Well Tempered Screening algorithm is used for halftoning. Otherwise, a rational tangent algorithm is chosen, which will typically result in significant differences between the screen angle and ruling requested, and actually rendered. Currently, the performance of WTS is reasonably good when rendering to a full page buffer, but not optimized for banded mode.
When creating image files if the original document has more than 1 page, docCreator will produce an image file for each page of the original document. The filemask allows you to control how the single page files will be named - if you set %d docCreator will add the page number to the file name. You can also control the number of digits used in the file name by replacing %d with %0Nd where N is the number of digits you want to have, for example %03d will force docCreator to produce files with names like this: 'filename001.jpg', ... , 'filename010.jpg', ... %04d will produce: 'filename0001.jpg', ... , 'filename0010.jpg', ...
Syntax
docCreator.FileMask = value
Data Type: String
EX: docCreator.FileMask = "[%d]"
Specify additional conversion parameters for the ConvertImage method.
Syntax
docCreator.ConvertImageParam = value
Data Type: String
Possible values:
-colorize <value>
colorize the image with the fill color
Specify the amount of colorization as a percentage. You can apply separate colorization values to the red, green, and blue channels of the image with a colorization value list delimited with slashes (e.g. 0/0/50).
preferred number of colors in the image
The actual number of colors in the image may be less than your request, but never more. Note, this is a color reduction option. Images with less unique colors than specified with this option will have any duplicate or unused colors removed. The ordering of an existing color palette may be altered. When converting an image from color to grayscale, convert the image to the gray colorspace before reducing the number of colors since doing so is most efficient.
Note, options -dither, -colorspace affect the color reduction algorithm.
-colorspace <value>
the type of colorspace
Choices are: CMYK, GRAY, HSL, HWB, OHTA, RGB, Transparent, XYZ, YCbCr, YIQ, YPbPr, or YUV.
Color reduction, by default, takes place in the RGB color space. Empirical evidence suggests that distances in color spaces such as YUV or YIQ correspond to perceptual color differences more closely than do distances in RGB space. These color spaces may give better results when color reducing an image. Refer to quantize for more details.
The Transparent color space behaves uniquely in that it preserves the matte channel of the image if it exists. The -colors or -monochrome option, or saving to a file format which requires color reduction, is required for this option to take effect.
-compress <type>
set the type of image compression
Choices are: None, BZip, Fax, Group4, JPEG, LZW, RLE or Zip.
Specify +compress to store the binary image in an uncompressed format. The default is the compression type of the specified image file.
-contrast
enhance or reduce the image contrast
This option enhances the intensity differences between the lighter and darker elements of the image. Use -contrast to enhance the image or +contrast to reduce the image contrast. For a more pronounced effect you can repeat the option, for Ex: docCreator.ConvertImageParam=" -contrast -contrast "
-crop <width>x<height>{+-}<x>{+-} <y>{%}
preferred size and location of the cropped image
See -geometry for details about the geometry specification.
The width and height give the size of the image that remains after cropping, and x and y are offsets that give the location of the top left corner of the cropped image with respect to the original image. To specify the amount to be removed, use -shave instead.
If the x and y offsets are present, a single image is generated, consisting of the pixels from the cropping region. The offsets specify the location of the upper left corner of the cropping region measured downward and rightward with respect to the upper left corner of the image.
If the x and y offsets are omitted, a set of tiles of the specified geometry, covering the entire input image, is generated. The rightmost tiles and the bottom tiles are smaller if the specified geometry extends beyond the dimensions of the input image
-dither
apply Floyd/Steinberg error diffusion to the image
The basic strategy of dithering is to trade intensity resolution for spatial resolution by averaging the intensities of several neighboring pixels. Images which suffer from severe contouring when reducing colors can be improved with this option.
The -colors or -monochrome option is required for this option to take effect.
-density <width>x<height>
horizontal and vertical resolution in pixels of the image
This option specifies the image resolution to store while encoding a raster image. The default unit of measure is in dots per inch (DPI).
The default resolution is 72 dots per inch, which is equivalent to one point per pixel (Macintosh and Postscript standard). Computer screens are normally 72 or 96 dots per inch while printers typically support 150, 300, 600, or 1200 dots per inch. To determine the resolution of your display, use a ruler to measure the width of your screen in inches, and divide by the number of horizontal pixels (1024 on a 1024x768 display).
If the file format supports it, this option may be used to update the stored image resolution. Note that Photoshop stores and obtains image resolution from a proprietary embedded profile. If this profile is not stripped from the image, then Photoshop will continue to treat the image using its former resolution, ignoring the image resolution specified in the standard file header.
The density option is an attribute and does not alter the underlying raster image. It may be used to adjust the rendered size for desktop publishing purposes by adjusting the scale applied to the pixels. To resize the image so that it is the same size at a different resolution, use the -resample option.
-depth <value>
depth of the image
This is the number of bits in a color sample within a pixel. The only acceptable values are 8 or 16. Use this option to specify the depth of raw images whose depth is unknown such as GRAY, RGB, or CMYK, or to change the depth of any image after it has been read.
-filter <type>
use this type of filter when resizing an image
Use this option to affect the resizing operation of an image (see -geometry). Choose from these filters: Point, Box, Triangle, Hermite, Hanning, Hamming, Blackman, Gaussian, Quadratic, Cubic, Catrom, Mitchell, Lanczos, Bessel and Sinc.
The default filter is automatically selected to provide the best quality while consuming a reasonable amount of time. The Mitchell filter is used if the image supports a palette, supports a matte channel, or is being enlarged, otherwise the Lanczos filter is used.
-geometry <width>x<height>{+-}<x>{+-} <y>{%}{@} {!}{<}{>}
preferred size and location of the Image.
By default, the width and height are maximum values. That is, the image is expanded or contracted to fit the width and height value while maintaining the aspect ratio of the image. Append an exclamation point to the geometry to force the image size to exactly the size you specify. For example, if you specify 640x480! the image width is set to 640 pixels and height to 480.
If only the width is specified, the width assumes the value and the height is chosen to maintain the aspect ratio of the image. Similarly, if only the height is specified (e.g., -geometry x256), the width is chosen to maintain the aspect ratio.
To specify a percentage width or height instead, append %. The image size is multiplied by the width and height percentages to obtain the final image dimensions. To increase the size of an image, use a value greater than 100 (e.g. 125%). To decrease an image's size, use a percentage less than 100.
Use @ to specify the maximum area in pixels of an image.
Use > to change the dimensions of the image only if its width or height exceeds the geometry specification. < resizes the image only if both of its dimensions are less than the geometry specification. For example, if you specify '640x480>' and the image size is 256x256, the image size does not change. However, if the image is 512x512 or 1024x1024, it is resized to 480x480. Enclose the geometry specification in quotation marks to prevent the < or > from being interpreted by your shell as a file redirection.
-monochrome
transform the image to black and white
-page <width>x<height>{+-}<x>{+-} <y>{%}{!}{<}{>}
size and location of an image canvas
For convenience you can specify the page size by media (e.g. A4, Ledger, etc.). Otherwise, -page behaves much like -geometry (e.g. -page letter+43+43>).
This option is also used to place subimages when writing to a multi-image format that supports offsets, such as GIF89 and MNG. When used for this purpose the offsets are always measured from the top left corner of the canvas and are not affected by the -gravity option. To position a GIF or MNG image, use -page{+-}<x>{+-}<y> (e.g. -page +100+200). When writing to a MNG file, a -page option appearing ahead of the first image in the sequence with nonzero width and height defines the width and height values that are written in the MHDR chunk. Otherwise, the MNG width and height are computed from the bounding box that contains all images in the sequence. When writing a GIF89 file, only the bounding box method is used to determine its dimensions.
For a PostScript page, the image is sized as in -geometry and positioned relative to the lower left hand corner of the page by {+-}<xoffset>{+-}<y offset>. Use -page 612x792>, for example, to center the image within the page. If the image size exceeds the PostScript page, it is reduced to fit the page. The default page dimensions for a TEXT image is 612x792.
This option is used in concert with -density.
Use +page to remove the page settings for an image.
-quality <value>
JPEG/MIFF/PNG compression level
For the JPEG image format, quality is 0 (lowest image quality and highest compression) to 100 (best quality but least effective compression). The default quality is 75. Use the -sampling-factor option to specify the factors for chroma downsampling.
For the MIFF image format, quality/10 is the zlib compression level, which is 0 (worst but fastest compression) to 9 (best but slowest). It has no effect on the image appearance, since the compression is always lossless.
For the JPEG-2000 image format, quality is mapped using a non-linear equation to the compression ratio required by the Jasper library. This non-linear equation is intended to loosely approximate the quality provided by the JPEG v1 format. The default quality value 75 results in a request for 16:1 compression. The quality value 100 results in a request for non-lossy compression.
For the MNG and PNG image formats, the quality value sets the zlib compression level (quality / 10) and filter-type (quality % 10). Compression levels range from 0 (fastest compression) to 100 (best but slowest). For compression level 0, the Huffman-only strategy is used, which is fastest but not necessarily the worst compression.
The default is quality is 75, which means nearly the best compression with adaptive filtering. The quality setting has no effect on the appearance of PNG and MNG images, since the compression is always lossless.
For further information, see the PNG specification.
When writing a JNG image with transparency, two quality values are required, one for the main image and one for the grayscale image that conveys the alpha channel. These are written as a single integer equal to the main image quality plus 1000 times the opacity quality. For example, if you want to use quality 75 for the main image and quality 90 to compress the opacity data, use -quality 90075.
-region <width>x<height>{+-}<x>{+-} <y>
apply options to a portion of the image
-resample <horizontal>x<vertical>
Resample image to specified horizontal and vertical resolution
Resize the image so that its rendered size remains the same as the original at the specified target resolution. For example, if a 300 DPI image renders at 3 inches by 2 inches on a 300 DPI device, when the image has been resampled to 72 DPI, it will render at 3 inches by 2 inches on a 72 DPI device. Note that only a small number of image formats (e.g. JPEG, PNG, and TIFF) are capable of storing the image resolution. For formats which do not support an image resolution, the original resolution of the image must be specified via -density on the command line prior to specifying the resample resolution.
Note that Photoshop stores and obtains image resolution from a proprietary embedded profile. If this profile exists in the image, then Photoshop will continue to treat the image using its former resolution, ignoring the image resolution specified in the standard file header.
-rotate <degrees>{<}{>}
apply Paeth image rotation to the image
Use > to rotate the image only if its width exceeds the height. < rotates the image only if its width is less than the height. For example, if you specify -rotate "-90>" and the image size is 480x640, the image is not rotated. However, if the image is 640x480, it is rotated by -90 degrees. If you use > or <, enclose it in quotation marks to prevent it from being misinterpreted as a file redirection.
-sampling-factor <horizontal_factor>x<vertical_factor>
sampling factors used by JPEG encoder and YUV decoder/encoder.
This option specifies the sampling factors to be used by the JPEG encoder for chroma downsampling. If this option is omitted, the JPEG library will use its own default values. When reading or writing the YUV format, use -sampling-factor 2x1 to specify the 4:2:2 downsampling method.
-scale <geometry>
scale the image.
See -geometry for details about the geometry specification. -scale uses a simpler, faster algorithm. Offsets, if present in the geometry string, are ignored.
-sharpen <radius>{x<sigma>}
sharpen the image
Use a Gaussian operator of the given radius and standard deviation (sigma).
-shave <width>x<height>{%}
shave pixels from the image edges
Specify the width of the region to be removed from both sides of the image and the height of the regions to be removed from top and bottom.
-trim
trim an image
This option removes any edges that are exactly the same color as the corner pixels. Use -fuzz to make trim remove edges that are nearly the same color as the corner pixels.
-fuzz <distance>{%}
colors within this distance are considered equal
A number of algorithms search for a target color. By default the color must be exact. Use this option to match colors that are close to the target color in RGB space. For example, if you want to automatically trim the edges of an image with -trim but the image was scanned and the target background color may differ by a small amount. This option can account for these differences.
The distance can be in absolute intensity units or, by appending "%", as a percentage of the maximum possible intensity (255, 65535, or 4294967295).
Specify the watermark text.
Syntax
docCreator.StampMessage = msg
Data Type: String
Note: Can only be set prior to calling the Create or StampPDF methods.
Specify the watermark color.
Syntax
docConverter.StampFontColor = color
Example
docCreator.StampFontColor = "$000000"
Data Type: String
Note: Can only be set prior to calling the Create or StampPDF methods.
Specify the watermark font name.
Syntax
docCreator.StampFontName = name
Data Type: String
Note: Can only be set prior to calling the Create or StampPDF methods.
Specify the watermark font size.
Syntax
docCreator.StampFontSize = size
Data Type: Integer
Note: Can only be set prior to calling the Create or StampPDF methods.
Specify the watermark orientation.
Syntax
docCreator.StampRotate = degree
Data Type: String
Note: Can only be set prior to calling the Create or StampPDF methods.
Specify the pages to place watermark on.
Note: page numbers must be separated by commas. To place watermark on all pages specify 0.
Syntax
docCreator.StampPages = pages
Example
docCreator.StampPages = "1,3,7"
(will place watermark on pages 1, 3 and 7)
Data Type: String
Note: Can only be set prior to calling the Create or StampPDF methods.
Specify the watermark x coordinate.
Syntax
docCreator.StampX = xCoordinate
Data Type: Integer
Note: Can only be set prior to calling the Create or StampPDF methods.
Specify the watermark y coordinate.
Syntax
docCreator.StampY = yCoordinate
Data Type: Integer
Note: Can only be set prior to calling the Create or StampPDF methods.
Specify the watermark opacity.
Syntax
docCreator.StampOpacity = Value
Data Type: Integer
Note: Can only be set prior to calling the Create or StampPDF methods. Will have effect only if PDFCompatibilityLevel="1.4" or higher.
Specify whether to place the watermark/stationery as stamp (over the page content) or as watermark (behind the page content).
Possible values:
true (place as watermark);
false (place as stamp);
Syntax
docCreator.Watermark = Value
Data Type: Boolean
Note: Can only be set prior to calling the Create or StampPDF methods.
Specify a PDF file to use as stationery.
Syntax
docCreator.StationeryFile = "c:\stationery.pdf"
Data Type: String
Note: Can only be set prior to calling the Create method.
Specify the pages to place stationery on.
Note: page numbers must be separated by commas. To place stationery on all pages specify 0.
Syntax
docCreator.StationeryPages = pages
Example
docCreator.StationeryPages = "1,3,7"
(will place stationery on pages 1, 3 and 7)
Data Type: String
Note: Can only be set prior to calling the Create method.
Sets the Attribute field in the PRINTERINFO2 structure (see MSDN).
Syntax
docCreator.PrinterAtribute = value
Data Type: Long
Note: Can only be set prior to calling the StartPrinting or CreateStaticPrinter methods.
Overrides the Paper Width property of the virtual printer.
Syntax
docCreator.PaperWidth = value
Data Type: Integer
Note: Can only be set prior to calling the StartPrinting method.
Override the Paper Length property of the virtual printer.
Syntax
docCreator.PaperLength = value
Data Type: Integer
Note: Can only be set prior to calling the StartPrinting method.
Override the Paper Orientation property of the virtual printer.
Possible values:
1 - Portrait
2 - Landscape
Syntax
docCreator.Orientation = value
Data Type: Integer
Note: Can only be set prior to calling the StartPrinting method.
Override the Scaling property of the virtual printer.
Possible values: 1...1000 (100 means 100%)
Syntax
docCreator.Scaling = value
Data Type: String
Note: Can only be set prior to calling the StartPrinting method.
Override the Color property of the virtual printer.
Possible values:
1 - Monochrome printing
2 - Color printing
Syntax
docCreator.Color = value
Data Type: String
Note: Can only be set prior to calling the StartPrinting method.
Override the Duplex property of the virtual printer.
Possible values:
1 – None (simplex)
2 – Vertical duplex
3 – Horizontal duplex
Syntax
docCreator.Duplex = value
Data Type: String
Note: Can only be set prior to calling the StartPrinting method.
Override the Print Quality property of the virtual printer.
Possible values:
-1 - Draft
-2 - Low
-3 - Medium
-4 - High
Syntax
docCreator.PrintQuality = value
Data Type: Integer
Note: Can only be set prior to calling the StartPrinting method.
Override the Paper Size property of the virtual printer.
Possible values:
1 - Letter, 8 1/2 x 11 in.
2 - Letter Small, 8 1/2 x 11 in.
3 - Tabloid, 11 x 17 in.
4 - Ledger, 17 x 11 in.
5 - Legal, 8 1/2 x 14 in.
6 - Statement, 5 1/2 x 8 1/2 in.
7 - Executive, 7 1/2 x 10 1/2 in.
8 - A3, 297 x 420 mm
9 - A4, 210 x 297 mm
10 - A4 Small, 210 x 297 mm
11 - A5, 148 x 210 mm
12 - B4, 250 x 354 mm
13 - B5, 182 x 257 mm
14 - Folio, 8 1/2 x 13 in.
15 - Quarto, 215 x 275 mm
16 - 10 x 14 in.
17 - 11 x 17 in.
18 - Note, 8 1/2 x 11 in.
19 - Envelope #9, 3 7/8 x 8 7/8 in.
20 - Envelope #10, 4 1/8 x 9 1/2 in.
21 - Envelope #11, 4 1/2 x 10 3/8 in.
22 - Envelope #12, 4 1/2 x 11 in.
23 - Envelope #14, 5 x 11 1/2 in.
24 - C size sheet
25 - D size sheet
26 - E size sheet
27 - Envelope DL, 110 x 220 mm
29 - Envelope C3, 324 x 458 mm
30 - Envelope C4, 229 x 324 mm
28 - Envelope C5, 162 x 229 mm
31 - Envelope C6, 114 x 162 mm
32 - Envelope C65, 114 x 229 mm
33 - Envelope B4, 250 x 353 mm
34 - Envelope B5, 176 x 250 mm
35 - Envelope B6, 176 x 125 mm
36 - Envelope, 110 x 230 mm
37 - Envelope Monarch, 3 7/8 x 7 1/2 in.
38 - Envelope, 3 5/8 x 6 1/2 in.
39 - U.S. Standard Fanfold, 14 7/8 x 11 in.
40 - German Standard Fanfold, 8 1/2 x 12 in.
41 - German Legal Fanfold, 8 1/2 x 13 in.
Syntax
docCreator.PaperSize = value
Data Type: Integer
Note: Can only be set prior to calling the StartPrinting method.
Override the TrueType Font handling property of the virtual printer.
Possible values:
1 - Download as bitmap
2 - Download as softfont
3 - Substitute with device fonts where possible and download others
Syntax
docCreator.TrueTypeOption = value
Data Type: Integer
Note: Can only be set prior to calling the StartPrinting method.
Return the Printer Name to be used by your application. Read Only.
Syntax
value = docCreator.NewPrinterName
Data Type: String
Return the path to the intermediate PostScript file that is generated. Read Only.
Syntax
value = docCreator.NewPortName
Data Type: String
Return the temporary folder name. Read Only.
Syntax
value = docCreator.GetTempDirectory
Data Type: String
Specify the printer driver to use. Write Only.
Default value: "Neevia docCreator"
Syntax
docCreator.PrinterDriver = value
Data Type: String
(available only in Windows NT/2000/XP/2003)
Log in and impersonate a user.
Syntax
Res = docCreator.ImpersonateUser(Domain, UserID, Password)
Remarks
Res<>0 on error.
Note:
(available only in Windows NT/2000/XP/2003)
Revert the logon to whatever the state was prior to calling ImpersonateUser method.
Syntax
docCreator.RevertToSelf
Return the default system printer.
Syntax
value = docCreator.GetDefaultPrinter
Set the default system printer.
Syntax
Res = docCreator.SetDefaultPrinter(printerName)
Remarks
Res<>0 on error.
(available only in Windows NT/2000/XP/2003)
This method will create a new virtual printer.
Syntax
Res = docCreator.StartPrinting()
Remarks
Res<>0 on error.
If you get an error calling StartPrinting method make sure that the user account you are calling docCreator from is a member of the local admin group OR use the docCreator DCOM interface instead of the COM.
(available only in Windows NT/2000/XP/2003)
Call this method when your application has completed printing to clear up the virtual printer and the variables that have been created by StartPrinting method.
Syntax
Res = docCreator.StopPrinting()
Remarks
Res<>0 on error.
(available only in Windows NT/2000/XP/2003)
Create a new system printer based on “Neevia docCreator” printer driver.
Syntax
Res = docCreator.CreateStaticPrinter (PrinterName, PortName)
Data Type: Long.
Remarks
Res<>0 on error.
(available only in Windows NT/2000/XP/2003)
Delete a printer from the system.
Syntax
Res = docCreator.DeleteStaticPrinter (PrinterName)
Data Type: Long.
Remarks
Res<>0 on error.
(available only in Windows NT/2000/XP/2003)
Delete a printer port from the system.
Syntax
Res = docCreator.DeletePrinterPort(PrinterPortName)
Data Type: Long.
Remarks
Res<>0 on error.
Get the specified printer port name.
Syntax
result = docCreator.GetPrinterPort(printerName)
Data Type: String
Replace the printer port.
Syntax
Res = docCreator.ChangePrinterPort(printerName, portName)
Data Type: Long
Remarks
Res<>0 on error.
Specify the input document (must be PostScript, EPS or PDF) to be converted into PostScript, PDF, EPS, JPG, PNG, BMP, PCX, TIFF, PSD, PCL-XL or TXT. Use this method together with Create method.
Syntax
Res = docCreator.SetInputDocument(FileName)
Data Type: String.
Return Codes
0 - success
-6 no input document was specified;
-3 invalid input path or input file doesn’t exist;
-1 corrupted docCreator installation. Reinstall docCreator;
???- all other return codes are system errors;
Call this method to create the output document.
Syntax
Res = docCreator.Create
Return codes
1- there was an error parsing the input document – most likely it is corrupt;
0 – success;
-1 corrupted docCreator installation. Reinstall docCreator;
-2 invalid DocumentOutputName;
-3 invalid input document;
-4 can't copy the temporary file into the output folder – check if the user account you are calling docCreator from has write permissions on the output folder;
???- all other return codes are system errors;
Note: this method has to be used together with StartPrinting or SetInputDocument methods.
This method converts an image into a different image format.
Note: this method requires Image Conversion Pack (http://neevia.com/prods/imgPack.exe) to be installed. See the ConvertImageParam property for the advanced image conversion parameters.
Syntax
Res = docCreator.ConvertImage(inputFileName, outputFileName)
Remarks
Res<>0 on error.
Tip: To convert a bmp image into a PDF document, first convert it into a PostScript document using ConvertImage method and then convert the resulting PostScript document into PDF.
Examples
To convert a JPEG image to a BMP raster image, use:
docCreator.ConvertImage "image.jpg", "image.bmp"
To convert a TIFF image to a PostScript document, use:
docCreator.ConvertImage "image.tiff", "image.ps"
To convert a BMP image into a PostScript document, use:
docCreator.ConvertImage "image.bmp", "image.ps"
ConvertImage method recognizes the following image formats:
AVS - AVS X image file
BMP - MS Windows
Bitmap image file
BMP - OS/2 Bitmap
DCX - ZSoft IBM PC multi-page Paintbrush file
DIB - MS Windows Device Independent Bitmap
DPX - Digital
Moving Picture Exchange
FAX – Group 3 FAX encoding
FITS - Flexible Image Transport System
FPX - FlashPix Format
GIF - CompuServe graphics interchange format
GIF87 - CompuServe graphics interchange format ver 87
ICO - MS Windows Icons
ICO - OS/2 Icons
IPTC
- Newswire
profile
JBIG - Joint Bi-level Image experts Group file interchange format
JP2 - JPEG-2000
JP2 File Format Syntax
JPEG - Joint Photographic Experts Group JFIF format
JPG - Joint Photographic Experts Group JFIF format
MIFF – Magick image file format
MNG - Multiple-image Network Graphics
MPC - Magick Persistent Cache image file format
MTV - MTV Raytracing image format
OTB - On-the-air Bitmap
PBM - Portable
Bitmap
PCD - Kodak PhotoCD - Base/16, Base/4 and Base only
PCDS - Kodak
PhotoCD - Base/16, Base/4 and Base only
PCT - MacIntosh PICT
PCX - PC PaintBrush
PGM - Portable GrayMap
PICT - Apple Macintosh QuickDraw/PICT file
PNG - Portable Network Graphics
PNM - Portable Any Bitmap
PPM - Portable PixelMap
PSD - Adobe Photoshop
P7 - Xv's visual schnauzer format
RAS - Raster Sun Microsystems
RGBA
- Raw
red, green, blue, and matte samples
SGI - Irix RGB image file
SUN - Raster SunMicrosystems
TGA - TrueVision Targa
TIFF - Tagged Interchange File Format
VICAR – V.I.C.A.R. Image file format
VID - Visual Image Directory
VIFF - Khoros Visualization image file
WMF - Windows Meta File
XBM – X Windows system bitmap, black and white only
XPM - X Windows system pixmap file (color)
XWD - X Windows system window dump file (color)
Call this method to convert a PostScript file into PDF.
Syntax
Res = docCreator.PostScriptToPdf(Inputfile, OutputFile)
Remarks
Res<>0 on error.
Call this method to convert an image file into PDF.
Syntax
Res = docCreator.ImageToPdf(Inputfile, OutputFile)
Remarks
Res<>0 on error.
Note: this method requires Image Conversion Pack (http://neevia.com/prods/imgPack.exe) to be installed.
Add a PDFmark to the list to be inserted in the output PDF document.
Note: this method will have effect only if the DocumentOutputFormat="PDF".
Syntax
docCreator.AddPDFMark("pdfmark string")
Examples
To add a bookmark to the output PDF document use:
docCreator.AddPDFMark “[/Page pageNumber /View [/XYZ null null 0] /Count 1 /Title (string) /OUT PDFmark“
To add a hyperlink to the output PDF document use:
docCreator.AddPDFMark “[/Rect [ 50 425 295 445 ] /Action << /Subtype /URI /URI (http://neevia.com) >> /Border [ 0 0 2 ] /Color [ .7 0 0 ] /Subtype /Link /ANN PDFmark“
Clear out the PDF Marks added by AddPDFMarks method.
Syntax
docCreator.ClearPDFMarks
Return the number of pages in a PostScript, PDF or TIFF file.
Syntax
value = docCreator.GetNumPages(filename)
Data Type: Long
Encrypt an existing PDF file.
Note: in the trial version the PDF files will be encrypted with “neevia” as user and owner passwords.
Syntax
Res = docCreator.EncryptPDF(fileName)
Remarks
Res<>0 on error.
Decrypt an existing PDF file.
Syntax
Res = docCreator.DecryptPDF(fileToDecrypt, decryptedFile, userPassword)
Parameters
fileToDecrypt – The full path to the file that needs to be decrypted.
decryptedFile – The full path to the decrypted file.
userPassword – The user password to be used in the decoding.
Remarks
Res<>0 on error.
Merge two PDF files.
Syntax
Res = docCreator.MergePDF(firstFile, secondFile, destinationFile)
Remarks
Res<>0 on error.
Merge two PDF files.
Syntax
Res = docCreator.MergePDFEx(firstFile, secondFile, destinationFile, advParams)
Remarks
Res<>0 on error.
Here is the list of advParams you can pass to MergePDFEx:
-a Force the viewer application to provide appearances for form fields;
-b Create bookmarks in output file for each input file (at each round);
-o Retain original bookmarks structure in its entirety;
-u Use full path names when resolving cross-file links; use with –o;
-y Import original bookmarks only; do not create new top-level bookmarks;
-c Copy original page labels in output file;
-g=? Open page and magnification. Value is page number and magnification joined by
@ sign, such as "2@150" to set as page 2 at 150%;
-k Insert blank pages to make first pages of files start on odd numbers;
-p=? Text to be printed on the inserted page. If not specified, will be “This page is intentionally kept blank”. The font is always 10pt Helvetica;
-l=? Label all pages, such as "i-iv, TOC 1-3, Content 8-" (last section can be open);
-m Page mode (0: normal, 1: show bookmarks, 2: show thumbnails, 3: full screen);
-r Rename form fields by adding a prefix, when name collision occurs;
-t=? Document title;
Examples
Merge two files and retain all original bookmarks
Res = docCreator.MergePDFEx("c:\file1.pdf","c:\file2.pdf","c:\out.pdf"," –b –o –u ")
Merge multiple PDF files into one.
Syntax
Res = docCreator.MergeMultiplePDF(filesToMerge, destinationFile)
Parameters
filesToMerge – The input PDF files – file names must be separated by +.
destinationFile – The output PDF file name.
Example
Res = docCreator.MergeMultiplePDF("c:\t1.pdf+c:\t2.pdf+c:\t3.pdf","c:\o.pdf")
Remarks
Res<>0 on error.
Merge multiple PDF files into one.
Syntax
Res = docCreator.MergeMultiplePDFEx(filesToMerge, destinationFile, advParams)
Parameters
filesToMerge – The input PDF files – file names must be separated by +.
destinationFile – The output PDF file name.
advParams – Advanced parameters – see the MergePDFEx method for more info.
Example
Res = docCreator.MergeMultiplePDFEx("c:\t1.pdf+c:\t2.pdf+c:\t3.pdf","c:\o.pdf"," –b –o –u ")
Remarks
Res<>0 on error.
Stamp an existing PDF.
Syntax
Res = docCreator.StampPDF(inputfile, destinationFile)
Example
Res = docCreator.StampPDF("c:\t1.PDF ","c:\out.PDF")
Remarks
Res<>0 on error.
Split an existing PDF.
Syntax
Res = docCreator.SplitPDF(inputfile, destinationFolder)
Example
Res = docCreator.SplitPDF("c:\t1.PDF ","c:\ ")
Remarks
Res<>0 on error.
Extract pages from an existing PDF file.
Syntax
Res = docCreator.ExtractPDFPages(extractFrom, extractInto, firstPage, lastPage)
Parameters
extractFrom – The input PDF file name.
extractInto – The output file name.
firstPage – Extract from this page.
lastPage – Extract to this page.
Example
Res = docCreator.ExctractPDFPages("c:\in.PDF","c:\out.PDF",1,4)
(this will extract pages 1,2,3 and 4 from c:\in.PDF into c:\out.PDF.)
Remarks
Res<>0 on error.
Extract information (such as Number of Pages, Page Media Width, etc.) from an existing PS/PDF document.
Syntax
Res = docCreator.ExtractFileInfo(inputFileName)
Data Type: String.
Remarks
Res<>0 on error.
Check if the PDF file is encrypted.
Syntax
result = docCreator.isFileEncrypted( fileName )
Data Type: Bool.
Fill forms in the PDF file.
Syntax
Res = docCreator.FillPDF(inputfile, outputfile)
Example
Res = docCreator.FillPDF("c:\in.pdf ","c:\out.pdf")
Remarks
Use SetFormFieldData to set the form field data.
Res<>0 on error.
Set form data.
Syntax
Res = docCreator.SetFormFieldData(FieldName, Data)
Example
docCreator.FillPDFEx("CompanyName","Neevia.com")
Add a TIFF file to the list of the files to be merged by the MergeTiff method.
Syntax
Res = docCreator.AddTiffToList(TiffFileName)
Data Type: String.
Remarks
Res<>0 on error.
Clear the TIFF files merging list.
Syntax
Res = docCreator.ClearTiffList
Remarks
Res<>0 on error.
Merge Tiff files.
Syntax
Res = docCreator.MergeTiff(outputFileName)
Example
docCreator.ClearTiffList
docCreator.AddTiffToList("c:\file1.tif ")
docCreator.AddTiffToList("c:\file2.tif ")
Res = docCreator.MergeTiff("c:\out.tif ")
Data Type: String.
Remarks
Res<>0 on error.
Split an existing TIFF file.
Syntax
Res = docCreator.SplitTiff(inputFile, destinationFolder)
Example
Res = docCreator.SplitTiff("c:\t1.tif ","c:\out\")
Remarks
Res<>0 on error.
Set the docCreator TEMP folder.
Syntax
Res = docCreator.SetTempFolder(FolderPath)
Example
docCreator. SetTempFolder ("c:\temp\")
Delete file from disk.
Syntax
result = docCreator.FileDelete( filename )
Data Type: Bool.
Check if the file is locked by some application.
Syntax
result = docCreator.FileInUse( filename )
Data Type: Bool.
Check if the file exists.
Syntax
result = docCreator.FileExists( filename )
Data Type: Bool.
Copy file to destination.
Syntax
result = docCreator.FileCopy( inputfile, outputfile)
Data Type: Bool.
For more code samples visit http://neevia.com/support/examples/cr/
Sub HelloWorld()
Dim DC : Set DC = CreateObject("docCreator.docCreatorClass")
Dim RVal : RVal = DC.StartPrinting
If (RVal <> 0) Then
MsgBox "Error while calling StartPrinting method!!!"
Exit Sub
End If
Dim printerFound : printerFound = False
Dim objPrinter
For Each objPrinter In Printers
If objPrinter.DeviceName = DC.NewPrinterName Then
printerFound = True
Set Printer = objPrinter
Exit For
End If
Next
If Not printerFound Then
MsgBox "Printer not found!!!"
DC.StopPrinting
Exit Sub
End If
DC.DocumentOutputFormat = "PDF"
DC.DocumentOutputName = "demoVB"
DC.DocumentOutputFolder = "c:\"
Printer.FontName = "Times New Roman"
Printer.FontSize = 48
Printer.Print "Hello from Visual Basic!!!"
Printer.EndDoc
RVal = DC.Create ' Create output document
If (RVal <> 0) Then MsgBox "Error while creating document!!!"
RVal = DC.StopPrinting
If (RVal <> 0) Then MsgBox "Error while calling StopPrinting method!!!"
Set DC = Nothing
MsgBox "Done !!!"
End Sub
Note: MS Word must be installed
Sub WordConverter()
Dim docToConvert : docToConvert="c:\test.doc"
Dim DC : Set DC = CreateObject("docCreator.docCreatorClass")
Dim tempFile : tempFile= DC.GetTempDirectory & DC.NewGUID & ".ps"
DC.DocumentOutputFormat = "PDF"
DC.DocumentOutputName = "demoDOC_VB"
DC.DocumentOutputFolder = "c:\"
Dim MSWord : Set MSWord = CreateObject("Word.Application")
MSWord.DisplayAlerts = False
On Error Resume Next
Dim NewDoc
Set NewDoc = MSWord.Documents.Open(docToConvert, False, True)
If Err<>0 Then
Set MSWord = Nothing
Exit Sub
End If
Dim MSWordDialog : Set MSWordDialog = MSWord.Dialogs(97)
MSWordDialog.Printer = "Neevia docCreator"
MSWordDialog.DoNotSetAsSysDefault = 1
MSWordDialog.Execute
NewDoc.PrintOut False,,,tempFile,,,,,,,true
NewDoc.Close False
MSWord.Quit False
Set MSWord = Nothing
DC.SetInputDocument tempFile
Dim RVal : RVal = DC.Create ' Create output document
If (RVal <> 0) Then MsgBox "Error while creating document!!!"
DC.FileDelete tempFile
Set DC = Nothing
MsgBox "Done converting !!!"
End Sub
Note: MS Excel must be installed
Sub ExcelConverter()
Dim docToConvert : docToConvert="c:\test.xls"
Dim DC : Set DC = CreateObject("docCreator.docCreatorClass")
Dim tempFile : tempFile= DC.GetTempDirectory & DC.NewGUID & ".ps"
DC.DocumentOutputFormat = "PDF"
DC.DocumentOutputName = "demoXLS"
DC.DocumentOutputFolder = "c:\"
Dim MSExcel : Set MSExcel = CreateObject("Excel.Application")
MSExcel.DisplayAlerts = False
Dim XLDoc : Set XLDoc = MSExcel.Workbooks.Open(docToConvert, 0, True)
XLDoc.Activate
XLDoc.PrintOut ,,, False, "Neevia docCreator", True, 0, tempFile
XLDoc.Saved = True
XLDoc.Close
MSExcel.Quit
Set MSExcel = Nothing
DC.SetInputDocument tempFile
Dim RVal : RVal = DC.Create ' Create output document
If (RVal <> 0) Then MsgBox "Error while creating document!!!"
DC.FileDelete tempFile
Set DC = Nothing
MsgBox "Done converting !!!"
End Sub
Note: MS PowerPoint must be installed
Sub PowerPointConverter()
Dim documentToConvert : documentToConvert="c:\test.ppt"
Dim DC : Set DC = CreateObject("docCreator.docCreatorClass")
Dim tempFile : tempFile= DC.GetTempDirectory & DC.NewGUID & ".ps"
DC.DocumentOutputFormat = "PDF"
DC.DocumentOutputName = "demoPPT"
DC.DocumentOutputFolder = "c:\"
Dim MSPowerPoint
Set MSPowerPoint = CreateObject("PowerPoint.Application")
Dim PPTDoc
Set PPTDoc = MSPowerPoint.Presentations.Open(documentToConvert, -1, 0, 0)
PPTDoc.PrintOptions.PrintInBackground=0
PPTDoc.PrintOptions.PrintColorType=1
PPTDoc.PrintOptions.ActivePrinter="Neevia docCreator"
PPTDoc.PrintOut 0, 9999, tempFile, 1, 0
PPTDoc.Close
MSPowerPoint.Quit
Set MSPowerPoint = Nothing
DC.SetInputDocument tempFile
DC.PDFAutoRotatePage = "PageByPage"
Dim RVal : RVal = DC.Create ' Create output document
If (RVal <> 0) Then MsgBox "Error while creating document!!!"
DC.FileDelete tempFile
Set DC = Nothing
MsgBox "Done converting !!!"
End Sub
Note: MS Access must be installed
Sub AccessConverter()
Dim DC
Set DC = CreateObject("docCreator.docCreatorClass")
DC.DocumentOutputFormat = "PDF"
DC.DocumentOutputName = "demoAccess"
DC.DocumentOutputFolder = "c:\"
Dim RVal : RVal = DC.StartPrinting
If (RVal <> 0) Then MsgBox "Error while calling StartPrinting method!!!"
Dim objAccess
Set objAccess = CreateObject("Access.Application")
Dim defPrinter : defPrinter=DC.GetDefaultPrinter
DC.SetDefaultPrinter DC.NewPrinterName
objAccess.OpenCurrentDatabase "c:\access.mdb", true
objAccess.DoCmd.OpenReport "rptCatalog", 0
'rptCtatalog is the repport name
objAccess.Quit 2
Set objAccess=nothing
DC.SetDefaultPrinter defPrinter
DC.DocumentResolution = 300
RVal = DC.Create ' Create output document
If (RVal <> 0) Then MsgBox "Error. Create returns "+CStr(Rval)
RVal = DC.StopPrinting
If (RVal <> 0) Then MsgBox "Error while calling StopPrinting method!!!"
Set DC = Nothing
MsgBox "Done converting!!!"
End Sub
Note: WordPerfect must be installed
Sub WPConverter()
Dim docToConvert : docToConvert="c:\test.wpd"
Dim objWordPerfect
Set objWordPerfect = CreateObject("WordPerfect.PerfectScript")
objWordPerfect.AppMaximize
objWordPerfect.Backup 0
objWordPerfect.BackupOriginalDoc 0
objWordPerfect.PerfectExpert 0
Dim DC : Set DC = CreateObject("docCreator.docCreatorClass")
objWordPerfect.FileOpen docToConvert
DC.doSleep(100)
DC.documentOutputFormat="PDF"
DC.documentOutputFolder="c:\"
DC.documentOutputName="demoWP"
Dim RVal : RVal = DC.StartPrinting
If (RVal <> 0) Then
MsgBox "Error while calling StartPrinting method!!!"
Exit Sub
End If
objWordPerfect.PrintTo docToConvert, DC.NewPrinterName
RVal = DC.Create ' Create output document
If (RVal <> 0) Then MsgBox "Error while creating document!!!"
objWordPerfect.CloseNoSave 0
objWordPerfect.Quit
RVal = DC.StopPrinting
If (RVal <> 0) Then MsgBox "Error while calling StopPrinting method!!!"
Set objWordPerfect=Nothing
Set DC=Nothing
MsgBox "Done converting!!!"
End Sub
Note: MS Internet Explorer must be installed
Sub IEConverter()
Dim IE : Set IE = CreateObject("InternetExplorer.Application")
IE.Visible=true
Dim DC : Set DC = CreateObject("docCreator.docCreatorClass")
IE.navigate2 "http:\\www.neevia.com"
DC.doSleep(100)
While (IE.ReadyState<>4) or (IE.Busy)
DC.doSleep(100)
Wend
DC.DocumentOutputFormat="PDF"
DC.DocumentOutputFolder="c:\"
DC.DocumentOutputName="testURL"
Dim RVal : RVal=DC.StartPrinting
If (RVal <> 0) Then MsgBox "Error while creating the virtual printer!!!"
Dim defPrinter : defPrinter = DC.GetDefaultPrinter
DC.SetDefaultPrinter(DC.NewPrinterName)
IE.ExecWB 6,2
RVal = DC.Create
If (RVal <> 0) Then MsgBox "Error while creating document!!!"
IE.Quit
DC.SetDefaultPrinter(defPrinter)
RVal=DC.StopPrinting
If (RVal <> 0) Then MsgBox "Error while deleting the virtual printer!!!"
Set IE=Nothing
Set DC=Nothing
MsgBox "Done converting !!!"
End Sub
This example shows how to use docCreator to convert a PostScript file into PDF.
Sub PostScriptConverter()
Dim documentToConvert : documentToConvert="c:\test.ps"
Dim outputFile : outputFile = "c:\out.pdf"
Dim DC : Set DC = CreateObject("docCreator.docCreatorClass")
Dim RVal : RVal = DC.PostScriptToPDF(documentToConvert, outputFile)
If (RVal <> 0) Then MsgBox "Error while converting the document!!!"
Set DC = Nothing
MsgBox "Done converting !!!"
End Sub
This example shows how to use docCreator to convert a TIFF file into PDF.
Sub TIFFConverter()
Dim documentToConvert : documentToConvert="c:\test.tif"
Dim outputFile : outputFile = "c:\out.pdf"
Dim DC : Set DC = CreateObject("docCreator.docCreatorClass")
DC.ConvertImage documentToConvert, documentToConvert & ".ps"
Dim RVal : RVal = DC.PostScriptToPDF(documentToConvert & ".ps", outputFile)
If (RVal <> 0) Then MsgBox "Error while creating document!!!"
DC.FileDelete documentToConvert & ".ps"
Set DC = Nothing
MsgBox "Done converting!!!"
End Sub
This example shows how to use docCreator to convert a PDF file into TIFF.
Sub PDFConverter()
Dim documentToConvert : documentToConvert="c:\test.pdf"
Dim DC : Set DC = CreateObject("docCreator.docCreatorClass")
DC.DocumentOutputName="testTIFF"
DC.DocumentOutputFolder="c:\"
DC.DocumentOutputFormat="TIF"
DC.MPTiff=true
DC.SetInputDocument documentToConvert
Dim RVal : RVal = DC.Create
If (RVal <> 0) Then MsgBox "Error while creating document!!!"
Set DC = Nothing
MsgBox "Done converting!!!"
End Sub
This example shows how to use docCreator to convert 3 TIFF files into one PDF document.
Sub TIFFConverter()
Dim DC : Set DC = CreateObject("docCreator.docCreatorClass")
Dim Images(3)
Images(0)="c:\test1.tif"
Images(1)="c:\test2.tif"
Images(2)="c:\test3.tif"
Dim RVal
For I=0 to UBound(Images)-1
DC.ConvertImage Images(I), "c:\out"& I &".ps"
DC.DocumentOutputFormat = "PDF"
DC.DocumentOutputFolder = "c:\"
DC.DocumentOutputName = "out"& I
RVal = DC.SetInputDocument("c:\out"& I &".ps")
RVal = DC.Create ' Create output document
If (RVal <> 0) Then MsgBox "Error while creating document!!!"
DC.FileDelete "c:\out"& i &".ps"
Next
For I=1 to UBound(Images)-1
DC.MergePDF "c:\out"& i-1 &".PDF", "c:\out"& I &".PDF", "c:\out"& I &".PDF"
DC.FileDelete "c:\out"& i-1 &".PDF"
Next
Set DC = Nothing
MsgBox "Done converting!!!"
End Sub
This example shows how to use docCreator to encrypt an existing PDF document.
Sub PDFEncrypt()
Dim DC : Set DC = CreateObject("docCreator.docCreatorClass")
DC.PDFEncryption = true
DC.PDFEncryptionType = 40
DC.PDFOwnerPassword = "test"
DC.PDFUserPassword = "test"
DC.PDFNoCopyPermission = true
DC.PDFNoPrintPermission = true
DC.PDFNoChangePermission = true
DC.PDFNoAddPermission = true
Dim RVal : RVal=DC.EncryptPDF("c:\test.pdf")
If (RVal<>0) Then
MsgBox "There was an error encrypting the document!!!"
Else
MsgBox "Done encrypting !!!"
End If
Set DC = Nothing
End Sub
This example shows how to use docCreator to encrypt an existing PDF document.
Sub PDFEncrypt()
Dim DC : Set DC = CreateObject("docCreator.docCreatorClass")
DC.PDFEncryption = true
DC.PDFEncryptionType = 128
DC.PDFOwnerPassword = "test"
DC.PDFUserPassword = "test"
DC.PDFContentAccess = false
DC.PDFAllowExtraction = false
DC.PDFChangesAllowed = 0
DC.PDFPrintingPermissions = 0
Dim RVal : RVal=DC.EncryptPDF("c:\test.pdf")
If (RVal<>0) Then
MsgBox "There was an error encrypting the document!!!"
Else
MsgBox "Done encrypting !!!"
End If
Set DC = Nothing
End Sub
This example shows how to use docCreator to extract text from an existing PDF file.
Sub ExtractText()
Dim DC : Set DC = CreateObject("docCreator.docCreatorClass")
DC.SetInputDocument "c:\test.pdf"
DC.DocumentOutputFormat="TXT"
DC.DocumentOutputName="test"
DC.DocumentOutputFolder="c:\"
Dim RVal : RVal = DC.Create
If (RVal <> 0) Then MsgBox "Error while parsing the PDF file!!!"
Set DC = Nothing
MsgBox "Done !!!"
End Sub
This example shows how to use docCreator to merge 2 existing PDF files.
Sub MergePDFs()
Dim DC : Set DC = CreateObject("docCreator.docCreatorClass")
Dim RVal : RVal = DC.MergePDF("c:\file1.pdf","c:\file2.pdf", "c:\out.pdf")
Set DC = Nothing
If RVal<>0 Then
MsgBox "There was an error merging!!!"
Else
MsgBox "Done!!!"
End If
End Sub
This example shows how to use docCreator to extract a page from an existing PDF document.
Sub ExtractPage()
Dim pageToExtract : pageToExtract=2
Dim DC : Set DC = CreateObject("docCreator.docCreatorClass")
Dim RVal
RVal = DC.ExtractPDFPages("c:\test.pdf","c:\page.pdf", pageToExtract, pageToExtract)
Set DC = Nothing
If RVal=0 Then
MsgBox "Done !!!"
Else
MsgBox "There was an error extracting the page !!!"
End If
End Sub
This example shows how to use docCreator to split an existing PDF file into single pages.
Sub SplitPDFs()
Dim DC : Set DC = CreateObject("docCreator.docCreatorClass")
Dim RVal : RVal=DC.SplitPDF("c:\test.pdf","c:\out\")
Set DC = Nothing
If RVal=0 Then
MsgBox "Done!!!"
Else
MsgBox "There was an error splitting the document!!!"
End If
End Sub
This example shows how to use docCreator to watermark an existing PDF file.
Sub StampPDF()
Dim DC : Set DC = CreateObject("docCreator.docCreatorClass")
DC.StampMessage = "Page {p} of {P}"
DC.StampRotate=0
DC.StampX = 100
DC.StampY = 100
DC.StampFontName = "Helvetica"
DC.StampFontSize = 14
DC.StampFontColor = "$000000"
DC.Watermark=false 'place the watermark as stamp (over the page content)
DC.StampPages = "0"
Dim RVal : RVal=DC.StampPDF("c:\test.pdf")
Set DC = Nothing
If RVal=0 Then
MsgBox "Done !!!"
Else
MsgBox "There was an error stamping the document!!!"
End If
End Sub
This example shows how to use docCreator to apply stationery to an existing PDF file.
Sub StampPDF()
Dim DC : Set DC = CreateObject("docCreator.docCreatorClass")
DC.StationeryFile = "c:\stat.pdf"
DC.StampRotate=0
DC.StampX = 0
DC.StampY = 0
DC.Watermark=false 'place the stationery as stamp (over the page content)
DC.StationeryPages = "0"
Dim RVal : RVal=DC.StampPDF("c:\test.pdf")
Set DC = Nothing
If RVal=0 Then
MsgBox "Done!!!"
Else
MsgBox "There was an error stamping the document!!!"
End If
End Sub