VeryPDF Cloud API Platform :: Advanced PDF Tools Cloud API :: Stamp PDF, Rotate PDF, Set PDF Metadata, Set PDF Version Number, Set PDF Info, Set PDF Viewer Preferences, Resize PDF Pages, Set Custom Fields, etc.

Advanced PDF Tools Cloud API is a part of VeryPDF Cloud API Platform. Advanced PDF Tools Cloud API is allow you to stamp PDF file, text, image, line, rectangle, page number, bates number etc. information across one or more pages in a PDF document. You have full control over the position, font color, font size, width, height, opacity, transparent color and more of your watermarks. You can also use this API to rotate PDF pages, set metadata, set document properties (title, subject, author, keywords, creator, producer, Custom Fields), set viewer preference, resize and scale PDF pages, etc. operations.

VeryPDF Cloud API Platform Home Page:

http://www.verypdf.com/online/cloud-api/index.html

You can place a PDF file to the pages of another PDF file by stamp or background option, please refer to following web page for more information, 

http://www.verypdf.com/wordpress/201308/verypdf-cloud-api-platform-pdf-stamper-cloud-api-38024.html

Advanced PDF Tools Cloud API has only one parameter: -pdftoolsini, you can pass a configuration file to Advanced PDF Tools Cloud API by -pdftoolsini option, e.g.,

http://online.verypdf.com/api/?apikey=XXXXXXXXXXXXX&app=pdftools
&infile=http://online.verypdf.com/examples/cloud-api/multipage.pdf
&outfile=out.pdf
&-pdftoolsini=http://online.verypdf.com/examples/cloud-api/pdftools.ini

After you execute above URL, you will get a PDF file with a stamp on all PDF pages,

image

image

Here is a sample of pdftools.ini file,

http://online.verypdf.com/examples/cloud-api/pdftools.ini

The following is the spec of pdftools.ini file,

++++++++++++++++++++++++++++++++++++++++++++++++++++

[Info]
Enable=1                ; Enable or Disable 'Advanced PDF Tools Cloud API'
                        ;
to set document properties

Title=<FEFF4e2d6587>    ; Set title to PDF file, default is ASCII string,
                        ; you can use <FEFFXXXXXX> format to use UTF16 text.
Subject=<FEFF4e2d6587>  ; Set subject to PDF file
Author=<FEFF4e2d6587>   ; Set author to PDF file
Keywords=<FEFF4e2d6587> ; Set keywords to PDF file
CreationDate=CreateDate ; Set CreationDate to PDF file
ModDate=ModifiedDate    ; Set ModDate to PDF file
Creator=Creator         ; Set Creator to PDF file
Producer=Producer       ; Set Producer to PDF file

; Set PDF Version Number to PDF file
;     0 is PDF 1.0
;     1 is PDF 1.1
;     2 is PDF 1.2
;     3 is PDF 1.3
;     4 is PDF 1.4
;     5 is PDF 1.5
;     6 is PDF 1.6
;     7 is PDF 1.7
;     8 is PDF 1.8
pdfversion=3

[Viewing]
Enable=0                ; Enable or Disable Viewer Preference to PDF file

; Set Page Mode to PDF file,
;     PdfPageModeDontCare = 0
;     PdfPageModeUseNone = 1
;     PdfPageModeUseThumbs = 2
;     PdfPageModeUseBookmarks = 3
;     PdfPageModeFullScreen = 4
;     PdfPageModeUseOC = 5
;     PdfPageModeUseAttachments = 6
PageMode=1

; Set Page Layout to PDF file,
;     PdfPageLayoutIgnore = 0
;     PdfPageLayoutDefault = 1
;     PdfPageLayoutSinglePage = 2
;     PdfPageLayoutOneColumn = 3
;     PdfPageLayoutTwoColumnLeft = 4
;     PdfPageLayoutTwoColumnRight = 5
;     PdfPageLayoutTwoPageLeft = 6
;     PdfPageLayoutTwoPageRight = 7
PageLayout=2

HideToolbar=0       ; Show or hide toolbar
HideMenubar=0       ; Show or hide menu bar
HideWindowUI=0      ; Show or hide Window UI
FitWindow=0         ; Scale PDF page to fit the Window
CenterWindow=0      ; Center the document Window
UseFullScreen=0     ; View PDF file in Full Screen mode
DisplayDocTitle=1   ; Display PDF document title

ViewerPreferences=/HideMenubar true
; ViewerPreferences can choose one or more of following values
; /HideMenubar true
; /HideToolbar false
; /HideWindowUI true
; /FitWindow true
; /CenterWindow true
; /DisplayDocTitle true
; /PrintScaling /None
; /NonFullScreenPageMode /UseNone

