I'm trying to put page numbers in the footer of a PDF derived from a TIFF .
The following is the code that utilized in the example :
Code: Select all
GdPicturePDFArq : = TGdPicturePDF.Create ( NIL ) ;
GdPicturePDFArq.LoadFromFile ( ' C : \ trans1.pdf ' , false) ;
For i: = 1 To GdPicturePDFArq.GetPageCount the
Begin
GdPicturePDFArq.SelectPage ( i);
source: GdPicturePDFArq.AddTrueTypeFont = ( ' Arial ' , false , false , false ) ;
GdPicturePDFArq.SetTextMode ( PdfTextMode_PdfTextModeOutlinePath );
GdPicturePDFArq.SetTextSize (30);
GdPicturePDFarq.SetFillColor_2 ( 255,0,0,0 );
GdPicturePDFarq.SetOrigin ( PdfOrigin_PdfOriginTopLeft );
GdPicturePDFarq.SetMeasurementUnit ( PdfMeasurementUnit_PdfMeasurementUnitCentimeter );
GdPicturePDFarq.DrawText ( source , 1,1 , ' Page: ' + IntToStr ( i ) ) ;
end ;
in various methods , returns me the message .
What can it be?
The following methods , display the same error.
SetTextMode
SetMeasurementUnit
DrawText