Question:If you've got a large document (500 pages+) in PDF and want to VeryPDF? I hope the process could be done under PHP code.s, does anyone know how to do this? Is there ant solution on
Answer: According to your needs, maybe you can have a free trial of this software:VeryPDF PDF Stamp SDK, by which you can to PDF from 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. This software is a professional tool of stamping PDF by various stamps. And page number could be considered as one of stamp on PDF. Please check more detail information of this software on homepage, in the following part, I will show you how to use this software.
Step 1. Free download PDF Stamp COM
- This COM version 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.
- When downloading finishes, there will be a zip file. Please extract it to some folder then you can check related elements, help document and code templates of calling this software together with other application.
Step 2. Add page number to PDF from PHP code.
- When you use this software, please refer to the usage and examples. As this software either can be used as command line software, here are some parameters and examples for your reference:
- Here is one code of calling this software from PHP code, please have a check.
\P±n Current page number±a specified value Maybe "Page \p+1" equal "Page 4"
\c Total page number Maybe "Total \c" equal "Total 3"
pdfstamp.exe -PDF "example.pdf" -o "opacity.pdf" -AT "VeryPDF Opacity" -FT "Arial" -P9 -FS100 -opacity50 -C#FF0000 -AI logo.jpg -opacity80 -P2 -AL -LW30 -opacity30 -LINEEX 100,100,200,200
pdfstamp.exe -PDFs "C:\*.pdf" -o "C:\out" -AT "An example for '-PDFS' parameter" -p2 -fs32 -c2666666 -mtb200
Please check more usage and example on User Manual.
$PdfStamp =new COM("PDFStampOCX.CPDFStamp") or die("Cannot start PDFStampOCX");
$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 = null;
Now let us check the stamping effect from the following snapshot. During the using, if you have any question, please contact us as soon as possible.