Do you own a Debenu Quick PDF Library version 7, 8, 9, 10, 11, 12, 13 or iSEDQuickPDF license? Upgrade to Debenu Quick PDF Library 14 today!

Debenu Quick PDF Library - PDF SDK Community Forum Homepage
Forum Home Forum Home > For Users of the Library > General Discussion
  New Posts New Posts RSS Feed - remove unused objects
  FAQ FAQ  Forum Search   Register Register  Login Login

remove unused objects

 Post Reply Post Reply
Author
Message Reverse Sort Order
Jake View Drop Down
Beginner
Beginner
Avatar

Joined: 16 Nov 19
Status: Offline
Points: 5
Post Options Post Options   Thanks (0) Thanks(0)   Quote Jake Quote  Post ReplyReply Direct Link To This Post Topic: remove unused objects
    Posted: 26 Nov 19 at 5:19PM
Hello,

thx for reply. But that was not the solution i hoped to get. I know various commandline tools which are able to do this, including pdftk.exe. In my eyes cpdf.exe is a good choice for optimizing a pdf.

best regards
Jake
Back to Top
Ingo View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 29 Oct 05
Status: Offline
Points: 3524
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ingo Quote  Post ReplyReply Direct Link To This Post Posted: 25 Nov 19 at 7:42PM
Hi Jake,

you can remove a known unused image for example but there isn't a more automatic function for this.
To remove an unsused object you should use the free cmd-tool PDFtk.

Here's a description how to do it from our member "chicks".
It's ober 13 years old but should still work:

1. Uncompress the original PDF using pdftk:
    pdftk png_example.pdf output step1.pdf uncompress

2. Edit step1.pdf (using commandline edit.exe):
    Find the object of interest, in this case 5 0 obj.
    Remove all references to this object by deleting the
    lines associated with it, including:
      /XOBJ7BC610 5 0 R
      /XOBJ7BC610 Do
      Everything between the line starting with 5 0 obj
      and endobj
    Save the edited file to step2.pdf.

3. The xref table in step2.pdf is now corrupt, so we need to fix it. We'll also recompress the PDF:

    pdftk step2.pdf output step3.pdf compress
Cheers,
Ingo

Back to Top
Jake View Drop Down
Beginner
Beginner
Avatar

Joined: 16 Nov 19
Status: Offline
Points: 5
Post Options Post Options   Thanks (0) Thanks(0)   Quote Jake Quote  Post ReplyReply Direct Link To This Post Posted: 25 Nov 19 at 6:52AM
Hello,

some pdf programs offers the ability to remove objects, which are not used ,but still inside the pdf file, so that the pdf file gets smaller. Can that be done with the library and if yes, how can it be done?

best regards
Jake
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 11.01
Copyright ©2001-2014 Web Wiz Ltd.

Copyright © 2017 Debenu. Debenu Quick PDF Library is a PDF SDK. All rights reserved. AboutContactBlogSupportOnline Store