Darren,

FDnC Red wrote
> The problem is that gs.ctm is always the identity matrix so the
> matrix.Multiply just sets it to whatever operands were parsed out.  I was
> expecting some actual translation.

Well, so it is not "always the identity matrix" but instead contains the
translation given by those parsed parameters. In case of your sample content
stream, though, there never is a more interesting matrix multiplication:

   [Current graphic state CTM: Identity. No graphic state saved.]
q
   {Save graphic state}   
   [Current graphic state CTM: Identity. One graphic state saved with CTM:
Identity.]
1 0 0 1 19.96 538.9747 cm
   {Update CTM}
   [Current graphic state CTM: Translation by (19.96, 538.9747). One graphic
state saved with CTM: Identity.]
0 0 m
   {Start path, move to (0, 0) translated by current CTM, i.e. move to
(19.96, 538.9747)}
   [Current graphic state CTM: Translation by (19.96, 538.9747). One graphic
state saved with CTM: Identity.]
716.89 0 l
   {Continue path, line to (716.89, 0) translated by current CTM, i.e. line
to (736.85, 538.9747)}
   [Current graphic state CTM: Translation by (19.96, 538.9747). One graphic
state saved with CTM: Identity.]
S
   {Finish path, stroke, i.e. draw a line from (19.96, 538.9747) to (736.85,
538.9747)}
   [Current graphic state CTM: Translation by (19.96, 538.9747). One graphic
state saved with CTM: Identity.]
Q
   {Restore saved graphic state}
   [Current graphic state CTM: Identity. No graphic state saved.]
...

Thus, the IContentOperator instances registered for m and l see non-trivial
CTMs when they are called, i.e. when their parameter coordinates are
transformed into device space

> I guess that is happening somewhere else at a later time.  Perhaps after
> all streams are parsed.
> Am I just missing the boat here and looking in the wrong place or is this
> just not possible with iText since it's almost more of a rendering thing -
> translating what is in the PDF to actual coordinates after all
> translations are applied?

The translation is there in time. Probably, though, you are looking at the
wrong moment. You have to look at the very moment the CTM is applied, i.e.
when operations with (explicit or implicit) coordinates are handled.

If you still have problems, please post your code for detailed analysis.

Regards,   Michael



--
View this message in context: 
http://itext-general.2136553.n4.nabble.com/Detect-Lines-in-PDF-tp4660295p4660323.html
Sent from the iText - General mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Slashdot TV.  
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
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

Reply via email to