原創|使用教程|編輯:何家巧|2022-12-22 11:11:46.470|閱讀 314 次
概述:今天我們將向大家介紹 報表工具FastReport VCL 的導出選項功能—— PDF/A。
# 界面/圖表報表/文檔/IDE等千款熱門軟控件火熱銷售中 >>
相關鏈接:
Fastreport是目前世界上主流的圖表控件,具有超高性價比,以更具成本優勢的價格,便能提供功能齊全的報表解決方案,連續三年蟬聯全球文檔創建組件和庫的“ Top 50 Publishers”獎。
慧都科技是Fast Reports在中國區十余年的友好合作伙伴,連續多年被Fast Reports授予中國區Best Partner稱號。
今天我們將向您介紹 FastReport VCL 的導出選項,我們的開發團隊在每次更新時都會添加許多新功能。我們早在 2017 年就添加的導出格式,今天我們來一起討論 PDF/A 及其功能。
由于包含所有數據,PDF/A 文檔將比 PDF 稍大。
創建模板后,讓我們切換到完成報表的預覽模式。在左上角找到導出為 PDF。
A 級一致性旨在通過允許輔助軟件(例如屏幕閱讀器)更精確地提取和解釋文件內容,來提高身體受損用戶對一致性文件的可訪問性
PDF/A-2 標準 (ISO 19005-2)
PDF/A-2 解決了 PDF 版本 1.5、1.6 和 1.7 添加的一些新功能。PDF/A-2 與 PDF/A-1 具有向后兼容性,這意味著所有 PDF/A-1 文檔都必須與 PDF/A-2 兼容。但是,PDF/A-2 不一定符合 PDF/A-1。
PDF/A-3 標準 (ISO 19005-3)
PDF/A-3 在一個重要方面不同于 PDF/A-2:它允許嵌入。此外,它不僅可以是其他 PDF/A(PDF/A-2 支持),還可以是任何其他文件。這對于存檔至關重要。
這是添加到 PDF 文件的內部信息的部分:標題、作者、主題、關鍵字(您可以將 PDF 上傳到網絡,它們有很好的索引)、PDF 創建者和文檔制作者。
這是添加到 PDF 文件的內部信息的部分:標題、作者、主題、關鍵字(您可以將 PDF 上傳到網絡,它們有很好的索引)、PDF 創建者和文檔制作者。
如何從 Delphi 或 Lazarus 代碼生成 PDF/A
procedure TForm1.Button1Click(Sender: TObject); begin {Generate a report. We must generate a report before exporting} frxReport1.PrepareReport(); {Set the range of exported pages. All pages of the generated report are exported by default} frxPDFExport1.PageNumbers := '2-3'; {Set the PDF standard TPDFStandard = (psNone, psPDFA_1a, psPDFA_1b, psPDFA_2a, psPDFA_2b, psPDFA_3a, psPDFA_3b); Adding frxExportPDFHelpers module to the uses list is required: uses frxExportPDFHelpers;} frxPDFExport1.PDFStandard := psNone; {For PDFStandard = psNone you can set the version of the PDF standard TPDFVersion = (pv14, pv15, pv16, pv17); Adding frxExportPDFHelpers module to the uses list is required: uses frxExportPDFHelpers;} frxPDFExport1.PDFVersion := pv17; {You can set compression for a smaller file size} frxPDFExport1.Compressed := True; {Set whether fonts should be embedded in the resulting document. Font embedding significantly increases the size of the resulting document} frxPDFExport1.EmbeddedFonts := False; {Set whether to export the background image of the page} frxPDFExport1.Background := True; {Disable the export of print optimized objects.} {When the option is enabled, the image quality will be better, but they will be 9 times larger} frxPDFExport1.PrintOptimized := False; {Set whether the resulting PDF will include an external table of contents, as in the original report} frxPDFExport1.Outline := False; {Set whether to export images with transparency} frxPDFExport1.Transparency := True; {You can set the desired DPI for images. Enabling this option disables the SaveOriginalImages function,} {which allows saving images in their original form.} frxPDFExport1.PictureDPI := 150; {Set compression ratio of raster images} frxPDFExport1.Quality := 95; {Set whether to open the resulting file after export} frxPDFExport1.OpenAfterExport := False; {Set whether to display export progress (show which page is currently being exported)} frxPDFExport1.ShowProgress := False; {Set whether to display a dialog box with export filter settings} frxPDFExport1.ShowDialog := False; {Set the name of the resulting file. Note that if you do not set a file name and disable the export filter dialog window,} {the dialog will still be displayed for file name selection.} frxPDFExport1.FileName := 'C:\Output\test.pdf'; {Fill in the corresponding fields of the Information tab} frxPDFExport1.Title := 'Your Title'; frxPDFExport1.Author := 'Your Name'; frxPDFExport1.Subject := 'Your Subject'; frxPDFExport1.Keywords := 'Your Keywords'; frxPDFExport1.Creator := 'Creator Name'; frxPDFExport1.Producer := 'Producer Name'; {Fill in the corresponding fields of the Security tab} frxPDFExport1.UserPassword := 'User Password'; frxPDFExport1.OwnerPassword := 'Owner Password'; frxPDFExport1.ProtectionFlags := [ePrint, eModify, eCopy, eAnnot]; {Set up viewer settings (Viewer tab)} frxPDFExport1.HideToolbar := False; frxPDFExport1.HideMenubar := False; frxPDFExport1.HideWindowUI := False; frxPDFExport1.FitWindow := False; frxPDFExport1.CenterWindow := False; frxPDFExport1.PrintScaling := False; {Export the report} frxReport1.Export(frxPDFExport1); end;
本次FastReport使用教程中關于如何使用FastReport VCL 設計器中的 PDF/A的相關內容就到這里了,更多教程進入慧都官網查看。
更多產品授權信息點擊查看FastReport VCL價格,或者咨詢慧都在線客服。
FastReport技術QQ群:536197826 歡迎進群一起討論
本站文章除注明轉載外,均為本站原創或翻譯。歡迎任何形式的轉載,但請務必注明出處、不得修改原文相關鏈接,如果存在內容上的異議請郵件反饋至chenjj@fc6vip.cn