How to use annotation or notes function in PDF Stamp Command Line and PDF Stamp SDK?

VeryPDF PDF Stamp Command Line and PDF Stamp SDK products are support annotation (notes) function, this is a great function to stamp your PDF files.

If you are using PDF Stamp Command Line, you can use following command line to add annotation stamp into your PDF pages,

pdfstamp.exe -pdf example.pdf -o annotstamp.pdf -annotfile annot.ini

If you are using PDF Stamp SDK product, you can use following VC++ source code to insert annotation or notes stamps into your PDF pages,

void main(int argc,char* argv[])
{
    char szPDFFile[256];
    char szOutFile[256];
    char szIniFile[256];
    int iRet = 0;

    memset(szPDFFile,0,256);
    memset(szOutFile,0,256);
    memset(szIniFile,0,256);

    if(!LoadVeryWDll())
        return;

    //Register PDFStamp SDK with your License Key
    VeryStampReg("XXXXXXXXXXXXXXXXXXXXXXXX");

    GetModulePath(szPDFFile,"example.pdf");
    GetModulePath(szOutFile,"test_notes.pdf");
    GetModulePath(szIniFile,"annot.ini");
   
    iRet = VeryStampInsertAnnotStamp(szPDFFile, szOutFile, szIniFile);

    FreeVeryWDll();
}

This is the screenshot of annotation or notes stamps,

image

Please refer to the format of annot.ini file at below,

; Description for this .ini file
;
;
; AnnotRect=[left top right bottom]
; The annotation rectangle, defining the location of the annotation on the page in default user space units.
; Format is [left top right bottom], The coordinate origin (0, 0) is at the left-bottom corner of the page.
;
;
; AnnotColor=[R G B]
; An array of numbers in the range 0.0 to 1.0, representing a color used for the following purposes:
;     The background of the annotation’s icon when closed
;     The title bar of the annotation’s pop-up window
;     The border of a link annotation
; The number of array elements determines the color space in which the color is defined:
; 0 - No color; transparent
; 1 - DeviceGray
; 3 - DeviceRGB
; 4 - DeviceCMYK
;
;
; AnnotFlag=X
; A set of flags specifying various characteristics of the annotation.
; Annotation Flags
;
;   The value of the annotation dictionary’s F entry is an unsigned 32-bit integer con-
;   taining flags specifying various characteristics of the annotation. Bit positions
;   within the flag word are numbered from 1 (low-order) to 32 (high-order). Table
;   8.16 shows the meanings of the flags; all undefined flag bits are reserved and must
;   be set to 0.
;
;                               TABLE 8.16 Annotation flags
;BIT POSITION   NAME            MEANING
;
;1   Invisible       If set, do not display the annotation if it does not belong to one of the stan-
;                    dard annotation types and no annotation handler is available. If clear, display
;                    such an unknown annotation using an appearance stream specified by its ap-
;                    pearance dictionary, if any (see Section 8.4.4, “Appearance Streams”).
;
;2   Hidden          (PDF 1.2) If set, do not display or print the annotation or allow it to interact
;                    with the user, regardless of its annotation type or whether an annotation
;                    handler is available. In cases where screen space is limited, the ability to hide
;                    and show annotations selectively can be used in combination with appearance
;                    streams (see Section 8.4.4, “Appearance Streams”) to display auxiliary pop-up
;                    information similar in function to online help systems. (See implementation
;                    note 83 in Appendix H.)
;
;3   Print           (PDF 1.2) If set, print the annotation when the page is printed. If clear, never
;                    print the annotation, regardless of whether it is displayed on the screen. This
;                    can be useful, for example, for annotations representing interactive pushbut-
;                    tons, which would serve no meaningful purpose on the printed page. (See
;                    implementation note 83 in Appendix H.)
;
;4   NoZoom           (PDF 1.3) If set, do not scale the annotation’s appearance to match the magni-
;                     fication of the page. The location of the annotation on the page (defined by
;                     the upper-left corner of its annotation rectangle) remains fixed, regardless of
;                     the page magnification. See below for further discussion.
;
;5   NoRotate         (PDF 1.3) If set, do not rotate the annotation’s appearance to match the rota-
;                     tion of the page. The upper-left corner of the annotation rectangle remains in
;                     a fixed location on the page, regardless of the page rotation. See below for fur-
;                     ther discussion.
;
;6   NoView           (PDF 1.3) If set, do not display the annotation on the screen or allow it to
;                     interact with the user. The annotation may be printed (depending on the
;                     setting of the Print flag) but should be considered hidden for purposes of on-
;                     screen display and user interaction.
;
;7   ReadOnly         (PDF 1.3) If set, do not allow the annotation to interact with the user. The
;                     annotation may be displayed or printed (depending on the settings of the
;                     NoView and Print flags) but should not respond to mouse clicks or change its
;                     appearance in response to mouse motions.
;                     Note: This flag is ignored for widget annotations; its function is subsumed by the
;                     ReadOnly flag of the associated form field (see Table 8.70 on page 676).
;
;8   Locked           (PDF 1.4) If set, do not allow the annotation to be deleted or its properties (in-
;                     cluding position and size) to be modified by the user. However, this flag does
;                     not restrict changes to the annotation’s contents, such as the value of a form
;                     field. (See implementation note 84 in Appendix H.)
;
;9   ToggleNoView     (PDF 1.5) If set, invert the interpretation of the NoView flag for certain
;                     events. A typical use is to have an annotation that appears only when a mouse
;                     cursor is held over it; see implementation note 85 in Appendix H.
;
;10  LockedContents   (PDF 1.7) If set, do not allow the contents of the annotation to be modified by
;                     the user. This flag does not restrict deletion of the annotation or changes to
;                     other annotation properties, such as position and size.
;
;
; Author=string
; Author of annotation.
;
;
; Content=string
; Text to be displayed for the annotation or, if this type of annotation does not
; display text, an alternate description of the annotation’s contents in human-readable
; form. In either case, this text is useful when extracting the document’s contents
; in support of accessibility to users with disabilities or for other purposes.
;
;
; ModifyDate=D:YYYYMMDDHHmmSSOHH'mm'
; The date and time when the annotation was most recently modified.
; where
;     YYYY is the year
;     MM is the month
;     DD is the day (01–31)
;     HH is the hour (00–23)
;     mm is the minute (00–59)
;     SS is the second (00–59)
;     O is the relationship of local time to Universal Time (UT), denoted by one of the characters +, ?, or Z (see below)
;     HH followed by ' is the absolute value of the offset from UT in hours (00–23)
;     mm followed by ' is the absolute value of the offset from UT in minutes (00–59)
; For example, December 23, 1998, at 7:52 PM, U.S. Pacific Standard Time, is represented by the string
; D:199812231952-08'00'
;
;
; AnnotIcon=Key, Note, Help, NewParagraph, Paragraph, Insert
; The name of an icon to be used in displaying the annotation. Viewer applications
; should provide predefined icon appearances for at least the following standard names:
; Key, Note, Help, NewParagraph, Paragraph, Insert
;
;
; PopupRect=[left top right bottom]
; A pop-up annotation for entering or editing the text associated with this annotation.
; Specify the position for this popup window, format is [left top right bottom],
; The coordinate origin (0, 0) is at the left-bottom corner of the page.
;
;
; PopupIsOpen=1 or 0
; A flag specifying whether the annotation should initially be displayed open. Default value: false (closed).
;
;
; PageRange=2,4-8,29-32,38
; Set page range for the annotation, Example: -u "2,4-8,29-32,38"
;

