easyPDF SDK Usermanual
PDF Creator Programming API  |  Download Free Trial  |  Contact Us to Purchase

AddDateTimeTextForPrint Method

Add datetime text for print only. The DateTime will not be visible during PDF viewing in Adobe Acrobat/Acrobat Reader.

Sub AddDateTimeTextForPrint(InputFileName As String,
                            OutputFileName As String,
                            JSStream As String,
                            Left As Double,
                            Top As Double,
                            Right As Double,
                            Bottom As Double,
                            FieldName As String)

void AddDateTimeTextForPrint(string InputFileName,
                             string OutputFileName,
                             string JSStream,
                             double Left,
                             double Top,
                             double Right,
                             double Bottom,
                             string FieldName)

void AddDateTimeTextForPrint(String InputFileName,
                             String OutputFileName,
                             String JSStream,
                             double Left,
                             double Top,
                             double Right,
                             double Bottom,
                             String FieldName) throws PDFProcessorException


Return Values



Note 1: Coordinate system information:
1. The unit size of PDF user space is 1/72 inch (1 inch = 72 PDF user space unit).
2. The location of the origin (0, 0) is at top-left corner.

Example Usage

Set oProcessor = CreateObject("easyPDF.PDFProcessor.8")
oProcessor.AddDateTimeTextForPrint "C:\test\input.pdf", _
                                   "C:\test\output.pdf", _
                                   "C:\test\JStemplate.js", _
                                   37.4999, _
                                   53.2493, _
                                   570.938, _
                                   25.1243, _
Javascript sample:
  This is a sample template for setting up font, text size and alignment for particular field.
  If you need to use comments, please don't use "//" in this template file. Use "*/ /*" instead.
var fldObj = this.getField("print_footer");
var sText = "Printed Document only effective on: ";
var sDate = new Date();
var sDateStr = util.printd("mm/dd/yyyy", sDate);
fldObj.value = sText + sDateStr;
set up font
Controls how the text font is laid out within the text field. Values are
Text Font               Keyword
Times-Roman             font.Times
Times-Bold              font.TimesB
Times-Italic            font.TimesI
Times-BoldItalic        font.TimesBI
Helvetica               font.Helv
Helvetica-Bold          font.HelvB
Helvetica-Oblique       font.HelvI
Helvetica-BoldOblique   font.HelvBI
Courier                 font.Cour
Courier-Bold            font.CourB
Courier-Oblique         font.CourI
Courier-BoldOblique     font.CourBI
Symbol                  font.Symbol
ZapfDingbats            font.ZapfD
fldObj.textFont = font.Cour;
set up text size
Specifies the text size (in points) to be used in all controls. 
Valid text sizes range from 0 to 32767, 
inclusive. A value of zero means the largest point size that allows 
all text data to fit in the field�s rectangle.
fldObj.textSize = 8;
set up alignment
Controls how the text is laid out within the text field. Values are
fldObj.alignment = "center";
fldObj.readonly = false;
fldObj.hidden = false;