Date stamp PDF on download by ASP

Question: I have a PDF which users can download. However, I need to have the date it was downloaded in the text on the PDF.Is there a way to insert a "date now" stamp on a PDF so it is dynamically added on opening? Perhaps you can add date stamp to a PDF through ASP? Is there a solution on VeryPDF?

Answer: According to your needs, maybe you can have a free trial of this software: VeryPDF PDF Stamp SDK, by this software, you can add date stamp to PDF dynamically by ASP. This software is professionally developed for adding stamp to PDF, by it you can also stamp PDF with images, text, graphic lines and rectangles. By the software toolkit, you can also call this software together with 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. Please check more information of this software toolkit on homepage, in the following part, let us check how to add date stamp to PDF through ASP.

Step 1. Free download PDF Stamp COM

  • When downloading finishes, there will be a zip file. Please extract it to some folder then you can check related elements and help documents.
  • By the COM version, you can integrate the corresponding SOFTWARE into your developed software and redistribute it with royalty-free.

Step 2. Stamp PDF by date stamp through ASP.

    • When you use this software, please refer to the usage and code template in extracted folder.
    • When add date stamp, you may need the following parameters:

\t—> Local time—> e.g. 10:10:10
\d—> Local date—> e.g. 2003-12-30
\D—> Local date—> e.g. 30-12-2003

1—>Stamps on the Top-Left of the page. (default)
2—>Stamps on the Top-Center of the page.
3—>Stamps on the Top-Right of the page.
4—>Stamps on the Right-Center of the page.
5—>Stamps on the Right-Bottom of the page.
6—>Stamps on the Bottom-Center of the page.
7—>Stamps on the Left-Bottom of the page.
8—>Stamps on the Left-Center of the page.
9—>Stamps on the Center of the page.

    • When you call this software from the ASP code, please refer to the following code templates:

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

During the using, if you have any question, please contact us as soon as possible.

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 PDF Stamp 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!