PrintScaling=None

StartPageNumber=2   ; Set the start page number to PDF file

; We are support only '*' types at the moment
;    PdfDestinationFit_Fit = 0,   * Fit in window, Fit page
;    PdfDestinationFit_FitH = 1,  * Fit width
;    PdfDestinationFit_FitV = 2,  * Fit height
;    PdfDestinationFit_FitB = 3, 
;    PdfDestinationFit_FitBH = 4, * Fit visible
;    PdfDestinationFit_FitBV = 5,
;    PdfDestinationFit_XYZ = 999, * Any Zoom Ratio, you can set
;    MagnificationValue to any scale ratio when you set
;    MagnificationType to 999
;    if you set MagnificationType = -1, it is meaning "NoChange"
;    Actual Size = MagnificationType=999 and MagnificationValue=100%
MagnificationType=999
MagnificationValue=200%

[Pages]
Enable=0             ; Enable or Disable PDF Page rotation and scaling

PageRange=1-5,20-    ; set page range
PageRotate=0         ; page rotate degree, it can be 0, 90, 180, 270, 360
PageWidth=100%       ; set page width, it can be constant (default unit is
                     ; pt) or scale ratio, if you wish use scale ratio,
                     ; please add % at the end, such as 50%
PageHeight=100%      ; set page height, it can be constant (default unit
                     ; is pt) or scale ratio, if you wish use scale ratio,
                     ; please add % at the end, such as 50%
MediaBox=0,0,300,400 ; Set MediaBox to PDF file
CropBox=0,0,300,400  ; Set CropBox to PDF file
ArtBox=0,0,300,400   ; Set ArtBox to PDF file
BleedBox=0,0,300,400 ; Set BleedBox to PDF file
TrimBox=0,0,300,400  ; Set TrimBox to PDF file

ContentRotate=0      ; set content rotate degree, it can be any degree
ContentScaleMode=1   ; 0 is NoScaling, 1 is ScanToFit, 2 is Custom
ContentWidth=100%    ; set page content width, it can be constant
                     ; (default unit is pt) or scale ratio, if you wish
                     ; use scale ratio, please add % at the end, such as 50%
ContentHeight=100%   ; set page content height, it can be constant
                     ; (default unit is pt) or scale ratio, if you wish
                     ; use scale ratio, please add % at the end, such as 50%
ContentMaintainAspectRatio=1  ; Maintain Aspect Ratio between width and height
ContentCenterOnPage=0         ; center the content to new page size

ContentMarginLeft=100         ; Set left margin, unit is pt
ContentMarginBottom=100       ; Set bottom margin, unit is pt
ContentMarginRight=1          ; Set right margin, unit is pt
ContentMarginTop=100          ; Set top margin, unit is pt

[Optimize]
Enable=0                ; Enable or Disable optimize to PDF file

RemoveMetadata=1
RemoveJavascript=1
RemoveThumb=1
RemoveComment=1
RemoveEmbeddedFile=1
RemoveBookmarks=1
RemovePrivatedata=1
RemoveNamesDestination=1
RemoveForm=1
RemoveViewerPreferences=1

; Not implemented yet, we will implement these features in next version
CompressStream=1
EnableFastWebView=1
FlattenFormFields=1
RemoveDocumentTags=1
ConvertSmoothLinesToCurves=1
DetectAndMergeImageFragments=1
EmbedThumbnails=1

[Metadata]
Enable=0
MetadataFile=http://online.verypdf.com/examples/cloud-api/metadata_test.xml

[Security]
Enable=0               ; Enable or Disable Security Settings to PDF file

UserPassword=123       ; Set User Password
OwnerPassword=456      ; Set Owner Password

; PdfPermissions_Print       = 0x00000004,     4,
; ///< Allow printing the document
; PdfPermissions_Edit        = 0x00000008,     8,
; ///< Allow modifying the document besides annotations,
; form fields or changing pages
; PdfPermissions_Copy        = 0x00000010,    16,
; ///< Allow text and graphic extraction
; PdfPermissions_EditNotes     = 0x00000020,    32,
; ///< Add or modify text annotations or form fields (if PdfPermissions_Edit
; is set also allow to create interactive form fields including signature)
; PdfPermissions_FillAndSign = 0x00000100,   256,
; ///< Fill in existing form or signature fields
; PdfPermissions_Accessible     = 0x00000200,   512,
; ///< Extract text and graphics to support user with disabilities
; PdfPermissions_DocAssembly = 0x00000400,  1024,
; ///< Assemble the document: insert, create, rotate delete pages
; or add bookmarks
; PdfPermissions_HighPrint     = 0x00000800   2048,
; ///< Print a high resolution version of the document

Permissions=4

; PdfKeyLength_40  = 40,
; PdfKeyLength_128 = 128

KeyLength=128

; PdfEncryptAlgorithm_RC4V1 = 1, RC4 Version 1 encryption using a 40bit key
; PdfEncryptAlgorithm_RC4V2 = 2, RC4 Version 2 encryption using a key with
; 40-128bit

EncryptAlgorithm=2

[Watermark]
Enable=0           ; Enable or Disable watermark function

; type: 1 is Text, 2 is image, 3 is PDF, 4 is line
; if you set x=-1, the current X position is equal to PageWidth/2
; if you set y=-1, the current Y position is equal to PageHeight/2
; if you set height=0, the current font size will be calculated
; automatically, fit to page width
; xPosType: 0 is from left, 1 is from center, 2 is from right
; yPosType: 0 is from top,  1 is from center, 2 is from bottom
; x, y are offset values from current position

[Watermark1]
type=1            ; This is a text watermark
text=Demo watermark 3
fontname=Times New Roman
xPosType=1
yPosType=1
x=0
y=0
height=0
width=0
fontbold=0
fontitalic=0
fontunderline=1
fontstrikeout=0
opacity=90
angle=45
color=FF0000
pagerange=1-5
scale=150

[Watermark2]
type=2            ; This is an image watermark
text=http://online.verypdf.com/examples/cloud-api/watermark.png
xPosType=1
yPosType=2
x=0
y=-100
width=300
height=300
opacity=50
angle=0
pagerange=1-5
scale=100

[Watermark3]
type=3            ; This is a PDF watermark
text=http://online.verypdf.com/examples/cloud-api/multipage.pdf
pdfpageindex=3    ; import page index from PDF file, zero based
x=0
y=0
width=100
height=100
opacity=50
angle=45
pagerange=1-5
scale=100

[Watermark4]
type=4            ; This is a line watermark
text=line
x=200             ; x, y are start point
y=200
x2=400            ; x2, y2 are end point
y2=400
width=10
height=0
opacity=50
angle=45
pagerange=1-5

[Hyperlink]
Enable=0          ; Enable or Disable hyperlinks detection
DetectFileName=1  ; Enable or Disable detect filenames as hyperlinks
CheckIfFileExists=0 ; Check if target file exists before create the hyperlink
DetectURL=1         ; Detect URL automatically
BorderColor=0000FF  ; Set border color for hyperlink rectangle
BorderWidth=10      ; Set border width for hyperlink rectangle, unit is pt

; 0: "S", // solid border
; 1: "D", // dashed border
; 2: "B", // beveled (three-dimensional) border
; 3: "I", // inset border
; 4: "U"  // underlined border
LineStyle=1

; 0: Invisible, 1: Thin, 2: Medium, 3: Thick
LineThickness=1

LineDash1=6
LineDash2=1

; 0: None
; 1: Invert
; 2: Outline
; 3: Inset
HighlightStyle=3

[CustomFields]
Enable=1         ; Enable or Disable Custom Fields

; 1 is append, 0 will clear original Custom Fields
ShouldAppend=1

Key1=<FEFF4e2d6587>   ; Key of Custom Field, support ASCII and UTF16 string
Value1=<FEFF4e2d6587> ; Value of Custom Field, support ASCII and UTF16 string
Key2=key2
Value2=key2
Key3=key3
Value3=key3

++++++++++++++++++++++++++++++++++++++++++++++++++++

More articles for VeryPDF Cloud API Platform,

http://www.verypdf.com/wordpress/category/verypdf-cloud-api

If you need any other functions which are not included in VeryPDF Cloud API Platform, please feel free to let us know,

http://support.verypdf.com

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 VeryPDF Cloud API and tagged , , , . Bookmark the permalink.

One Response to VeryPDF Cloud API Platform :: Advanced PDF Tools Cloud API :: Stamp PDF, Rotate PDF, Set PDF Metadata, Set PDF Version Number, Set PDF Info, Set PDF Viewer Preferences, Resize PDF Pages, Set Custom Fields, etc.

  1. VeryPDF says:

    VeryPDF Cloud API Platform :: PDF Stamper Cloud API :: Add transparent Text, Image and PDF stamps to PDF pages from URL directly,

    http://www.verypdf.com/wordpress/201509/verypdf-cloud-api-platform-pdf-stamper-cloud-api-add-transparent-text-image-and-pdf-stamps-to-pdf-pages-from-url-directly-41748.html

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

Leave a Reply to VeryPDF Cancel 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!