PDF-XChange - Tracker PDF Viewer - TIFF-XChange - Image-XChange - XMF-XChange - Raster-XChange - Support

Moderators: Tracker Support, Chris - Tracker Supp, Vasyl-Tracker Dev Team, Sean - Tracker, Tracker Supp-Stefan

 
scoberry
User
Topic Author
Posts: 3
Joined: Thu Oct 05, 2017 11:56 am

PXCp_InsertPagesTo file size

Thu Oct 05, 2017 12:23 pm

I'm trying to get a page from a multipage PDF. XCPro40Demo has a good illustration of the functionality I want, using PXCp_InsertPagesTo. I ran the demo and it works, but the file size for some of the pages is quite large. I have a 43 page PDF that's ~3.4MB, and the single-page files range as high as ~3.3MB.

Using PDFXEdit and Document | Extract Pages does better: the largest page is ~.1MB.

Any ideas what I could try to get the file size from PXCp_InsertPagesTo down? I tried running Optimize after extracting the pages, but it made the file slightly bigger.
 
User avatar
Tracker Supp-Stefan
Site Admin
Posts: 11773
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: PXCp_InsertPagesTo file size

Thu Oct 05, 2017 12:32 pm

Hello scoberry,

Welcome to our forums and thanks for your post.
It would be best if you can provide us with one such sample file, so that we can investigate why the size remains as it is.

I've also moved your topic to the correct forum section - as you had it posted in the end user one.

Regards,
Stefan
 
scoberry
User
Topic Author
Posts: 3
Joined: Thu Oct 05, 2017 11:56 am

Re: PXCp_InsertPagesTo file size

Thu Oct 05, 2017 1:23 pm

Thanks.

I don't see a way to attach a file in the forum. I've put the file at https://ufile.io/wqunt.

It's a 43-page document, and the file sizes get larger for the later pages (they strictly increase from one page to the next, as if it's including data from previous pages). So page 43 is the worst, 42 is second worst, etc.

The repro:
1. Run XCPro40Demo.
2. Select "Extract pages", click Next.
3. Open the document from the link above.
4. Set "Selected pages" to 43.
5. Select an output doc path and click OK.
The output file is pretty big (~3.3MB).
6. Run PDFXEdit.
7. Open the document from the link above.
8. Document | Extract Pages.
9. Choose Pages = 43.
10. Pick a destination path and click OK.
The output file is ~88KB.
 
Lzcat - Tracker Supp
Site Admin
Posts: 694
Joined: Thu Jun 28, 2007 8:42 am

Re: PXCp_InsertPagesTo file size

Fri Oct 06, 2017 8:15 am

Hi scoberry.
Problem is with your file - it contains a lot of images, and all of them are listed as used on each page (when in fact - not).
Unfortunately old library does not handle this case and copy all listed resources, and this will be not changed. You can try use Low-Level API to remove not needed resources from page resources (in original document or in inserted copy - it does not matter).
Another option - switch to new SDK.
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.

Who is online

Users browsing this forum: No registered users and 1 guest