ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
Forum membership is Free!  Click Join to sign-up
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 Save vectored PDF as vectored SVG or EMF
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

JonMRobertson

USA
32 Posts

Posted - Oct 03 2024 :  11:50:48  Show Profile  Reply
I have PDFs that contain vector records rather than bitmaps, as confirmed using the PDF Objects demo. Calling PdfViewer.ExportPages to export a page as SVG generates a SVG with a rasterized bitmap of the page.

Are there plans to support exporting a vector PDF as a vectored SVG?

Does anyone know of a library that does?

Thanks

xequte

38610 Posts

Posted - Oct 03 2024 :  21:26:16  Show Profile  Reply
Hi Jon

Yes, that is correct. ImageEn only outputs rasterized bitmaps when saving to SVG, except when saving layers.

So you could try this:
1. Import the PDF page as layers
2. Save the layers to SVG

You can try this in our "Layers_AllTypes" demo, it supports loading from PDF files, and there is an SVG option under the View menu.

Note, however, that our native SVG support is limited at this stage.

Nigel
Xequte Software
www.imageen.com
Go to Top of Page

JonMRobertson

USA
32 Posts

Posted - Oct 04 2024 :  07:57:48  Show Profile  Reply
Thanks for the suggestion. The SVG generated by the demo when using View as SVG is still a rasterized bitmap encoded in the SVG.

My current project is basically a "mail merge" using a fillable PDF form and ReportBuilder. I am loading a PDF in ImageEn, populating the PDF fields, and copying the bitmap using TppImage.Picture.Bitmap.assign(ienView.Bitmap).

Thank you for adding support for PDF fields. It would be nice to see additional native SVG support in a future version of ImageEn.
Go to Top of Page

JonMRobertson

USA
32 Posts

Posted - Oct 04 2024 :  08:11:48  Show Profile  Reply
My first test using Layers_AllTypes was to use the Mouse Action Add Layer: Image, which has a different result than File->Load All Layers.

Load All Layers works closer to expected, although the PDF is not rendered as expected in TImageEnView and the generated SVG contains an encoding error.

I can email you the PDF that I'm using if you'd like me to.

Thanks

Jon
Go to Top of Page

xequte

38610 Posts

Posted - Oct 07 2024 :  22:55:28  Show Profile  Reply
Thanks Jon

I have sent you a fix for the encoding error.

Some points:

If you supply a PDF file when adding an image layer, the layer will only be a rasterization of the PDF page. You must use LayersImport() if you want the PDF objects added as layers.

Improving the quality of LoadFromFilePDF: If ImageEnView.PDFViewer is enabled, then the page will be rendered at maximum quality (not rasterized). If PDFViewer is disabled then the PDF is loaded as a rasterized image at the current DPI. You can improve the quality by increasing the DPI:

http://www.imageen.com/help/TIEGlobalSettings.PdfViewerDefaults.html


Nigel
Xequte Software
www.imageen.com
Go to Top of Page

JonMRobertson

USA
32 Posts

Posted - Oct 08 2024 :  07:46:41  Show Profile  Reply
Thanks for the additional info. I have PDFViewer enabled. I appreciate the additional functionality/integration with PDFium in the latest release of ImageEn!

Jon
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: