Page 1 of 1
SynPDF+TSRichViewEdit,The inline-Images are deformed
Posted: Sun Feb 06, 2022 4:53 pm
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....
Re: SynPDF+TSRichViewEdit,The inline-Images are deformed
Posted: Sun Feb 06, 2022 6:01 pm
by Sergey Tkachenko
Please send this document to me as RVF, to email richviewgmailcom
Re: SynPDF+TSRichViewEdit,The inline-Images are deformed
Posted: Mon Feb 07, 2022 2:05 am
by wolf1860
I have sent the test file to
[email protected](Test rvf file for TSRichViewEdit.DrawPage(SynPDF)).
Re: SynPDF+TSRichViewEdit,The inline-Images are deformed
Posted: Thu Feb 10, 2022 9:50 am
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.
Re: SynPDF+TSRichViewEdit,The inline-Images are deformed
Posted: Thu Feb 10, 2022 3:55 pm
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:)
Re: SynPDF+TSRichViewEdit,The inline-Images are deformed
Posted: Fri Feb 11, 2022 12:44 pm
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.
Re: SynPDF+TSRichViewEdit,The inline-Images are deformed
Posted: Tue Feb 15, 2022 10:53 am
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...
Re: SynPDF+TSRichViewEdit,The inline-Images are deformed
Posted: Tue Feb 15, 2022 12:13 pm
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;
Re: SynPDF+TSRichViewEdit,The inline-Images are deformed
Posted: Thu Mar 10, 2022 4:43 pm
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]
Re: SynPDF+TSRichViewEdit,The inline-Images are deformed
Posted: Thu Mar 10, 2022 5:21 pm
by Sergey Tkachenko
Answered in a private message
Re: SynPDF+TSRichViewEdit,The inline-Images are deformed
Posted: Tue Mar 15, 2022 4:23 pm
by Sergey Tkachenko
The option of drawing metafiles as bitmaps is included in ScaleRichView 11.2 (uploaded today)