|
THPDFPage |
الأعلى السابق التالي |
|
يمثّل THPDFPage صفحة واحدة داخل مستند PDF
الوحدة HPDFDoc.pas
الوصف استخدم THPDFPage لرسم المسارات ووضع النص وعرض الصور والتحكم في إعدادات مستوى الصفحة مثل الحجم والاتجاه وحالة الرسومات استخدم في سير العمل المعتاد ينشئ
مثال للاستخدام:
uses ... HPDFDoc, ...
type ... HPDF: THotPDF; TextBoxResult: THPDFTextOutBoxResult; ...
procedure TForm1.HelloWorldButtonClick(Sender: TObject); begin HPDF.AutoLaunch := true; // Show the PDF after it is created HPDF.FileName := '.\HelloWorld.pdf'; HPDF.BeginDoc; // Start PDF generation HPDF.CurrentPage.TextOut(10, 10, 0, 'Hello World!'); // Write text on the first page HPDF.CurrentPage.TextFromBaseLine(true); // Treat following text Y values as baselines HPDF.CurrentPage.TextOut(10, 40, 0, 'Baseline text'); HPDF.CurrentPage.TextFromBaseLine(false); TextBoxResult := HPDF.CurrentPage.TextOutBoxEx(10, 70, 2, 180, 48, 'Wrapped text-box content', jtLeft); HPDF.CurrentPage.AppendScopedRawContent('2 w 10 10 120 45 re S'); HPDF.EndDoc; // Finalize and save the PDF end;
|