SynPDF+TSRichViewEdit,The inline-Images are deformed

General TRichView support forum. Please post your questions here
Post Reply
wolf1860
Posts: 108
Joined: Sat Nov 21, 2015 2:04 am

SynPDF+TSRichViewEdit,The inline-Images are deformed

Post by wolf1860 »

I call TSRichViewEdit.DrawPage method to export PDF file by SynPDF library.All the inline-images are deformed.like this,the other images are right.
I tested TRVPrint.DrawPage,the inline-images are right.
I have no idea whether u can help me....


Image
Sergey Tkachenko
Site Admin
Posts: 17253
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Re: SynPDF+TSRichViewEdit,The inline-Images are deformed

Post by Sergey Tkachenko »

Please send this document to me as RVF, to email richviewgmailcom
wolf1860
Posts: 108
Joined: Sat Nov 21, 2015 2:04 am

Re: SynPDF+TSRichViewEdit,The inline-Images are deformed

Post by wolf1860 »

I have sent the test file to [email protected](Test rvf file for TSRichViewEdit.DrawPage(SynPDF)).
Sergey Tkachenko
Site Admin
Posts: 17253
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Re: SynPDF+TSRichViewEdit,The inline-Images are deformed

Post by Sergey Tkachenko »

Hello,

Unfortunately, I do not know how to make SynPDF to render embedded TMetafile properly, if the document is drawn scaled.
I can suggest an option to export metafiles as bitmaps. They will not look as good as metafiles when printing, but they have proper sizes.
Unfortunately, in the current version, this option is implemented in TRichView (in TRVReportHelper and TRVPrint components), but not implemented in ScaleRichView.
I implemented it in my working version of ScaleRichView. If you have the active the active period of updates of TRichView and ScaleRichView, I can send changes to you.

Or you can try LLPDFLib or eDocEngine.
wolf1860
Posts: 108
Joined: Sat Nov 21, 2015 2:04 am

Re: SynPDF+TSRichViewEdit,The inline-Images are deformed

Post by wolf1860 »

Thank u again:) I found TRVPrint export pdf worked fine:Just need set the margins property,so I avoided the problem.That's enough:) By the way,LLibPDF is not stable for me when I try to export many rvf files,SynPDF is perfect. I have bought the update license:)
standay
Posts: 256
Joined: Fri Jun 18, 2021 3:07 pm

Re: SynPDF+TSRichViewEdit,The inline-Images are deformed

Post by standay »

wolf1860 wrote: Thu Feb 10, 2022 3:55 pm Thank u again:) I found TRVPrint export pdf worked fine:Just need set the margins property,so I avoided the problem.That's enough:) By the way,LLibPDF is not stable for me when I try to export many rvf files,SynPDF is perfect. I have bought the update license:)
Interesting posts about exporting to PDF. I tried LLibPDF and SynPDF. LLibPDF was a bit easier to implement, although you have to tie it to an rv preview to use. SynPDF seemed to work a bit better and does not have to be tired to a preview to work. I have Adobe Acrobat and so I have an Adobe PDF printer as well. However, I found just using the built-in Microsoft PDF printer was the easiest way around a PDF library.

I would guess eDocEngine might be the best library to use, but it's not free and I can't justify the cost.

While I have SynPDF working, I can't see it providing anything I don't already get with the MS PDF printer, so I may remove SynPDF. For now I'm testing it to see if there's any reason to keep it.
jonjon
Posts: 435
Joined: Sat Aug 27, 2005 4:19 pm

Re: SynPDF+TSRichViewEdit,The inline-Images are deformed

Post by jonjon »

I've tried many PDF engines before choosing SynPDF. A few notes about some of them which you might find useful:
- eDocEngine is fine for most tasks but is costly, has many bugs, bad support, rare updates with frequent breaking changes. Its rendering is not always good on screens with different DPI settings
- SynPDF has a great feature set with great rendering. It is free but not really supported. Updates are rare because his creator feels that every enhancements break something for someone else. However, it is open source, with forks and patches from a big enough community
- You shouldn't rely on "MS PDF printer" which might not be installed on every computers, except if you control where you application is installed
- Most other PDF engines I've tried but discarded due to bugs, limitations, lack of support...
standay
Posts: 256
Joined: Fri Jun 18, 2021 3:07 pm

Re: SynPDF+TSRichViewEdit,The inline-Images are deformed

Post by standay »

jonjon wrote: Tue Feb 15, 2022 10:53 am I've tried many PDF engines before choosing SynPDF...
- You shouldn't rely on "MS PDF printer" which might not be installed on every computers, except if you control where you application is installed
- Most other PDF engines I've tried but discarded due to bugs, limitations, lack of support...
Interesting info, thanks. So far, yes, I've left synpdf in my app mainly in case the MS PDF printer might be missing. It's not causing any other issues so far. I also tried a number of PDF things in the past and had no luck with them as well. I never tried eDocEngine. Even if it had worked I can't justify the cost for what I'm doing.

I had to add these 2 things for synpdf to work as I needed:

Code: Select all

  // Workaround: metafiles may be exported incorrectly in non-screen resolution
  RVPrint1.NoMetafiles := PDFPixelsPerInch <> Screen.PixelsPerInch;
  //Bullets fix: https://www.trichview.com/forums/viewtopic.php?t=8966&hilit=synpdf+bullets
  RVPrint1.MetafileCompatibility := True;
wolf1860
Posts: 108
Joined: Sat Nov 21, 2015 2:04 am

Re: SynPDF+TSRichViewEdit,The inline-Images are deformed

Post by wolf1860 »

Sergey Tkachenko wrote: Thu Feb 10, 2022 9:50 am I implemented it in my working version of ScaleRichView. If you have the active the active period of updates of TRichView and ScaleRichView, I can send changes to you.
I need the changes to test my app export pdf ,and I have bought the license.my email : [email protected]
Sergey Tkachenko
Site Admin
Posts: 17253
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Re: SynPDF+TSRichViewEdit,The inline-Images are deformed

Post by Sergey Tkachenko »

Answered in a private message
Sergey Tkachenko
Site Admin
Posts: 17253
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Re: SynPDF+TSRichViewEdit,The inline-Images are deformed

Post by Sergey Tkachenko »

The option of drawing metafiles as bitmaps is included in ScaleRichView 11.2 (uploaded today)
Post Reply