Hi Stefan,

I think you have to do the work manually.
Create a new stream object with the modified contents. Afterwards, you can do 
something like this (pseudo code, you might need to modifiy it slightly):

PdfPage* pPage ...
PdfObject* objectWithNewStream ...

objectWithNewStream->GetStream()->Set( pConcatenatedStreamBuffer, 
pConcatenatedStreamBufferLen );
pPage->GetObject().GetDictionary().AddKey( "Contents", objectWithNewStream-
>Reference() );

Hope this helps!

Cheers, 
        Dominik

Am Montag 13 September 2010 schrieb Stefan Heinsen:
> Dear list,
> 
> this is what i want to do:
> 
> Read the content stream of a pdf file,
> modify it in some way,
> write it back to a new pdf file.
> 
> The problem i have is that the content object ( PdfPage::GetContents() )
> often is an array of references to parts of the content stream. In that
> case, i want to put the parts back together, modify it and replace the
> array with a single object that holds the stream.
> 
> The problem is removing the array and replacing it with a normal object.
> Is there code in podofo yet that can handle this?
> 
> Regards,
> 
> Stefan
> 
> ---------------------------------------------------------------------------
> --- Start uncovering the many advantages of virtual appliances
> and start using them to simplify application deployment and
> accelerate your shift to cloud computing
> http://p.sf.net/sfu/novell-sfdev2dev
> _______________________________________________
> Podofo-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/podofo-users
> 


-- 
**********************************************************************
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
**********************************************************************

Attachment: signature.asc
Description: This is a digitally signed message part.

------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
Podofo-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/podofo-users

Reply via email to