Editing existing PDF streams in 'replacement' mode

35 views
Skip to first unread message

Support

unread,
Jul 17, 2013, 7:55:09 PM7/17/13
to pdfne...@googlegroups.com
Q:
 

We would like to try modifying the Type3 font stream using ElementReader/Writer, but when calling ElementWriter.Begin() there isn't an overload that allows us to set the WriteMode to "e_replacement" when working with an SDF.Obj (it only exists for PDF.Page). Is this something that would be easy to add?

 

-------------

A:
 

You can achieve the desired effect with ElementWriter.Begin(doc, ...). This will create a brand new stream object.

After you are done creating the stream, if required you can copy any extra key/value pairs from the original stream (except for Length, Filter, Resources ). You can also swap the new stream with the old one with doc.Swap(obj_old.GetObjNum(), obj_new.GetObjNum()).
 
 

 

 

Reply all
Reply to author
Forward
0 new messages