Fastest code to get the thumbnail of the 1st page of a PDF  SOLVED

PDF-XChange Editor SDK for Developers

Moderators: TrackerSupp-Daniel, Tracker Support, Paul - Tracker Supp, Vasyl-Tracker Dev Team, Chris - Tracker Supp, Sean - Tracker, Ivan - Tracker Software, Tracker Supp-Stefan

Forum rules
DO NOT post your license/serial key, or your activation code - these forums, and all posts within, are public and we will be forced to immediately deactivate your license.

When experiencing some errors, use the IAUX_Inst::FormatHRESULT method to see their description and include it in your post along with the error code.
Post Reply
zarkogajic
User
Posts: 1370
Joined: Thu Sep 05, 2019 12:35 pm

Fastest code to get the thumbnail of the 1st page of a PDF

Post by zarkogajic »

Hi Support,

What would be the suggested approach to get the image of the 1st page of a PDF document (pxc), something like you have in "history", as fast as possible?

Edit: not to save the image to the file system, but to have it as stream or similar...

Also edit: I'm aware of IIXC_Page and DrawTo ... stuff.

I'm asking if the following is the "only" option:

1. load document
2. get to first page
3. DrawTo ...

-žarko
Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: Fastest code to get the thumbnail of the 1st page of a PDF

Post by Sasha - Tracker Dev Team »

Hello zarkogajic,

Yup, that's the fastest option - you can't just simply get the first page - you need to load the document to do so.

Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
zarkogajic
User
Posts: 1370
Joined: Thu Sep 05, 2019 12:35 pm

Re: Fastest code to get the thumbnail of the 1st page of a PDF

Post by zarkogajic »

Hi Alex,

Thanks. That was one wild attempt, I know ;)

Btw, I saw a lot of various code samples (around the forum and CoreSamples) to do this. Lots of matrixes stuff etc...

Do you have a simple (most simple) sample to save a page as image?

-žarko
Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: Fastest code to get the thumbnail of the 1st page of a PDF

Post by Sasha - Tracker Dev Team »

Hello zarkogajic,

This for example:
https://github.com/tracker-software/PDF ... verters.cs

Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
zarkogajic
User
Posts: 1370
Joined: Thu Sep 05, 2019 12:35 pm

Re: Fastest code to get the thumbnail of the 1st page of a PDF  SOLVED

Post by zarkogajic »

Alex,

ok, fair enough.


Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Fastest code to get the thumbnail of the 1st page of a PDF

Post by Sasha - Tracker Dev Team »

:)
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
Post Reply