[Annot1]
AnnotRect=[10.0 100.0 110 200]
AnnotColor=[1 0 0]
AnnotFlag=4
Author=Author of the annotation
Content=The annotation's Text Content
AnnotIcon=Key
ModifyDate=D:20090726114000+08'00'
PopupRect=[10.0 200.0 110 300]
PopupIsOpen=1
PageRange=1-2

[Annot2]
AnnotRect=[110.0 100.0 210 200]
AnnotColor=[0 1 0]
AnnotFlag=4
Author=Author of the annotation
Content=The annotation's Text Content
AnnotIcon=Note
ModifyDate=D:20090726114000+08'00'
PopupRect=[110.0 200.0 210 300]
PopupIsOpen=1
PageRange=1-2

[Annot3]
AnnotRect=[210.0 100.0 310 200]
AnnotColor=[0 0 1]
AnnotFlag=4
Author=Author of the annotation
Content=The annotation's Text Content
AnnotIcon=Help
ModifyDate=D:20090726114000+08'00'
PopupRect=[210.0 200.0 310 300]
PopupIsOpen=1
PageRange=1-2

[Annot4]
AnnotRect=[310.0 100.0 410 200]
AnnotColor=[1 1 0]
AnnotFlag=4
Author=Author of the annotation
Content=The annotation's Text Content
AnnotIcon=NewParagraph
ModifyDate=D:20090726114000+08'00'
PopupRect=[310.0 200.0 410 300]
PopupIsOpen=1
PageRange=1-2

[Annot5]
AnnotRect=[410.0 100.0 510 200]
AnnotColor=[1 0 1]
AnnotFlag=4
Author=Author of the annotation
Content=The annotation's Text Content
AnnotIcon=Paragraph
ModifyDate=D:20090726114000+08'00'
PopupRect=[410.0 200.0 510 300]
PopupIsOpen=1
PageRange=1-2

[Annot6]
AnnotRect=[510.0 100.0 610 200]
AnnotColor=[0 1 1]
AnnotFlag=4
Author=Author of the annotation
Content=Name line 1\rAddress Line 2\rCity, State Zip line3\rPhone Number line 4\r
AnnotIcon=Insert
PopupRect=[510.0 200.0 610 300]
PopupIsOpen=1
PageRange=

VeryPDF

VN:F [1.9.20_1166]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.20_1166]
Rating: 0 (from 0 votes)

Related Posts

This entry was posted in PDFStamp Command Line and tagged , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *


Verify Code   If you cannot see the CheckCode image,please refresh the page again!