PDF Creator Pilot documentation |
Download CHM version of this manual. |
|
![]() ![]() ![]() ![]() Collapse AllThis method shifts PDF document page coordinates.
|
| HRESULT PDFPAGE_Translate ( DOUBLE x, DOUBLE y ) |
Parameters
x
X distance
y
Y distance
Return value
If successful, this method returns S_OK. If it fails, this method should return one of the error values.
Remarks
This method shifts the coordinate system by distances supplied for x and y. The startup value of translation is (0, 0).
Equivalent in new interface: IPDFDocument4::TranslateCoords.
Example
Shifting Coordinates
Delphi
[copy to clipboard]
{ PDF object is supposed to be created }
PDF.BeginDoc;
PDF.PDFPAGE_Rectangle(100, 100, 240, 140);
PDF.PDFPAGE_Stroke;
PDF.PDFPAGE_Translate(10, 10);
PDF.PDFPAGE_Rectangle(100, 100, 240, 140);
PDF.PDFPAGE_Stroke;
PDF.EndDoc;
C/C++
[copy to clipboard]
// PDF object is supposed to be created PDF->BeginDoc(); PDF->PDFPAGE_Rectangle(100, 100, 240, 140); PDF->PDFPAGE_Stroke(); PDF->PDFPAGE_Translate(10, 10); PDF->PDFPAGE_Rectangle(100, 100, 240, 140); PDF->PDFPAGE_Stroke(); PDF->EndDoc();
C#
[copy to clipboard]
// PDF object is supposed to be created PDF.BeginDoc(); PDF.PDFPAGE_Rectangle(100, 100, 240, 140); PDF.PDFPAGE_Stroke(); PDF.PDFPAGE_Translate(10, 10); PDF.PDFPAGE_Rectangle(100, 100, 240, 140); PDF.PDFPAGE_Stroke(); PDF.EndDoc();
Visual Basic
[copy to clipboard]
' PDF object is supposed to be created PDF.BeginDoc PDF.PDFPAGE_Rectangle 100, 100, 240, 140 PDF.PDFPAGE_Stroke PDF.PDFPAGE_Translate 10, 10 PDF.PDFPAGE_Rectangle 100, 100, 240, 140 PDF.PDFPAGE_Stroke PDF.EndDoc
See Also
Reference


