function PageToDevice(PageX, PageY: Double; Left, Top, Width, Height: Integer; Rotation: TRotation; out X, Y: Integer): Boolean;
| PageX, PageY | Double. The PDF user-space coordinates to convert (origin at lower-left, units in points). |
| Left, Top, Width, Height | Integer. The rendering rectangle that was passed to the corresponding RenderPage call. |
| Rotation | TRotation. İşleme sırasında kullanılan sayfa döndürmesi. Şuna geçirilen değerle eşleşmelidir RenderPage. |
| X, Y | Integer. Output parameters that receive the converted device-space pixel coordinates (origin at top-left). |
True if the conversion succeeded, or False if it failed (for example, if no page is loaded).PDF user space içindeki bir noktayı device space’e (ekran pikseli) dönüştürür. Bu yöntemi, bilinen bir PDF koordinat konumunun render edilen görüntüde nereye düştüğünü belirlemek için kullanın — örneğin bir annotation overlay ya da highlight rectangle yerleştirmek için
PDF user space has its origin at the lower-left corner of the page, with the Y axis pointing upward. Device space has its origin at the top-left corner of the render rectangle, with the Y axis pointing downward.
The Left, Üst, Width, Height, and Rotation parameters must match exactly what was passed to the RenderPage call that produced the image being mapped onto.
// Draw a marker on screen at a known PDF position
var
ScreenX, ScreenY: Integer;
begin
if Pdf.PageToDevice(100.0, 200.0, 0, 0,
PdfPanel.Width, PdfPanel.Height, ro0, ScreenX, ScreenY) then
begin
Canvas.Pen.Color := clRed;
Canvas.Ellipse(ScreenX - 4, ScreenY - 4, ScreenX + 4, ScreenY + 4);
end;
end;