[Demo] Advanced RTF to PDF demo using LLPDFLib (open source)
-
- Site Admin
- Posts: 17565
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
[Demo] Advanced RTF to PDF demo using LLPDFLib (open source)
Update 2017-Dec-4] TRichView setup now includes better version of this demo in <TRichViewDir>\ThirdParty\Export\LLPDFLib\Demos\RV2PDF\ folder. This better version reads all page properties from source RTF (or RVF) files and applies them to PDF, supports headers, footers, footnotes and endnotes, displays preview before exporting.
See http://www.trichview.com/forums/viewtop ... 951#p34100
The basic demo is here:
http://www.trichview.com/resources/llpd ... pdf_v4.zip (uses LLPDFLib v4 and v5)
http://www.trichview.com/resources/llpd ... pdf_v3.zip (uses LLPDFLib v3)
The new advanced demo is here:
http://www.trichview.com/resources/llpd ... _ex_v4.zip (uses LLPDFLib v4 and v5)
http://www.trichview.com/resources/llpd ... _ex_v3.zip (uses LLPDFLib v3)
This demo adds the following features:
- header and footer
- hyperlinks (both links to URL and to another page)
- reading margins, positions of header and footer, page orientation from RTF.
The demos use open source thirdparty components LLPDFLib,
http://www.sybrex.com
Updates:
2017-Dec-4: TRichView Setup now includes a better version of this demo
2016-Sep-8: LLPDFLib becomes open source
2015-Sep-23: compatibility with TRichView 16
2011-Oct-1: compatibility with TRichView 13.4
2009-Mar-14: version for LLPDFLib v4
2008-Dec-11: updated for compatibility with TRichView 11
See http://www.trichview.com/forums/viewtop ... 951#p34100
The basic demo is here:
http://www.trichview.com/resources/llpd ... pdf_v4.zip (uses LLPDFLib v4 and v5)
http://www.trichview.com/resources/llpd ... pdf_v3.zip (uses LLPDFLib v3)
The new advanced demo is here:
http://www.trichview.com/resources/llpd ... _ex_v4.zip (uses LLPDFLib v4 and v5)
http://www.trichview.com/resources/llpd ... _ex_v3.zip (uses LLPDFLib v3)
This demo adds the following features:
- header and footer
- hyperlinks (both links to URL and to another page)
- reading margins, positions of header and footer, page orientation from RTF.
The demos use open source thirdparty components LLPDFLib,
http://www.sybrex.com
Updates:
2017-Dec-4: TRichView Setup now includes a better version of this demo
2016-Sep-8: LLPDFLib becomes open source
2015-Sep-23: compatibility with TRichView 16
2011-Oct-1: compatibility with TRichView 13.4
2009-Mar-14: version for LLPDFLib v4
2008-Dec-11: updated for compatibility with TRichView 11
Last edited by Sergey Tkachenko on Fri Sep 09, 2016 1:27 pm, edited 9 times in total.
-
- Site Admin
- Posts: 17565
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
OK so I understand you wrote the llPdfLib one ?
Any chance you'd be able to give me your thoughts about both libraries regarding to PDF export from a TRichView document ?
On one hand I find the llPdfLib isn't really followed by its author (time between releases is really long and support has been criticized on the forums). On the other hand, it seems that it produces better looking and more customizable PDF documents coming from a TRichView source.
Thanks,
John.
Any chance you'd be able to give me your thoughts about both libraries regarding to PDF export from a TRichView document ?
On one hand I find the llPdfLib isn't really followed by its author (time between releases is really long and support has been criticized on the forums). On the other hand, it seems that it produces better looking and more customizable PDF documents coming from a TRichView source.
Thanks,
John.
-
- Site Admin
- Posts: 17565
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
I never used any of these libraries myself in real applications.
By the way, a new version of LLPDFLib is just released, and these demos need to be checked for compatibility with it.
There is a different approach in TRichView PDF generation for eDocEngine and llPDFLib.
llPDFLib contains nothing special related to TRichView. It just provides a Canvas where you can draw anything that you want, including TRichView documents. This drawing will be saved in PDF. Since you can implement drawing yourself (like it is shown in this demo), you can create any complex page layout, but it requires writing code.
eDocEngine provides a component for exporting TRichView in PDF. It is easier to use - just place a component and set its properties. But this approach is limited to features included in this component. If it, for example, does not support headers and footers, you cannot add them. I do not know, may be eDocEngine can be used in a low-level way, like llPDFLib. When I'll have time, I'll test it.
By the way, a new version of LLPDFLib is just released, and these demos need to be checked for compatibility with it.
There is a different approach in TRichView PDF generation for eDocEngine and llPDFLib.
llPDFLib contains nothing special related to TRichView. It just provides a Canvas where you can draw anything that you want, including TRichView documents. This drawing will be saved in PDF. Since you can implement drawing yourself (like it is shown in this demo), you can create any complex page layout, but it requires writing code.
eDocEngine provides a component for exporting TRichView in PDF. It is easier to use - just place a component and set its properties. But this approach is limited to features included in this component. If it, for example, does not support headers and footers, you cannot add them. I do not know, may be eDocEngine can be used in a low-level way, like llPDFLib. When I'll have time, I'll test it.
-
- Site Admin
- Posts: 17565
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
The demo is updated for LLPDF v4 compatibility.
The following changes were made:
- "PDF" is removed from USES, "llPDFDocument, llPDFTypes, llPDFCanvas" is added there;
- assignment to Size and Orientation properties of PDF page is changed (since they are write-only properties in v4);
- CurrentPageIndex property is used instead of SetCurrentPage method.
The following changes were made:
- "PDF" is removed from USES, "llPDFDocument, llPDFTypes, llPDFCanvas" is added there;
- assignment to Size and Orientation properties of PDF page is changed (since they are write-only properties in v4);
- CurrentPageIndex property is used instead of SetCurrentPage method.
-
- Site Admin
- Posts: 17565
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
-
- Site Admin
- Posts: 17565
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
We updated the demos for compatibility with TRichView 16: for report helpers, True is assigned to MetafileCompatibility property.
Since TRichView, TRichView draws text using glyph indexes in fonts instead of character codes. LLPDF processes such text output correctly, and PDF looks as expected. Also, fonts are embedded by default, so these PDF must look identically on all computers.
However, Adobe Reader cannot copy such text correctly to the Clipboard.
If MetafileCompatibility=True, TRichView draws text using character codes, like before. This mode is less efficient, however it helps to avoid problems with PDF export.
Since TRichView, TRichView draws text using glyph indexes in fonts instead of character codes. LLPDF processes such text output correctly, and PDF looks as expected. Also, fonts are embedded by default, so these PDF must look identically on all computers.
However, Adobe Reader cannot copy such text correctly to the Clipboard.
If MetafileCompatibility=True, TRichView draws text using character codes, like before. This mode is less efficient, however it helps to avoid problems with PDF export.
-
- Site Admin
- Posts: 17565
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
Hot news: LLPDFLib becomes open source.
The license is GNU Affero General Public License (GNU AGPL), with the addendum, see LICENSE file on the link above.
A commercial license is still available, you can purchase it to release yourself from the requirements of GNU AGPL.
Disclaimer: LLPDFLib is developed and copyrighted by Sybrex Systems. We are not affiliated with Sybrex Systems, except for a possibility of using our programming libraries together.
The license is GNU Affero General Public License (GNU AGPL), with the addendum, see LICENSE file on the link above.
A commercial license is still available, you can purchase it to release yourself from the requirements of GNU AGPL.
Disclaimer: LLPDFLib is developed and copyrighted by Sybrex Systems. We are not affiliated with Sybrex Systems, except for a possibility of using our programming libraries together.
-
- Site Admin
- Posts: 17565
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
Re: [Demo] Advanced RTF to PDF demo using LLPDFLib (open source)
TRichView setup now includes better version of this demo in <TRichViewDir>\ThirdParty\Export\LLPDFLib\Demos\RV2PDF\ folder. This better version reads all page properties from source RTF (or RVF) files and applies them to PDF, supports headers, footers, footnotes and endnotes, displays preview before exporting.
See http://www.trichview.com/forums/viewtop ... 951#p34100
See http://www.trichview.com/forums/viewtop ... 951#p34100