Hello,
I am looking for an approach to rotate existing images in a PDF page.
As far as I know, I have to first parse the content to operators and operands.
For example,
q
524.2500 0.0000 0.0000 794.2500 0.0000 0.0000 cm
/Im1 Do
Q
The above code sets up the matrix and draw an image onto it.
When we rotate the image, we've got to modify operands of the "cm" operator.
On the above example, after the "Do" command is it "Q" command, which means the
matrix is reset after it. However, if there are subsequent commands before the
"Q" command, I should also rotate the matrix back, thus the rotating operation
won't affect subsequent contents.
So typically the rewritten content stream will be
q
[a b c d e f] cm %[a b c d e f] means the rotated matrix
/Im1 Do
% if there are subsequent command before Q, rotate the matrix back
[a2 b2 c2 d2 e2 f2] cm % use another matrix to reverse the matrix to what it is
before the rotation
% subsequent commands
Q
Is the above understanding correct?
Does any easier approach exist?
Thanks for looking into this problem.
------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2dcopy1
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples:
http://itextpdf.com/themes/keywords.php