Welcome Guest Search | Active Topics | Sign In | Register

PDF Page To Png or EMF Options
Lionello Giampaolo PROMETEO SRL
Posted: Tuesday, March 7, 2023 5:41:41 AM
Rank: Member
Groups: Member

Joined: 11/8/2021
Posts: 13
Hi all,
is it possible to save a pdf page to a png or better emf?
There are various external tools that do this but I would like a single solution.

Thanks
Kind regards
eo_support
Posted: Tuesday, March 7, 2023 12:47:17 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 23,680
Hi,

You do not need external tools for this. The key is this is a two steps process:

Step 1. Use our library to render a PDF page to a System.Drawing.Image object;
Step 2. Use built-in .NET function to save the System.Drawing.Image object to the format you wanted;

For example, if you search "C# save Image to EMF" you may come up this which contains code on how to do step 2.

https://stackoverflow.com/questions/152729/gdi-c-how-to-save-an-image-as-emf

You can do the search for png file.

Thanks!
Lionello Giampaolo PROMETEO SRL
Posted: Friday, March 10, 2023 10:03:23 AM
Rank: Member
Groups: Member

Joined: 11/8/2021
Posts: 13
Thanks for the reply.
I'm just starting to try out the PDF component and I didn't know the render object.
For PNG, JPG, etc. it works but unfortunately in EMF I don't get an acceptable result (Huge files and not vector). Have you tried this solution?
Can you include a native function for exporting pages to EMF?
Thanks
eo_support
Posted: Friday, March 10, 2023 11:17:33 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 23,680
Hi,

Unfortunately we do not have native support for EMF yet. It is technically possible because internally the rendering engine in fact does render to EMF format first, and then "flatten" it to bitmap format. However exposing this internal data structure would require signficant work. We will look into it to see if it is possible for us to add that feature.

Thanks!
Lionello Giampaolo PROMETEO SRL
Posted: Friday, March 10, 2023 11:24:41 AM
Rank: Member
Groups: Member

Joined: 11/8/2021
Posts: 13
Thank you!
For me it would be very important.

I hope it can be done
Thanks again
Lionello Giampaolo PROMETEO SRL
Posted: Tuesday, March 14, 2023 11:36:14 AM
Rank: Member
Groups: Member

Joined: 11/8/2021
Posts: 13
I would add that I do not require the internal structure to be exposed.
A function that allows a page to be saved directly to an eml file might also suffice.
eo_support
Posted: Tuesday, March 14, 2023 11:39:48 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 23,680
Yes. That's the goal.
Lionello Giampaolo PROMETEO SRL
Posted: Wednesday, March 22, 2023 6:40:30 AM
Rank: Member
Groups: Member

Joined: 11/8/2021
Posts: 13
Do you have any news?
I would like to find out if it is possible to do this and in what timeframe so that I can give answers to my customers.
Thanks
eo_support
Posted: Thursday, March 23, 2023 10:16:10 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 23,680
Hi,

We still have not full evaluated the scope of code changes needed yet. We should be able to give you a better picture on whether indeed it is possible and give you a more accurate time frame if we do proceed to implement in about two weeks.

Thanks!
Lionello Giampaolo PROMETEO SRL
Posted: Thursday, March 23, 2023 10:17:34 AM
Rank: Member
Groups: Member

Joined: 11/8/2021
Posts: 13
Ok
Thanks


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