VeryPDF PDF Stamp SDK is a multi-functional tool for programmers to stamp PDF via stamping image to PDF, stamping text to PDF, or stamping graphics to PDF and process secondary development in various program platforms. And this page aims to tell you how to use VeryPDF PDF Stamp SDK to fulfill them.VeryPDF PDF Stamp SDK allows you to integrate PDF Stamp application into your own programs (Include client side and Server side applications). In general, VeryPDF PDF Stamp SDK is a handy toolkit that comes equipped with all the necessary tools for creating applications that can imprint stamps on PDF on the fly.
And the following examples in typical platforms would like to guide you to proper usages:
Windows 2000, XP, Vista, 7, 10, 11, Windows Server 2003, 2008,2008 R2 and later systems, both 32 bit and 64 bit
C#, VB .NET, J# via .NET, Java via JNI, MS Visual Basic, Borland Delphi, MS Office products such as Access and C++ via COM, C and C++ via native C
And the following examples in typical platforms would like to guide you to proper usages:
Private Sub StampIntoPDFFile()
Dim szInputPDFFile As String
Dim szOutPDFFile As String
Dim id As Long
Dim code As Long
Dim NullString As String
szInputPDFFile = "C:\example.pdf"
szOutPDFFile = "C:\out.pdf"
page = 1
strStamp = ""
id = veryOpen(szInputPDFFile, szOutPDFFile)
If (id > 0) Then
pagecount = veryGetFunction(id, Very_Get_PdfPageCount,
0, 0, 0, 0)
Do While page <= pagecount
strStamp = strStamp + "*"
code = verySetFunction(id, Very_Set_Range,
page, 1, 0, 0)
code = veryAddText(id, 6, "page " & strStamp,
RGB(255, 200, 100), 0, 0, 0, 0, 0, 0, 0, NullString, 0, 0, NullString, 0)
page = page + 1
Loop
veryClose (id)
End If
End Sub
<?php
$PdfStamp =new COM("PDFStampOCX.CPDFStamp") or die("Cannot start PDFStampOCX");
PdfStamp.veryRegEx("XXXXXXXXXXXXXXXXX")
$id = oTest.veryOpenEx("C:\test.pdf", "C:\out.pdf")
If ($id > 0)
{
$code = PdfStamp.veryAddTextEx($id, 3, "Demo Watermark", 0, 0, 0, 0, 0, 0, 0, 300, "", 0, 0, "", 0)
$code = PdfStamp.veryAddTextEx($id, 6, "Copyright verypdf.com, Inc.", RGB(255, 200, 100), 0, 0, 0, 0, 0, 0, 0, "", 0, 0, "", 0)
$code = PdfStamp.veryAddTextEx($id, 9, "www.verypdf.com\n Demo", 255, 0, 0, 0, -45, 0, 1, 200, "", 48,
0, "", 0)
PdfStamp.veryCloseEx ($id)
}
$PdfStamp = null;
?>
id = oTest.veryOpenEx(szPDFFile, "d:\testtt\1.pdf")
If (id > 0) Then
page = 1
pagecount = oTest.veryGetFunctionEx(id, 206, 0, 0, 0, 0)
For page = 1 To pagecount
left = oTest.veryGetFunctionEx(id, Very_Get_PageBoxForStamp, page, 0,
"left", 0)
top = oTest.veryGetFunctionEx(id, Very_Get_PageBoxForStamp, page, 0, "top", 0)
pagewidth = oTest.veryGetFunctionEx(id, Very_Get_PageBoxForStamp, page, 0, "width", 0)
pageheight = oTest.veryGetFunctionEx(id, Very_Get_PageBoxForStamp, page, 0, "height", 0)
iRet = oTest.verySetFunctionEx(id, 131, page,
1, 0, 0)
strStampBuf = "Page:" + Str(pagecount - page + 1) + ", Page Box: [" + Str(left) + " " + Str(top) + " " + Str(pagewidth) + " " + Str(pageheight) + "]"
iRet = oTest.veryAddTextEx(id, 2, strStampBuf, 255, 0, 0, 0, 0, 0, 0, 300, 0, 10, 1, "http://www.verypdf.com", 0)
Next page
code = oTest.veryAddTextEx(id, 7, "\d\n\t", 255, 0, 50, -30, 0, 0, 0, 0, NullString, 10, 0, NullString, 0)
code = oTest.veryAddTextEx(id, 5, "Page \P3+1 of \c", 255, 0, -50, -30, 0, 0, 0, 0, NullString, 10, 0, NullString, 0)
code = oTest.veryAddTextEx(id, 3, "2003 verypdf.com Inc.", 2666666, 0, -30, 30, 0, 0, 0, 300, NullString, 10, 0, NullString, 0)
oTest.veryCloseEx (id)
Response.write "1.pdf Success!"
Else
Response.write "Open file failer!"
End If
To know more practical examples, please go to Try and Buy to download trial version where you can find more examples applied in other program languages.