I am creating thumbnails of document pages using PXCV_DrawPageToDC.
In most cases I only need the thumbnail of the first or second page of the document. In cases where I'm dealing with a very large PDF document of 500 pages or more, it takes a bit longer to produce the thumbnail than I would like since the entire document has to load before I call PXCV_DrawPageToDC.
Question: Is there a way to only load only one or two pages of a large PDF document so that I can get the thumbnail quicker by not having to wait for the entire document to load?
In other PDF components that I have used in the past, there was an OnLoadPage event that I could control how many pages of the PDF actually got loaded into the Object. Do you have, or will have, anything like that?
Thanks.
Loading Part of a Document?
Moderators: TrackerSupp-Daniel, Tracker Support, Vasyl-Tracker Dev Team, Chris - Tracker Supp, Sean - Tracker, Tracker Supp-Stefan
- John - Tracker Supp
- Site Admin
- Posts: 5219
- Joined: Tue Jun 29, 2004 10:34 am
- Location: United Kingdom
- Contact:
Re: Loading Part of a Document?
Hi Jeff,
have requested advice from the project manager responsible and will come back - if we can add in the current version we will - but for sure I see no reason why this cannot be added for the Version 5 relese now in planning//design stages.
Thanks for your patience.
have requested advice from the project manager responsible and will come back - if we can add in the current version we will - but for sure I see no reason why this cannot be added for the Version 5 relese now in planning//design stages.
Thanks for your patience.
If posting files to this forum - you must archive the files to a ZIP, RAR or 7z file or they will not be uploaded - thank you.
Best regards
Tracker Support
http://www.tracker-software.com
Best regards
Tracker Support
http://www.tracker-software.com
Re: Loading Part of a Document?
Can I request the same to be included in the ActiveX Viewer as well. That way, we can use the ActiveX viewer to quickly preview the first page of a file, even though the file may be huge and would take forever to load fully.
- Lzcat - Tracker Supp
- Site Admin
- Posts: 677
- Joined: Thu Jun 28, 2007 8:42 am
Re: Loading Part of a Document?
For current versions the answer is NO. If something can be done - this will be non-event.
For AX - I'm afraid that realizing such an event (especially with the functionality you asked) will be too complicated. Also, using the AX for fast document preview isn't a good idea because AX is based on Viewer and therefore must do some things which are not required for preview (but are required to display document in a Viewer).
For pxcview ... Let me outline the steps required to display even the first page on screen:
1. Examine the PDF file: check file integrity, read information about all objects, repair if needed. May take a lot of time if the document is huge, even when it is correct. This step cannot be removed or partially skipped.
2. Acquire page count and information about each page. Time to do, depends on the page count and the pdf file structure, not on size. Can be optimized, but not seriously. If you need only the first N pages this could speedup the process, but than you will be able to operate only with the first N pages of the document.
3. Acquire specified page content. Required. Time to do depends on page content only.
4. Draw content to bitmap/DC. Same as previous.
So as result all we can do - speedup step 2, by specifying requested page range. Best solution for this - add another function to read document and/or parameters which will specify required range. And then you will be able with such document as it contains only those pages.
HTH
For AX - I'm afraid that realizing such an event (especially with the functionality you asked) will be too complicated. Also, using the AX for fast document preview isn't a good idea because AX is based on Viewer and therefore must do some things which are not required for preview (but are required to display document in a Viewer).
For pxcview ... Let me outline the steps required to display even the first page on screen:
1. Examine the PDF file: check file integrity, read information about all objects, repair if needed. May take a lot of time if the document is huge, even when it is correct. This step cannot be removed or partially skipped.
2. Acquire page count and information about each page. Time to do, depends on the page count and the pdf file structure, not on size. Can be optimized, but not seriously. If you need only the first N pages this could speedup the process, but than you will be able to operate only with the first N pages of the document.
3. Acquire specified page content. Required. Time to do depends on page content only.
4. Draw content to bitmap/DC. Same as previous.
So as result all we can do - speedup step 2, by specifying requested page range. Best solution for this - add another function to read document and/or parameters which will specify required range. And then you will be able with such document as it contains only those pages.
HTH
Victor
Tracker Software
Project manager
Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
Tracker Software
Project manager
Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
Re: Loading Part of a Document?
Thanks for the detailed explanation. It helps me understand what's going on better.
- John - Tracker Supp
- Site Admin
- Posts: 5219
- Joined: Tue Jun 29, 2004 10:34 am
- Location: United Kingdom
- Contact:
Re: Loading Part of a Document?
Ok - thanks Jeff.
If posting files to this forum - you must archive the files to a ZIP, RAR or 7z file or they will not be uploaded - thank you.
Best regards
Tracker Support
http://www.tracker-software.com
Best regards
Tracker Support
http://www.tracker-software.com