Neevia
PDFstamp
user’s manual
version 4.4
https://neeviaPDF.com/PDFstamp
ELECTRONIC END USER LICENSE AGREEMENT
For One (1) Computer
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 Tech. The term software includes upgrades, modified versions or updates. This software is licensed and not sold. Only a 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. COMPUTER/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 computers/servers must be licensed to utilize Neevia software.
b. VIRTUAL SERVER
This is a single computer or a virtual machine (a software implementation of a machine that executes programs like a physical machine) that is owned, rented or leased by an individual or entity that 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.
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 Tech.
THIS IS A CONTRACT BETWEEN YOU AND NEEVIA TECH. 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 TECH.
Subject to the payment of applicable license fees, Neevia Tech 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 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.
You cannot use a license for the software concurrently on different computers. You may install and use the Software in a single location on a hard disk or other storage device of one computer only.
(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) File Server or Network Use:
You may keep one copy of the Software on a single file server only for the purposes of downloading and installing the Software onto a hard disk of up to the Permitted Number of Computers that are on the same network as the file server. No other network use is permitted.
(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.
For all Neevia Tech products, you agree that you will only use our software on a server and all applications that will access the server will reside on the server and you will not permit remote access to the software except through your application residing on the server. 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 Tech harmless and will indemnify Neevia Tech for any such activity even if the violation is unintentional.
COPYRIGHT
The Software is owned by Neevia Tech 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 TECH 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 you or your company.
LIMITATION OF REMEDIES AND LIABILITY
NEEVIA TECH 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.
CONTACT INFORMATION
neeviaPDF.com
Tel: (954) 893.9343
Email: info@neeviaPDF.com
Installing and Uninstalling Neevia PDFstamp
How to register Neevia PDFstamp
Using the Command Line Interface to stamp PDF files
Using the Graphic User Interface to stamp PDF files
GUI tab - Graphic User Interface
Using the COM Interface to stamp PDF files
PDF Encryption related properties
PDF Initial View & Metadata related properties
Appendix B: Variables supported by Text / TextBox stamps
Example 1vb. Stamp a simple text watermark (Visual Basic)
Example 1delphi. Stamp a simple text watermark (Delphi)
Example 2vb. Stamp an image (Visual Basic)
Example 2delphi. Stamp an image (Delphi)
Before installing and/or using this product, please make sure you have carefully read the copyright notice and agreed to all of its terms. If you have any questions about the licensing agreement, feel free to call 1.954.981.9252 or send an email to sales@neeviaPDF.com.
To install Neevia PDFstamp:
download and save the http://neeviaPDF.com/prods/pdfstamp_setup.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 into your system directory and installs Neevia PDFstamp.
To perform an unattended (silent) installation launch the PDFstamp 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 Setup is very silent the 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 is not 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 PDFstamp from your system:
1. Select Settings -> Control Panel from the Start menu.
2. In the Control Panel click Add/Remove programs and select Neevia PDFstamp 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 PDFstamp 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.
After you downloaded the product run the installer and when you get prompted enter your registration info. If you do not have a serial number and simply want to test Neevia PDFstamp select "Evaluate Product" then click Finish.
To register via the graphic interface right click on PDFstamp.exe, select Run as Administrator, click About -> Register -> copy and paste your licensing info.
Neevia PDFstamp is a tool that can be used to stamp PDF files via command line, through a COM object, .NET Assembly or Graphic User Interface.
Supported platforms are: Windows 2003, Vista, 7, 2008, 2012, 8, 10, 2016, 2019 - 32 and 64 bit.
Usage: CLstamp.exe <inputfile(pages)> [outputfile] [options]
<inputfile(pages)> PDF file to stamp.
(pages) Pages to stamp, "0" - From current to last page.
If empty all pages will be stamped
[outputfile] Output PDF file. If left blank it will be the same as the input file
-u <password> open password to input PDF file
-v verbose (output more details)
-ver <value> 2,...,7. Output PDF file version
-lin Linearizes output PDF file
-cos Creates object streams (smaller output PDF)
-pdfa Preserves PDF/A when stamping
-e Enables removal of stamps
Example:
CLstamp.exe c:\input.pdf c:\output.pdf -t WATERMARK -e
-unstamp Removes any stamps previously added by CLstamp with the -e option
Example:
CLstamp.exe c:\input.pdf c:\output.pdf -unstamp
-t <value> Text to stamp (for a list of supported variables check Appendix B)
Example:
CLstamp.exe c:\input.pdf c:\output.pdf -t WATERMARK
-f <value> Font name or font file. The default font is “Helvetica”
Example:
CLstamp.exe c:\input.pdf c:\output.pdf -t WATERMARK -f Arial
or
CLstamp.exe c:\input.pdf c:\output.pdf -t WATERMARK -f c:\windows\fonts\arial.ttf
-fs <value> Font size. The default size is 60
Example:
CLstamp.exe c:\input.pdf c:\output.pdf -t WATERMARK -f Arial -fs 60
-rm <value> Text rendering mode
Can be one of the following values:
0 - Fill text, no stroke (default)
1 - Stroke text, no fill
2 - Fill then Stroke text
3 - Invisible
Example:
CLstamp.exe c:\input.pdf c:\output.pdf -t WATERMARK -f Arial -rm 1
-fc <value> Text fill color. The default value is #000000 (black)
Example:
CLstamp.exe c:\input.pdf c:\output.pdf -t WATERMARK -f Arial -fc #FF0000
-sc <value> Text stroke color. The default value is #000000 (black)
Example:
CLstamp.exe c:\input.pdf c:\output.pdf -t WATERMARK -f Arial -rm 1 -sc #FF0000
-sw <value> Stroke width in points. The default value is 1
Example:
CLstamp.exe c:\input.pdf c:\output.pdf -t WATERMARK -f Arial -rm 1 -sc #FF0000 -sw 1
-p <value> PDF file to use as stamp
Example:
CLstamp.exe c:\input.pdf c:\output.pdf -p c:\watermark.pdf
-i <value> Image file to use as stamp. Supported formats: GIF, PNG, JPEG, TIFF, BMP
Example:
CLstamp.exe c:\input.pdf c:\output.pdf -i c:\watermark.tif
-iw <value> Image width in pixels
-ih <value> Image height in pixels
Example:
CLstamp.exe c:\input.pdf c:\output.pdf -i c:\watermark.tif -iw 100 -ih 200
-wm <value> Place stamp as:
1 - watermark: under the page content,
0 - stamp: over the page content (default)
Example:
CLstamp.exe c:\input.pdf c:\output.pdf -i c:\image.jpg -wm 1
-x <value> stamp X coordinate. Default value: 0
-y <value> stamp Y coordinate. Default value: 0
Example:
CLstamp.exe c:\input.pdf c:\output.pdf -t WATERMARK -x 100 -y 100
Note: the coordinate system’s origin is the lower-left corner.
-units <value> Measurement units to use for -x and -y parameters
Possible values:
1 inches
2 centimeters
3 millimeters
4 points (Default)
Example:
CLstamp.exe c:\input.pdf c:\output.pdf -t WATERMARK -x 1 -y 1 -units 1
-r <value> Rotates stamp by <value> degrees. Default value: 0
Example:
CLstamp.exe c:\input.pdf c:\output.pdf -i c:\image.jpg -r 30
-s <value> Scales stamp by <value> percent. Default value: 100
Example:
CLstamp.exe c:\input.pdf c:\output.pdf -i c:\image.jpg -s 50
-op <value> Stamp opacity. A number from 0 to 100. Default: 100
-sf <value> Stamp file to use (for stamp file syntax see Appendix A: Stamp File Format)
-dests Removes named destinations from output PDF
-forms Removes forms from output PDF
-layers Removes layers from output PDF
-labels Removes page labels from output PDF
-annotations Removes annotations from output PDF
-articlethreads Removes article threads from output PDF
-embeddedfiles Removes embedded files (attachments) from output PDF
-taggedinfo Removes tagged info from output PDF
Encryption settings:
-owner <value> Owner password for encrypting output PDF file
-user <value> User password for encrypting output PDF file
-rc4 Uses 128 bits RC4 encryption for encrypting output file
-aes Uses 128 bits AES encryption for encrypting output file
-aes256 Uses 256 bits AES encryption for encrypting output file
-aes256v2 Uses 256 bits AES R6 encryption
-onlyattach Encrypts only attachments
-nometa Does not encrypt PDF Metadata
-perms <value> PDF security permissions to use for encrypting output file
flags:
p - document printing is denied
c - changing the document is denied
s - selection and copying of text and graphics is denied
a - adding or changing annotations or form fields is denied
The following flags are defined for 128 bits encryption:
i - disables editing of form fields
e - disables extraction of text and graphics
d - disables document assembly
q - disables high quality printing
Example:
CLstamp.exe c:\input.pdf c:\output.pdf -t WATERMARK -owner test -aes -perms pcs
-title <value> Sets output PDF file title to <value>
-author <value> Sets output PDF file author to <value>
-creator <value> Sets output PDF file creator to <value>
-subject <value> Sets output PDF file subject to <value>
-keywords <value> Sets output PDF file keywords to <value>
Example:
CLstamp.exe c:\input.pdf c:\output.pdf -t WATERMARK -title "Daily Report"
-openmagn <value> Sets open magnification (in %) for output PDF file
0 - Default
1 - Actual size
2 - Fit Page
3 - Fit Width
4 - Fit Height
5 - Fit Visible
-openpage <value> Sets open page for output PDF file
Example:
CLstamp.exe c:\input.pdf c:\output.pdf -t WATERMARK -openmagn 50 -openpage
-pm <value> Specifies how output file should be displayed when opened in PDF viewer.
Possible values:
0 - Default view
1 - Page only
2 - Outlines (bookmarks) visible
3 - Thumbnail images visible
4 - Optional content group panel visible
5 - Attachments panel visible
6 - Full screen mode
-pl <value> Specifies page layout to use when output file is opened in PDF viewer.
Possible values:
1 - Displays one page at a time (default)
2 - Displays the pages in one column
3 - Displays the pages in two columns, with odd numbered pages on the left
4 - Displays the pages in two columns, with odd numbered pages on the right
5 - Displays the pages two at a time, with odd numbered pages on the left
6 - Displays the pages two at a time, with odd numbered pages on the right
Example:
CLstamp.exe c:\input.pdf c:\output.pdf -t WATERMARK -pm 2 -pl 1
-hidemenubar Specifies if PDF viewer should hide menu bar when output file is displayed
-hidetoolbar Specifies if PDF viewer should hide toolbar when output file is displayed
-hidewindowui Specifies if PDF viewer should hide user interface elements when output file is displayed
-fitwindow Specifies if PDF viewer should resize the document's window to fit the size of the first displayed page
-centerwindow Specifies if PDF viewer should position the document's window in the center of the screen
Example:
CLstamp.exe c:\input.pdf c:\output.pdf -t WATERMARK -hidetoolbar -hidemenubar
Stamp "WATERMARK" at (2.5 in, 3 in) in 50 pt Arial font, red color:
CLstamp.exe c:\in.pdf c:\out.pdf -t WATERMARK -x 2.5 -y 3 -units 1 -f Arial -fs 50 -fc #FF0000
Stamp an image (c:\image.jpg) at (1cm,2cm)
CLstamp.exe c:\in.pdf c:\out.pdf -i c:\image.jpg -x 1 -y 2 -units 2
In order to stamp PDF files using the Graphic User Interface you need to run PDFstamp.exe located, by default, under C:\Program files (x86)\neeviaPDF.com\PDFstamp\apps .
Click Add files to select the PDF file(s) to be stamped. In case you’d like to stamp all PDF files in a folder simply click Add Folder to select the folder. For multiple folders click Add Folders.
To view current stamps click the „Stamps” tab:
If you have multiple stamps defined, the stamping order will be the one specified in the Stamps tab. To change it, click on a stamp and use the up and down buttons.
To delete an existing stamp highlight it using your mouse arrow and click Remove.
To save all your defined stamps into a project file click Save Stamps and type in the name of the file.
Stamps
To create a new stamp press the Create Stamp button. The window below will be displayed:
Stamp name - use this to set a name for the new stamp profile you want to create.
Stamp type:
Text stamp - only one line of text can be stamped;
TextBox stamp - multiple lines of text can be stamped;
Image stamp - allows you to specify an image that can be used as stamp;
PDF Overlay - allows you to specify an existing PDF file to be used as overlay.
To specify characteristics for Text stamp you have the following options that you can enable by clicking the buttons below:
a. Insert Variable - selects a variable from the list (see Appendix B for the full list);
b. Select Font - defines both font name and size. In this window you also have the option to embed the font with or without subset;
c. Text Color - defines both text color and color space (Gray, RGB, CMYK);
d. Text Rendering Mode - click the down arrow to select:
- Fill text, no stroke
- Stroke text, no fill
- Fill then stroke text
- Invisible text
Fill text, no stroke Stroke text, no fill Fill then stroke text
To specify characteristics for TextBox stamp you have the following options that you can enable by clicking the buttons below:
a. Insert Variable - to select a variable from the list (see Appendix B for the full list);
b. Select Font - to define both font name and size. In this window you also have the option to embed the font with or without subset.
c. Text Color - to define both text color and color space (Gray, RGB, CMYK).
d. Text Alignment - ( left, center or right )
e. TextBox Width, Height - enter values in points, inches, centimeters or milimeters. You can
also use text for both as a value which creates a rectangle that
contains the exact data you want to stamp.
f. Text Rendering Mode - click the down arrow to select:
- Fill text, no stroke
- Stroke text, no fill
- Fill then stroke text
- Invisible text
Fill text, no stroke Stroke text, no fill Fill then stroke text
Image stamp - allows you to specify an image that can be used as stamp.
Click Browse to select the image you would like as stamp. Supported image types are: JPEG, GIF, BMP, PNG and TIFF.
Image Width - enter value in pixels
Image Height - enter value in pixels
Image Scale - allows you to scale the image stamp. A scale of 50% makes the image stamp half of the original image size, while a scale of 200% makes the image stamp double in size.
PDF Overlay - specifies an existing PDF file to be used as overlay.
Click Browse to select the PDF file you would like to use as overlay. If multiple pages exist you can specify which page to be imported.
Scale - allows you to scale the PDF overlay. A scale of 50% makes the PDF overlay half of the original PDF size, while a scale of 200% makes the PDF overlay double in size.
After you finished with the above settings you can select:
Position - to specify the measurement Units (Points, Inches, Centimeters or Millimeters), Rotation angle, Stamp placement (as stamp: over the page content or watermark: under the page content) and the X, Y coordinates. For the X coordinate you can use as values, instead of numbers center, left and right - as the name suggests they will position the watermark in the center of the page, on the left or right. For Y you have center, top and bottom which will place the watermark in the center of the page on top or in the bottom. To position your watermark on the right lower corner use X=right and Y=bottom.
Place On - to specify the pages to stamp. Check "All pages" to place the stamp on all pages in the
PDF file or "Pages" to specify the page numbers.
Opacity - to specify how transparent the stamp should be. A value of 100 means that the stamp is completely opaque, while a value of 0 means that the stamp is invisible.
Miscellaneous - to use the page’s CropBox to position the stamp and/or use the page rotation parameter. The latter specifies the number of degrees by which the page should be rotated clockwise when displayed or printed.
In order to see the stamp position click the Refresh Preview button on the right-hand side. This is also valid when you edit an existing stamp which can be done by clicking Edit stamp in the Stamps window.
Once
you finished defining a stamp you can save it into a file that contains all the
settings you selected. To do that in the Stamps graphic interface click Save
Stamps and select your destination folder. To load a previously saved file
containing stamp settings in the same interface click Load Stamps.
Before stamping PDF documents you need to specify the output settings. To do that click the Settings button. The interface below will be displayed.
Optimize output file(s) for Fast Web Viewing - this option restructures the resulting PDF document for page-at-a-time downloading (byte-serving). This is especially important with large documents that can take a long time to download from a server.
Output File(s) Settings - in case you want to use the same folder as the one for original files select Place output next to input file(s). To select a different folder for the stamped files select Place output in folder and click Browse. Select Replace input file only if you want to overwrite the original document.
It allows you to specify Title, Author, Subject and Keywords fields for the stamped PDF file(s).
To encrypt the stamped PDF file(s), check Encrypt Document then select the encryption level from the Compatibility drop down box. There are 6 options:
Encrypt All Document Contents
When you select this option both the document and document metadata will be encrypted. Search engines will not be able to access the document metadata when this option is used.
Encrypt All Document Contents Except Metadata
It is valid for Acrobat 6 and later. Only the content of a PDF document will be encrypted. Metadata remains fully accesible for search engines.
Require a Password to Open the Document
This allows you to set a password for opening the encrypted PDF.
Change Permissions Password
This password prevents users from changing the permission settings. The user can view the file in Acrobat Reader but must enter the specified Permissions password in order to change the file’s Security and Permissions settings.
Permissions
Printing Allowed - Specifies the level of printing that users are allowed for the PDF document.
Possible values:
None - Disables printing.
Low Resolution (150 dpi) - Users can print but the resolution will not be higher than 150-dpi. Each page is printed as a bitmap image which may cause files to print at a slower speed. To make this option available set the Compatibility option to Acrobat 5 (PDF 1.4) or later.
High Resolution - Allows users to print at any resolution. PostScript and other printers that come with high-quality printing features can be used.
Changes Allowed - Enables the editing actions that are allowed in the PDF document. Possible values:
None - when selected none of the changes listed in Changes Allowed drop down box, such as filling in form fields and adding comments are permitted.
Inserting, Deleting, And Rotating Pages - allows users to insert, delete, and rotate pages. Also bookmarks and thumbnails creation are permitted. This option works only for high (128‑bit RC4, AES, AES256) encryption.
Filling in Form Fields and Signing Existing Signature Fields - when selected users can fill in forms and add digital signatures. Adding comments or creating form fields is not permitted. This option works only for high encryption (128‑bit RC4, AES or AES256, AES256 R6).
Commenting, Filling In Form Fields and Signing Existing Signature Fields - users are allowed to add comments, digital signatures and fill in forms. Moving page objects or create form fields is not permitted.
Page Layout, Filling in Form Fields and Signing - users can insert, rotate or delete pages and create bookmarks or thumbnail images, fill out forms, and add digital signatures. Creating form fields is not permitted. This option works only for low (40‑bit RC4) encryption.
Any Except Extracting Pages - allows users to edit the document, create and fill in form fields, add comments and digital signatures.
Enable Copying of Text, Images, and Other Content - allows users to select and copy the contents of a PDF.
Enable Text Access For Screen Reader Devices For The Visually Impaired - when selected visually impaired users can read the document with screen readers. It doesn’t allow users to copy or extract the document’s contents. This option works only for high encryption (128-bit RC4, AES, AES256 or AES256 R6).
In this window you can set the PDF Initial View options:
Navigation Tab - specifies which panels are displayed in the PDF viewer navigation pane.
Page Layout - specifies how document pages are arranged.
Magnification - use this to select at what zoom level the document will appear when opened.
Open To Page - specifies the page that appears when the PDF document opens.
Window Options - these options allow you to specify how the PDF viewer window adjusts in the screen area when a PDF document is opened.
Resize Window To Initial Page - adjusts the document window to fit snugly around the opening page, taking into account the options that you selected under Document Options.
Center Window On Screen - instructs the PDF viewer to position the window in the center of the screen area.
Open In Full Screen Mode - maximizes the document window and displays the document
without the menu bar, toolbar, or window controls.
User Interface Options
These options allow you to specify which parts of the PDF viewer interface - the menu bar, the toolbars, and the window controls - are hidden.
Note: take into account that If you hide the menu bar and toolbars users cannot apply commands and select tools unless they know the keyboard shortcuts.
In this window you can select the Graphic User Interface themes. Check Use GUI Themes to enable the Color Scheme. Once that is enabled check either Gradient fill or Solid fill to specify how the color will be displayed.
Class ID
PDFstamp.Neevia
Example:
Visual Basic: Set NVStamp = CreateObject("PDFstamp.Neevia")
Delphi: NVStamp := CreateOLEObject("PDFstamp.Neevia")
Returns the PDFstamp version.
Syntax
value = NVStamp.version
Data Type: String
Specifies whether the stamped PDF file should be linearized (Optimized for fast Web View) or not.
Possible values: true, false
Default value: false.
Syntax
NVStamp.Linearize = value
Data Type: Boolean
Specifies the open password to use when stamping an encrypted PDF file.
Syntax
NVStamp.PDFPassword = value
Data Type: String
Returns the number of defined stamps.
Syntax
value = NVStamp.Count
Data Type: Long
Returns the Stamps collection.
Syntax
value = NVStamp.Stamp(stampNmbr)
Data Type: array of Stamp
Specifies whether to remove text annotations from the output PDF file.
Possible values: true, false (Default value: false)
Syntax
NVstamp.removeAnnotations = value
Data Type: Boolean
Specifies whether to remove PDF forms from the output PDF file.
Possible values: true, false (Default value: false)
Syntax
NVstamp.removeAcroForms = value
Data Type: Boolean
Specifies whether to remove page labels from the output PDF file.
Possible values: true, false (Default value: false)
Syntax
NVstamp.removePageLabels = value
Data Type: Boolean
Specifies whether to remove layers from the output PDF file.
Possible values: true, false (Default value: false)
Syntax
NVstamp.removeLayers = value
Data Type: Boolean
Specifies whether to remove article threads from the output PDF file.
Possible values: true, false (Default value: false)
Syntax
NVstamp.removeArticleThreads = value
Data Type: Boolean
Specifies whether to remove tagged information from the output PDF file.
Possible values: true, false (Default value: false)
Syntax
NVstamp.removeTaggedInfo = value
Data Type: Boolean
Specifies whether to remove named destinations from the output PDF file.
Possible values: true, false (Default value: false)
Syntax
NVstamp.removeNamedDestinations = value
Data Type: Boolean
Specifies whether to remove embedded files (attachments) from the output PDF file.
Possible values: true, false (Default value: false)
Syntax
NVstamp.removeEmbeddedFiles = value
Data Type: Boolean
Specifies whether to preserve the PDF/A standard when stamping the PDF files.
Possible values: true, false (Default value: false)
Syntax
NVstamp.PreservePDFA = value
Data Type: Boolean
Specifies whether to create object streams when merging the PDF files.
Possible values: true, false (Default value: false)
Syntax
NVstamp.CreateObjectStreams = value
Data Type: Boolean
Note: An object stream represents a stream that contains a sequence of PDF objects. This allows a greater number of PDF objects to be compressed.
Specifies if the stamped PDF file should be encrypted or not. Default value: false.
Possible values: true, false
Syntax
NVStamp.PDFEncrypt = value
Specifies the encryption algorithm
Possible values: "rc4" (high - 128 bits RC4 encryption - Acrobat 5-and-later compatible)
"aes" (high - 128 bits AES encryption - Acrobat 6-and-later compatible)
"aes256" (high - 256bits AES encryption - Acrobat 9-and-later compatible)
"aes256v2" (high - 256bits R6 AES encryption - Acrobat X-and-later compatible)
Syntax
NVStamp.PDFEncryptionType = value
Data Type: String
Note: Will have effect only if PDFEncrypt = true.
Sets 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
NVStamp.PDFUserPassword = value
Data Type: String
Note: Will have effect only if PDFEncrypt = true.
Sets the output document owner password. This option will force the user of the PDF to enter a password before Acrobat Reader allows them to change the user password and security permissions.
Syntax
NVStamp.PDFOwnerPassword = value
Data Type: String
Note: Will have effect only if PDFEncrypt = true.
PDF security permissions to use for encrypting output file. Possible values:
p - document printing is denied
c - changing the document is denied
s - selection and copying of text and graphics is denied
a - adding or changing annotations or form fields is denied
The following flags are defined for 128 bits encryptions:
i - disables editing of form fields
e - disables extraction of text and graphics
d - disables document assembly
q - disables high quality printing
Syntax
NVStamp.PDFPermissions = value
Data Type: String
Example:
NVStamp.PDFPermissions = "pcedq"
Sets the output document Title field.
Syntax
NVStamp.DocumentTitle = value
Data Type: String
Sets the output document Subject field.
Syntax
NVStamp.DocumentSubject = value
Data Type: String
Sets the output document author field.
Syntax
NVStamp.DocumentAuthor = value
Data Type: String
Set the output document keywords field.
Syntax
NVStamp.DocumentKeywords = value
Data Type: String
Specifies how output file should be displayed when opened in PDF viewer. Possible values:
0 - Default view
1 - Page only
2 - Outlines (bookmarks) visible
3 - Thumbnail images visible
4 - Optional content group panel visible
5 - Attachments panel visible
6 - Full screen mode
Syntax
NVStamp.PageMode = value
Data Type: Long
Specifies the open magnification (in %) for output PDF file.
Syntax
NVStamp.OpenMagnification = value
Data Type: Long
Specifies the open page for output PDF file. Default value: 1 (first page)
Syntax
NVStamp.OpenAtPage = value
Data Type: Long
Specifies page layout to use when output file is opened in PDF viewer.
Possible values:
1 - displays one page at a time
2 - displays the pages in one column
3 - displays the pages in two columns, with odd numbered pages on the left
4 - displays the pages in two columns, with odd numbered pages on the right
5 - displays the pages two at a time, with odd numbered pages on the left
6 - displays the pages two at a time, with odd numbered pages on the right
Syntax
NVStamp.PageLayout = value
Data Type: Long
Specifies if PDF viewer should resize the document's window to fit the size of the first displayed page.
Possible values: true, false
Syntax
NVStamp.FitWindow = value
Data Type: Boolean
Specifies if PDF viewer should position the document's window in the center of the screen.
Possible values: true, false
Syntax
NVStamp.CenterWindow = value
Data Type: Boolean
Specifies if Acrobat Reader should hide the menu bar when displaying the output PDF document.
Possible values: true, false
Syntax
NVStamp.HideMenuBar = value
Data Type: Boolean
Specifies if Acrobat Reader should hide the toolbar when displaying the output PDF document.
Possible values: true, false
Syntax
NVStamp.HideToolbar = value
Data Type: Boolean
Specifies if Acrobat Reader should hide the user interface when displaying the output PDF document.
Possible values: true, false
Syntax
NVStamp.HideWindowUI = value
Data Type: Boolean
Specifies the stamp name.
Syntax
NVStamp.Stamps(stampNmbr).Name = value
Data Type: String
Specifies the stamp type. Possible values:
0 - Text Stamp
1 - TextBox Stamp
2 - Image Stamp
3 - PDF Overlay Stamp
Syntax
NVStamp.Stamps(stampNmbr).StampType = value
Data Type: Long
Specifies the Text to stamp.
Syntax
NVStamp.Stamps(stampNmbr).Text = value
Data Type: String
Note: will have effect only for Text and TextBox stamps.
Specifies the font name or font file. Default Value: Helvetica
Syntax
NVStamp.Stamps(stampNmbr).FontName = value
Data Type: String
Note: will have effect only for Text and TextBox stamps.
Specifies the font size. Default Value: 60
Syntax
NVStamp.Stamps(stampNmbr).FontSize = value
Data Type: Float
Note: will have effect only for Text and TextBox stamps.
Specifies whether the font should be embedded into PDF.
Possible values: true, false
Syntax
NVStamp.Stamps(stampNmbr).FontEmbed = value
Data Type: Boolean
Note: will have effect only for Text and TextBox stamps.
Specifies whether the font should be subset.
Possible values: true, false
Syntax
NVStamp.Stamps(stampNmbr).FontSubset = value
Data Type: Boolean
Note: will have effect only for Text and TextBox stamps.
Specifies the text rendering mode. Possible values:
0 - Fill text, no stroke (default)
1 - Stroke text, no fill
2 - Fill then Stroke text
3 - Invisible
Syntax
NVStamp.Stamps(stampNmbr).TextRenderingMode = value
Data Type: Long
Note: will have effect only for Text and TextBox stamps.
Specifies the text fill color.
Syntax
NVStamp.Stamps(stampNmbr).TextColor = value
Data Type: String
Note: will have effect only for Text and TextBox stamps.
Colors can be defined as a hexadecimal notation for the combination of Red, Green, and Blue color values (RGB). The lowest value that can be given to one light source is 0 (hex #00) and the highest value is 255 (hex #FF).
Example for RGB color Black: NVStamp.Stamps(stampNmbr).TextColor = “#000000”
Example for RGB color Red: NVStamp.Stamps(stampNmbr).TextColor = “#FF0000”
Specifies the color space for text fill color. Possible values:
0 - Gray
1 - RGB
2 - CMYK
Syntax
NVStamp.Stamps(stampNmbr).TextColorSpace = value
Data Type: Long
Note: will have effect only for Text and TextBox stamps.
Specifies the stroke color.
Syntax
NVStamp.Stamps(stampNmbr).StrokeColor = value
Data Type: String
Note: will have effect only for Text and TextBox stamps.
Specifies the color space for stroke color.
Possible values:
0 - Gray
1 - RGB
2 - CMYK
Syntax
NVStamp.Stamps(stampNmbr).StrokeColorSpace = value
Data Type: Long
Note: will have effect only for Text and TextBox stamps.
Specifies the stroke width.
Syntax
NVStamp.Stamps(stampNmbr).StrokeWidth = value
Data Type: Float
Note: will have effect only for Text and TextBox stamps.
Specifies the text alignment in the TextBox. Possible values:
1 - Left (Default)
2 - Right
3 - Center
Syntax
NVStamp.Stamps(stampNmbr).TextAlign = value
Data Type: Long
Note: will have effect only for TextBox stamps.
Specifies the text line spacing for textbox stamp. Default value: 0
Syntax
NVStamp.Stamps(stampNmbr).LineSpacing = value
Data Type: Float
Note: will have effect only for TextBox stamps.
Specifies the image file to use as stamp. Supported formats: GIF, PNG, JPEG, TIFF, BMP
Syntax
NVStamp.Stamps(stampNmbr).ImageFile = value
Data Type: String
Note: will have effect only for Image stamps.
Specifies the PDF file to use as overlay.
Syntax
NVStamp.Stamps(stampNmbr).PDFOverlayFile = value
Data Type: String
Note: will have effect only for PDFOverlay stamps.
Specifies the page to use as overlay from the PDFOverlayFile. Default value: 1
Syntax
NVStamp.Stamps(stampNmbr).PDFOverlayPage = value
Data Type: Long
Note: will have effect only for PDFOverlay stamps.
Specifies by how much (in percent) to scale the stamp. Default value: 100
Syntax
NVStamp.Stamps(stampNmbr).Scale = value
Data Type: Long
Note: will have effect only for Image and PDFOverlay stamps.
Specifies the stamp width.
Syntax
NVStamp.Stamps(stampNmbr).Width = value
Data Type: String
Note: will have effect only for TextBox and Image stamps.
Specifies the stamp height.
Syntax
NVStamp.Stamps(stampNmbr).Height = value
Data Type: String
Note: will have effect only for TextBox and Image stamps.
Specifies the X coordinate of the stamp. Default value: 0
Syntax
NVStamp.Stamps(stampNmbr).X = value
Data Type: String
Note: you can use as values, instead of numbers center, left and right - as the name suggests they will position the watermark in the center of the page, on the left or right.
Specifies the Y coordinate of the stamp. Default value: 0
Syntax
NVStamp.Stamps(stampNmbr).Y = value
Data Type: String
Note: you can use as values, instead of numbers center, top and bottom - as the name suggests they will position the watermark in the center of the page, on top or in the bottom.
Specify the measurement units to use for X, Y properties. Possible values:
1 inches
2 centimeters
3 millimeters
4 points (Default)
Syntax
NVStamp.Stamps(stampNmbr).Units = value
Data Type: Long
Specifies how to place the stamp on the page. Possible values:
1 - as watermark: under the page content,
0 - as stamp: over the page content (Default)
Syntax
NVStamp.Stamps(stampNmbr).PlaceAs = value
Data Type: Long
Specifies by how much to rotate the stamp. Default value: 0
Syntax
NVStamp.Stamps(stampNmbr).Rotate = value
Data Type: Long
Specifies the pages to place the stamp on. If empty the stamp will be placed on all pages.
Syntax
NVStamp.Stamps(stampNmbr).PageRange = value
Data Type: String
Specifies the stamp opacity. Default value: 100
A value of 100 means that the stamp is completely opaque, while a value of 0 means that the stamp is invisible.
Syntax
NVStamp.Stamps(stampNmbr).Opacity = value
Data Type: Long
Specifies whether the stamp can be removed with UnStampPDF method.
Possible values: true, false
Syntax
NVStamp.Stamps(stampNmbr).CanUnstamp = value
Data Type: Boolean
Note: PDFOverlay stamps cannot be removed.
Creates a new (empty) stamp in the stamps collection. This method returns the new stamp index.
Syntax
stampIndx = NVStamp.CreateNewStamp
Loads stamps from a stamp file (for stamp file syntax check Appendix: Stamp File Format).
Syntax
NVStamp.LoadStampsFromFile( fileName )
Data Type: String
Saves the stamps collection into the specified file.
Syntax
NVStamp.SaveStampsToFile( fileName )
Data Type: String
Stamps the specified PDF file.
Syntax
NVStamp.StampPDF( fileToStamp, outputFile )
Data Type: String
Removes any stamps previously added by PDFstamp and marked with CanUnstamp.
Syntax
NVStamp.UnStampPDF( fileToUnStamp, outputFile )
Data Type: String
Stamp file contains commands and text to be stamped into the PDF file. Commands are used to set certain attributes (like font, color etc).
Rules:
- Every command begins with a backslash (\) (there is no space after that);
- Case sensitivity is not relevant;
- Command and parameters are separated by spaces.
\stamp <value> - starts a stamp. <value> are the pages to stamp (leave blank if you want to stamp all the pages.
\stampname <value> - Specifies the stamp name
\text <value> - Specifies the text to stamp
\starttextbox <value> - Starts a Text Box (<value> is the text alignment: 1 - left, 2 - right, 3 - center)
.. text box text to stamp …
\endtextbox
\textrenderingmode <value> - specifies text rendering mode
\textgraycolor <value> - specifies text color (Gray colorspace)
\textrgbcolor <value> - specifies text color (RGB colorpsace)
\textcmykcolor <value> - specifies text color (CMYK colorspace)
\strokegraycolor <value> - specifies stroke color (Gray colorspace)
\strokergbcolor <value> - specifies stroke color (RGB colorspace)
\strokecmykcolor <value> - specifies stroke color (CMYK colorspace)
\strokewidth <value> - specifies stroke width
\font <value> - specifies font name or font file
\fontsize <value> - specifies font size
\fontembed <value> - specifies if the font should be embedded or not
\fontsubset <value> - specifies if the font should be subsetted or not
\width <value> - specifies image or textbox width
\height <value> - specifies image or textbox height
\linespacing <value> - specifies line spacing for TextBox stamp
\image <value> - specifies image file to use as stamp
\importpdfpage <value> - specifies PDF file to use as PDF overlay stamp
\scale <value> - specifies scaling factor for image and PDF overlay stamps
\overlay - place stamp as overlay - over page content
\underlay - place stamp as watermark - behind page content
\canunstamp - stamp can be removed by the UnStampPDF method in the PDFstamp COM object
\rotate <value> - rotate stamp by <value> degrees
\opacity <value> - specifies stamp opacity
\x <value> - specifies stamp’s X coordinate
\y <value> - specifies stamp’s Y coordinate
\units <value> - specifies the measurement units for \x, \y commands
Example: Stamp "WATERMARK" on first page at (1in, 1.5in), Arial font, green color
\stamp 1
\stampname Sample Stamp
\text WATERMARK
\x 1
\y 1.5
\units 1
\font Arial
\textrgbcolor #00FF00
Below is the list of variables supported by both Text and TextBox stamps:
%PAGE% - current page number
%PAGES% - total number of pages
%FILENAME% - name of the file
%WEEKDAY% - full weekday name
%WEEKDAY_SHORT% - abbreviated weekday name
%MONTH% - month number (1-12)
%MONTHNAME% - full month name
%MONTHNAME_SHORT% - abbreviated month name
%YEAR% - year with century (YYYY)
%YEAR_SHORT% - year without century (YY)
%DAY% - day of month
%DAY_YEAR% - day of the year (1 -366)
%HOUR% - hour (01- 12)
%HOURS% - hour (00-23)
%MINUTES% - minutes (00-59)
%SECONDS% - seconds (00-59)
%AMPM% - AM, PM
%DATE% - local date representation. Ex: 11/01/07
%TIME% - local time representation. Ex: 1:17:10 PM
%DATETIME% - local date and time
%AUTHOR% - document Author
%TITLE% - document Title
%SUBJECT% - document Subject
%KEYWORDS% - document Keywords
%N% - new line. This is valid for TextBox stamp only.
For more code samples, please check http://neeviaPDF.com/support/examples/pdfstamp/
Dim NVStamp : Set NVStamp = CreateObject("PDFstamp.Neevia")
Dim indx : indx = NVStamp.CreateNewStamp
NVStamp.Stamps(indx).Name = "Sample Text Stamp"
NVStamp.Stamps(indx).Text = "WATERMARK"
NVStamp.Stamps(indx).FontName = "Arial"
NVStamp.Stamps(indx).FontColor = "#000000"
NVStamp.Stamps(indx).X = 100
NVStamp.Stamps(indx).Y = 100
MsgBox NVStamp.StampPDF("c:\in.pdf", "c:\out.pdf")
Uses ComObj;
…
var
NVstamp : Variant;
retVal : String;
begin
NVStamp := CreateOLEObject('PDFstamp.Neevia');
indx := NVStamp.CreateNewStamp;
NVStamp.Stamps(indx).Name := 'Sample Text Stamp';
NVStamp.Stamps(indx).Text := 'WATERMARK';
NVStamp.Stamps(indx).FontName := 'Arial';
NVStamp.Stamps(indx).FontColor := '#000000';
NVStamp.Stamps(indx).X := 100;
NVStamp.Stamps(indx).Y := 100;
retVal := IntToStr( NVStamp.StampPDF('c:\in.pdf', 'c:\out.pdf') );
Application.MessageBox( PChar( retVal ), 'Done stamping', MB_OK);
Dim NVStamp : Set NVStamp = CreateObject("PDFstamp.Neevia")
Dim indx : indx = NVStamp.CreateNewStamp
NVStamp.Stamps(indx).Name = "Sample Image Stamp"
NVStamp.Stamps(indx).ImageFile = "c:\img.jpg"
NVStamp.Stamps(indx).X = 100
NVStamp.Stamps(indx).Y = 100
MsgBox NVStamp.StampPDF("c:\in.pdf", "c:\out.pdf")
Uses ComObj;
…
var
NVstamp : Variant;
retVal : String;
begin
NVstamp := CreateOLEObject('PDFstamp.Neevia ');
indx := NVstamp.CreateNewStamp;
NVstamp.Stamps(indx).Name := 'Sample Image Stamp';
NVstamp.Stamps(indx).ImageFile := 'c:\img.jpg ';
NVstamp.Stamps(indx).X := 100;
NVstamp.Stamps(indx).Y := 100;
retVal := IntToStr( NVstamp.StampPDF('c:\in.pdf', 'c:\out.pdf') );
Application.MessageBox( PChar( retVal ), 'Done stamping', MB_OK);