PDFdev is a service provided by PDFzone.com | http://www.pdfzone.com _____________________________________________________________
When you say "write over" I assume you mean in a graphic sense. The original page content is still there, you want to overlay additional graphics on top of the existing content.
There's no way that I see in the PDF spec to reset the CTM, only to modify the existing one. Assuming the original content stream begins with the 'q' operator and ends with the 'Q' operator, you can write your content stream to a new object and append an entry to the Contents array referencing it. When your content stream is rendered the graphics state will be back in a known state, i.e. its initial state. Acrobat renders content streams in the order they are presented in the Contents array. If the original content stream doesn't save and restore the graphic state (bad practice) you would need to update that content stream to add those commands, in which case you may want to just append your content to it rather than creating an additional object.
Alan
Peter Persits wrote:
PDFdev is a service provided by PDFzone.com | http://www.pdfzone.com _____________________________________________________________
Hi all,
I am curious if it is at possible to reset the current CTM (transformation matrix) to [1 0 0 1 0 0]. My application writes over existing page content. If that page happens to have an operator, say,
.1 0 0 .1 0 0 cm
then all my app writes gets diminished by a factor of 10. I want to be able to say something like
q <reset CTM> <do some drawing> Q
Possible?
Peter Persits
To change your subscription: http://www.pdfzone.com/discussions/lists-pdfdev.html
--
D. Alan Stewart Senior Software Developer Layton Graphics, Inc. 155 Woolco Drive Marietta, GA 30065 Voice: 770/973-4312 Fax: 800/367-8192 http://www.layton-graphics.com
To change your subscription: http://www.pdfzone.com/discussions/lists-pdfdev.html
