Create Dynamik Time Stamp
In some cases it is essential to know at what time a document has been printed. For that reason it is useful to create a PDF document containing a time stamp which updates itself whenever the document is printed.
With Aloaha this is very easy to accomplish. Please see the sample code below:
dim pdf
dim inputfile
dim outputfile
Dim TimeStampPage
dim FFTitle
dim JScript
dim FFTimeFormat
dim FFAlignment
dim FFPosLeft
dim FFPosTop
dim FFPosWidth
dim FFPosHeight
dim FFDefaultValue
dim FFDescription
FFDefaultValue=""
FFDescription=""
FFPosWidth=500
FFPosHeight=100
FFPosTop=300
FFPosLeft=20
FFAlignment=1 '0=left, 1=center, 2=right
FFTimeFormat=""
JScript=""
FFTitle="Aloaha TimeStamp"
TimeStampPage=1
inputfile="c:\Untitled.pdf"
outputfile="c:\Untitled1.pdf"
set pdf = createobject("aloahapdf.edit")
if pdf.load_pdf_to_mem(cstr(inputfile))=true then
if pdf.CreateDynamicTimeStamp(clng(TimeStampPage), cstr(FFTitle), cstr(JScript), cstr(FFTimeFormat),clng(FFAlignment), clng(FFPosLeft), clng(FFPosTop), clng(FFPosWidth), clng(FFPosHeight), cstr(FFDefaultValue), cstr(FFDescription)) =true then
if pdf.save_pdf_to_file(cstr(outputfile))=true then
msgbox "OK"
else
msgbox "Not OK"
end if
else
msgbox "Not OK"
end if
else
msgbox "Not OK"
end if
set pdf = nothing
SampeTimeStamp (477,27 KB)
If you need further information regarding the meaning of the variables etc. please do not hesitate to contact our support via the webform below:
Aloaha Software / Knowledge Base / PDF Form Saver SDK / Dynamik Time Stamp