trichview.com Forum Index trichview.com
TRichView support forums
 

[Demo] Advanced RTF to PDF demo using LLPDFLib (open source)


 
Post new topic   Reply to topic    trichview.com Forum Index -> Examples, Demos
    View previous topic :: View next topic  
Author Message
Sergey Tkachenko
Site Admin


Joined: 27 Aug 2005
Posts: 12881

PostPosted: Thu May 15, 2008 1:45 pm    Post subject: [Demo] Advanced RTF to PDF demo using LLPDFLib (open source) Reply with quote

The basic demo is here:
http://www.trichview.com/resources/llpdflib/rvll_rtf2pdf_v4.zip (uses LLPDFLib v4 and v5)
http://www.trichview.com/resources/llpdflib/rvll_rtf2pdf_v3.zip (uses LLPDFLib v3)

The new advanced demo is here:
http://www.trichview.com/resources/llpdflib/rvll_rtf2pdf_ex_v4.zip (uses LLPDFLib v4 and v5)
http://www.trichview.com/resources/llpdflib/rvll_rtf2pdf_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,
https://github.com/sybrexsys/llPDFLib
http://www.sybrex.com

Updates:
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
Back to top
View user's profile Send private message Visit poster's website
jonjon



Joined: 27 Aug 2005
Posts: 268

PostPosted: Mon Mar 02, 2009 4:17 pm    Post subject: Reply with quote

Does the same demo (with links) exists for Gnostice's eDocEngine ? That would be great!

John.
Back to top
View user's profile Send private message
Sergey Tkachenko
Site Admin


Joined: 27 Aug 2005
Posts: 12881

PostPosted: Wed Mar 04, 2009 4:55 pm    Post subject: Reply with quote

PDF export with eDocEngine was implemented by Gnostice. I did not tested it myself. I plan to review it and make improvements in future, but not right now, sorry.
Back to top
View user's profile Send private message Visit poster's website
jonjon



Joined: 27 Aug 2005
Posts: 268

PostPosted: Wed Mar 04, 2009 6:26 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
Sergey Tkachenko
Site Admin


Joined: 27 Aug 2005
Posts: 12881

PostPosted: Thu Mar 05, 2009 8:21 am    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message Visit poster's website
Sergey Tkachenko
Site Admin


Joined: 27 Aug 2005
Posts: 12881

PostPosted: Sat Mar 14, 2009 4:57 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message Visit poster's website
ErichMorr



Joined: 12 Mar 2012
Posts: 2

PostPosted: Mon Mar 12, 2012 12:06 pm    Post subject: Reply with quote

Most rtf to pdf converters do need a standalone program requires Adobe Acrobat software support. Is it the same about this demo?

Thanks,
Regards.
Back to top
View user's profile Send private message Visit poster's website
Sergey Tkachenko
Site Admin


Joined: 27 Aug 2005
Posts: 12881

PostPosted: Mon Mar 12, 2012 3:16 pm    Post subject: Reply with quote

No, this demo does not use Acrobat. It uses only TRichView and LLPDFLib component, both are compiled inside the exe file, so no additional libraries or software are required.
Back to top
View user's profile Send private message Visit poster's website
Sergey Tkachenko
Site Admin


Joined: 27 Aug 2005
Posts: 12881

PostPosted: Wed Sep 23, 2015 6:14 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message Visit poster's website
Sergey Tkachenko
Site Admin


Joined: 27 Aug 2005
Posts: 12881

PostPosted: Fri Sep 09, 2016 1:25 pm    Post subject: Reply with quote

Hot news: LLPDFLib becomes open source.

It can be downloaded from https://github.com/sybrexsys/llPDFLib

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.
Back to top
View user's profile Send private message Visit poster's website
Martian



Joined: 03 Apr 2011
Posts: 77

PostPosted: Wed Dec 14, 2016 12:08 am    Post subject: Problem with hieroglyph Reply with quote

There is a problem exporting texts with hieroglyphs.
Please try this sample:
https://www.sendspace.com/file/bn2i7w

My app exports empty PDF but I will fix it. Your sample exports empty squares and Chinese font is not embedded. Just Arial.

I'm not sure where is the problem in llPDFLib or TRichView.
Back to top
View user's profile Send private message
Martian



Joined: 03 Apr 2011
Posts: 77

PostPosted: Wed Dec 14, 2016 12:12 am    Post subject: Reply with quote

One more thing. Is there a way to scale RVE images to make them fit to exported PDF?
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    trichview.com Forum Index -> Examples, Demos All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group