Hi, Take a look at PdfVecObjects::RenumberObjects. It should do exactly what you want, but beware: scanning every object and reference takes it's time. I think the algorithm is O(n^2), so if you have a large PDF it might not be the best choice. It could be faster to create a new PDF with all required objects from scratch and getting the references right from the start.
Best regards,
Dom
Am Donnerstag 13 Mai 2010 schrieb Harald Weinhandl:
> Hi
>
>
>
> I am embeding a PDF in another PDF , create XOBJ and add them to the PDF at
> the end.
>
>
>
> Scan through the PDF and mark all Obj references and inhereted references
> needed for the page / pages, store these references in a container..
>
>
>
> In my new PDF , I just write only these objects into the new PDF, along
> with the new XOBJ's, all works fine.
>
>
>
> However of course I have may have many blanks OBJ's which apart from a
> large XREF block full of unsued entries, is not a real problem.. If I have
> a large PDF and only want to select a single page, it works the file is
> small as I only have the data needed for that page/xobj. I would like to
> know if there is a way to just delete unused objects and that the left
> over Objs are reordered but also all the inderect and direct refernces.
>
> I tried a few methods , but since every reference needs to be updated ,is
> there a simple way of doing this ?
>
>
>
> Regards
>
> Harald
>
> _________________________________________________________________
> Need a new place to live? Find it on Domain.com.au
> http://clk.atdmt.com/NMN/go/157631292/direct/01/
>
--
**********************************************************************
Dominik Seichter - [email protected]
KRename - http://www.krename.net - Powerful batch renamer for KDE
KBarcode - http://www.kbarcode.net - Barcode and label printing
PoDoFo - http://podofo.sf.net - PDF generation and parsing library
SchafKopf - http://schafkopf.berlios.de - Schafkopf, a card game, for KDE
Alan - http://alan.sf.net - A Turing Machine in Java
**********************************************************************
signature.asc
Description: This is a digitally signed message part.
------------------------------------------------------------------------------
_______________________________________________ Podofo-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/podofo-users
