Kevin:
I understand you are busy, we all are. If you do not have time right now,
I understand.
I printed the CTM in each case. It gave me the same for both:
1.0 0.0 0.0
0.0 1.0 0.0
0.0 0.0 1.0
It must be something else.
I am attaching the content stream output for page 2
in case you get time to look at it.
Thanks,
Neil
--
Neil Aggarwal, (832)245-7314, www.JAMMConsulting.com
Eliminate junk email and reclaim your inbox.
Visit http://www.spammilter.com <http://www.spammilter.com/> for details.
________________________________
From: Kevin Day [mailto:[EMAIL PROTECTED]
Sent: Thursday, November 20, 2008 5:51 PM
To: IText Questions
Subject: Re: [iText-questions] Got the same x and y locations for
differentpieces of text
I don't have time to actually test this right now (sorry -
big deadline going on).
But you might want to check the current transformation matrix in the
graphics state:
PdfContentStreamProcessor.gs().ctm
see if this is different from one piece of text to the next.
The text matrix is actually applied to the CTM to determine actual
on-screen location. For the simple parser, we aren't doing this additional
transformation because it isn't necessary for the really simple stuff.
But if there are adjustments being made to the CTM between text
operations, you could see the behavior you are seeing.
If the CTM is indeed changing, then the fix is pretty easy: just
take the text matrices and multiply them by the CTM, then use the resulting
CTM for your spatial analysis:
Matrix paperSpaceTextMatrix = textMatrix.multiply(ctm);
Unlike the text matrix, the CTM can (and often does) involve
rotational components. In your specific file, I doubt that is the case -
just keep it in mind... The implication here is that you want to multiply
out to paper space *after* you've done all of the text processing that you
possibly can (determining where spaces occur, etc...). Otherwise you have
to do some pretty funky handling to determine rotated inter-character
spacing and line breaks.
hope that helps - if the CTM isn't changing, let me know and I'll
try to take a look at the file and see what's up. What would help is if you
sent me the actual content stream of the second page. PdfContentReaderTool
will get that for you (along with a ton of other stuff).
- K
----------------------- Original Message
-----------------------
From: "Neil Aggarwal" <[EMAIL PROTECTED]>
<mailto:[EMAIL PROTECTED]>
To: "'Post all your questions about iText here'"
<[email protected]>
<mailto:[email protected]>
Cc:
Date: Wed, 19 Nov 2008 23:06:35 -0600
Subject: [iText-questions] Got the same x and y locations for
different pieces of text
Kevin:
This is strange. I am trying to process this
file through my text parser:
http://www.dallascad.org/forms/2008rate.pdf
<http://www.dallascad.org/forms/2008rate.pdf>
I am getting the same x and y coordinates for
these two pieces of text on page 2 (They are in the notes on the
bottom of the page):
Taxes for this entity are collected by the Dallas County Tax Office.
If the optional homestead exemption is offered, it must be a minimum
of
$5,000.
Both of them have x=101.16 and y=198.00116 for coordinates. If they
have
the
same coordinates, shouldn't they overlap?
Looking at the page rendered in Adobe reader, the two pieces of text
do
not overlap each other. The look like they should have different y
values.
Did I goof something up?
I am attaching a piece of test code that illustrates what I am
seeing.
Any input would be helpful.
Th anks,
Neil
--
Neil Aggarwal, (832)245-7314, www.JAMMConsulting.com
<http://www.JAMMConsulting.com>
Eliminate junk email and reclaim your inbox.
Visit http://www.spammilter.com <http://www.spammilter.com> for
details.
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's
challenge
Build the coolest Linux based applications with Moblin SDK & win
great prizes
Grand prize is a trip for two to an Open Source event anywhere in
the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
<http://moblin-contest.org/redirect.php?banner_id=100&url=/>
_______________________________________________
iText-questions mailing list
[email protected] <mailto:[EMAIL PROTECTED]
.sourceforge.net>
https://lists.sourceforge.net/lists/listinfo/itext-questions
<https://lists.sourceforge.net/lists/listinfo/itext-questions>
Buy the iText book: http://www.1t3xt.com/docs/book.php
<http://www.1t3xt.com/docs/book.php>
==============Page 2====================
- - - - - Dictionary - - - - - -
(/CropBox=[0, 0, 612, 792], /Parent=Dictionary of type: /Pages, /Type=/Page,
/Contents=Stream, /Resources=Dictionary, /MediaBox=[0, 0, 612, 792], /Rotate=0)
Subdictionary /Parent = (/Type=/Pages, /Count=2, /Kids=[14 0 R, 1 0 R])
Subdictionary /Resources = (/ExtGState=Dictionary, /ProcSet=[/PDF,
/Text], /Font=Dictionary)
Subdictionary /ExtGState = (/GS1=Dictionary of type: /ExtGState)
Subdictionary /GS1 = (/OPM=1, /op=false,
/Type=/ExtGState, /SA=false, /OP=false, /SM=0.02)
Subdictionary /Font = (/TT2=Dictionary of type: /Font,
/TT4=Dictionary of type: /Font)
Subdictionary /TT2 = (/LastChar=179,
/BaseFont=/Arial-BoldMT, /Type=/Font, /Encoding=/WinAnsiEncoding,
/Subtype=/TrueType, /FirstChar=32, /Widths=[278, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 278, 0, 556, 556, 556, 556, 556, 556, 556, 556, 556, 0, 0, 0, 0, 0, 0,
0, 0, 722, 0, 722, 722, 667, 611, 778, 722, 278, 0, 0, 611, 833, 722, 778, 667,
0, 722, 667, 611, 722, 667, 944, 667, 667, 0, 0, 0, 0, 0, 0, 0, 556, 611, 556,
611, 556, 333, 611, 611, 278, 0, 0, 278, 889, 611, 611, 611, 611, 389, 556,
333, 611, 556, 0, 556, 556, 500, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 333], /FontDescriptor=Dictionary
of type: /FontDescriptor)
Subdictionary /FontDescriptor =
(/Type=/FontDescriptor, /StemV=138, /Descent=-211, /FontWeight=700,
/FontBBox=[-628, -376, 2000, 1010], /CapHeight=718, /FontStretch=/Normal,
/Flags=32, /XHeight=515, /FontFamily=Arial, /FontName=/Arial-BoldMT,
/Ascent=905, /ItalicAngle=0)
Subdictionary /TT4 = (/LastChar=185,
/BaseFont=/ArialMT, /Type=/Font, /Encoding=/WinAnsiEncoding,
/Subtype=/TrueType, /FirstChar=32, /Widths=[278, 0, 0, 556, 556, 889, 667, 191,
333, 333, 389, 0, 278, 333, 278, 0, 556, 556, 556, 556, 556, 556, 556, 556,
556, 556, 278, 0, 0, 584, 0, 0, 0, 667, 667, 722, 722, 667, 611, 778, 722, 278,
500, 667, 556, 833, 722, 778, 667, 778, 722, 667, 611, 722, 667, 944, 667, 667,
0, 0, 278, 0, 0, 0, 0, 556, 556, 500, 556, 556, 278, 556, 556, 222, 0, 500,
222, 833, 556, 556, 556, 556, 333, 500, 278, 556, 500, 722, 500, 500, 500, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 333, 333, 0, 0, 0, 0, 0, 333], /FontDescriptor=Dictionary of type:
/FontDescriptor)
Subdictionary /FontDescriptor =
(/Type=/FontDescriptor, /StemV=88, /Descent=-211, /FontWeight=400,
/FontBBox=[-665, -325, 2000, 1006], /CapHeight=718, /FontStretch=/Normal,
/Flags=32, /XHeight=515, /FontFamily=Arial, /FontName=/ArialMT, /Ascent=905,
/ItalicAngle=0)
- - - - - Content Stream - - - - - -
/GS1 gs
BT
/TT2 1 Tf
8.88 0 0 8.88 62.52 694.44 Tm
0 g
0 Tc
0 Tw
[(Entity)-15087(Telephone)-1431.9(Optional)-985.4(General)-2154.3(Over)-2180.2(Disabled)-2223.9(2007)]TJ
10.32 0 0 10.32 518.0399 694.44 Tm
(2008)Tj
8.88 0 0 8.88 63.6 683.16 Tm
[(Code)-1729.7(Taxing Entit)]TJ
ET
q
1 i
101.16 681 55.56 10.08 re
W n
BT
8.88 0 0 8.88 151.9728 683.16 Tm
(y)Tj
ET
Q
BT
8.88 0 0 8.88 226.56 683.16 Tm
(Numbe)Tj
ET
q
1 i
226.56 681 33.6 10.08 re
W n
BT
8.88 0 0 8.88 256.6557 683.16 Tm
(r)Tj
ET
Q
BT
8.88 0 0 8.88 279.84 683.16 Tm
[(Hmstd ³)-1453.5(Hmstd)-3023.8(65)-3314.2(Person)-1494.2(Tax Rate)-1250.5(Tax
Rate)]TJ
/TT4 1 Tf
-23.7703 -5.1622 TD
[(AS)-2314.7(Carrollton-Farmers)]TJ
3.6486 -1.3784 TD
[( Branch ISD
*)-5736(972-968-6171)-2123.8(0%)-2446.6(15,000)-2090.1(10,000)-2360.3(10,000)-1495.5(1.367)-2916.5(1.3623)]TJ
-3.6486 -1.3784 TD
[(ES)-2314.7(Cedar Hill ISD ¹
*)-5292.6(214-653-7811)-2123.8(0%)-2446.6(15,000)-2090.1(10,000)-2360.3(10,000)-1495.5(1.40)-3472.6(1.50)]TJ
-.0541 -1.3784 TD
[(OS)-2257.9(Coppell ISD
*)-6902.5(972-304-3694)-2123.8(0%)-2446.6(15,000)-2090.1(10,000)-2360.3(10,000)-1495.5(1.269)-2916.5(1.279)]TJ
.027 -1.3784 TD
[(DS)-2286.5(Dallas ISD ¹
*)-6903.9(214-653-7811)-1853.5(10%)-2160.7(15,000)-2090.1(45,000)-2360.3(45,000)-1495.5(1.199643)-1248(1.183402)]TJ
.027 -1.3784 TD
[(SS)-2314.7(DeSoto ISD
*)-6958.1(972-223-6400)-2123.8(0%)-2446.6(15,000)-2090.1(25,000)-2360.3(25,000)-1495.5(1.49)-3472.6(1.51)]TJ
-.027 -1.3784 TD
[(US)-2286.5(Duncanville ISD ¹
*)-4513.3(214-653-7811)-2123.8(0%)-2446.6(15,000)-2090.1(15,000)-2360.3(10,000)-1495.5(1.418)-2916.5(1.418)]TJ
.0541 -1.3784 TD
[(FS)-2343.8(Ferris ISD
*)-7738.4(972-544-3858)-2123.8(0%)-2446.6(15,000)-2090.1(14,000)-2360.3(10,000)-1495.5(1.2697)-2360.3(1.2772)]TJ
-.0811 -1.3784 TD
[(GS)-2257.9(Garland ISD
*)-6736(972-494-8570)-2123.8(0%)-2446.6(15,000)-2090.1(10,000)-2360.3(10,000)-1495.5(1.2533)-2360.3(1.2533)]TJ
.0541 -1.3784 TD
[(PS)-2314.7(Grand Prairie ISD ¹
*)-3736(214-653-7811)-2123.8(0%)-2446.6(15,000)-2090.1(15,000)-2360.3(10,000)-1495.5(1.465)-2916.5(1.465)]TJ
T*
[(VS)-2314.7(Grapevine-Colleyville ISD
*)-845.3(817-481-5575)-2123.8(0%)-2446.6(15,000)-2090.1(39,600)-2360.3(10,000)-1495.5(1.29)-3472.6(1.29)]TJ
-.027 -1.3784 TD
[(HS)-2286.5(Highland Park ISD ¹
*)-3401.5(214-653-7811)-1853.5(20%)-2160.7(15,000)-2090.1(10,000)-2360.3(10,000)-1495.5(1.0367)-2360.3(1.09)]TJ
.2162 -1.3784 TD
[(IS)-2514.6(Irving ISD
*)-7848.3(972-215-5450)-2123.8(0%)-2446.6(15,000)-2090.1(10,000)-2360.3(10,000)-1495.5(1.3485)-2360.3(1.391)]TJ
-.1351 -1.3784 TD
[(LS)-2371.5(Lancaster ISD ¹
*)-5291.1(214-653-7811)-2123.8(0%)-2446.6(15,000)-2090.1(10,000)-2360.3(10,000)-1495.5(1.4077)-2360.3(1.4127)]TJ
-.1351 -1.3784 TD
[(MS)-2229.7(Mesquite ISD
*)-6236(972-216-6204)-2123.8(0%)-2446.6(15,000)-2090.1(25,000)-2360.3(10,000)-1495.5(1.3767)-2360.3(1.40)]TJ
.0541 -1.3784 TD
[(RS)-2286.5(Richardson ISD
*)-5235.5(469-593-0500)-1853.5(10%)-2160.7(15,000)-2090.1(10,000)-2360.3(10,000)-1495.5(1.34005)-1804.2(1.34005)]TJ
.027 -1.3784 TD
[(YS)-2314.7(Sunnyvale ISD
*)-5623.7(972-226-7177)-2123.8(0%)-2446.6(15,000)-2090.1(10,000)-2360.3(10,000)-1495.5(1.38005)-1804.2(1.37)]TJ
-.0541 -6.3108 TD
[(DD)-2258.4(Dallas County FCD
#1)-2957.2(800-977-2865)-1853.5(20%)-3417.5(0)-3052(100,000)-1804.2(100,000)-1223.1(2.83554)-1804.2(2.83554)]TJ
-.0541 -1.3784 TD
[(DM)-2201.6(Dallas County
URD)-4236(972-556-0625)-2123.8(0%)-3703.3(0)-4579(0)-4862.8(0)-2754.7(1.628)-2916.5(1.626)]TJ
.1351 -1.3784 TD
[(NL)-2343.3(Denton County LID
#1)-3010.4(713-932-9011)-1853.5(20%)-3417.5(0)-4579(0)-4862.8(0)-2754.7(0.155)-2916.5(0.165)]TJ
-.0811 -1.3784 TD
[(NR)-2258.4(Denton County RUD
#1)-2400(713-932-9011)-1853.5(20%)-3417.5(0)-4579(0)-4862.8(0)-2754.7(0.40)-3472.6(0.38)]TJ
T*
[(NU)-23244.9(20%)-3417.5(0)-4579(0)-4862.8(0)-2754.7(0.555)-2916.5(0.545)]TJ
-.027 -1.3784 TD
[(GU)-2229.7(Grand Prairie Metro
URD)-1680.3(713-462-8906)-2123.8(0%)-3703.3(0)-4579(0)-4862.8(0)-2754.7(2.14)-3472.6(2.14)]TJ
.2973 -1.3784 TD
[(IF)-2543.8(Irving FCD Section I
¹)-3347.3(214-653-7811)-2123.8(0%)-3703.3(0)-4579(0)-4862.8(0)-2754.7(0.271391)-1248(0.242011)]TJ
-.0541 -1.3784 TD
[(ID)-2486.5(Irving FCD Section III
¹)-2791.6(214-653-7811)-1853.5(20%)-3417.5(0)-4579(0)-4862.8(0)-2754.7(0.271991)-1248(0.26335)]TJ
-.1892 -1.3784 TD
[(LM)-2286.5(Lancaster MUD
#1)-4568.5(888-726-2779)-2123.8(0%)-3703.3(0)-4579(0)-4862.8(0)-2754.7(0.90)-3472.6(0.90)]TJ
.027 -1.3784 TD
[(NF)-2315.6(Northwest Dallas Co
FCD)-1458.1(972-345-0488)-2123.8(0%)-3703.3(0)-4579(0)-4862.8(0)-2754.7(0.30)-3472.6(0.30)]TJ
.0541 -1.3784 TD
[(FF)-2372.9(Valwood Improvement
Auth)-621.2(972-484-9863)-2123.8(0%)-3703.3(0)-3335.7(60,000)-3603.6(0)-2754.7(0.3225)-2360.3(0.3125)]TJ
-.027 -1.3784 TD
[(TX)-23600.5(0%)-3703.3(0)-4579(0)-4862.8(0)-2754.7(0.00)-3472.6(0.00)]TJ
-1.9865 -5.9459 TD
(Notes: ¹ = )Tj
3.4595 -1.2703 TD
(² = )Tj
T*
(³ = )Tj
-.0541 -1.2703 TD
(* = )Tj
21.9054 -6.0541 TD
(50% - 69% Disability: $10,000)Tj
-17.7432 2.5405 TD
[(Disabled veteran exemption amounts: )-400.5(10% - 29% Disability:
$5,000)]TJ
/TT2 1 Tf
10.32 0 0 10.32 51 657.2401 Tm
( SCHOOL DISTRICTS)Tj
0 -24.407 TD
( SPECIAL DISTRICTS)Tj
/TT4 1 Tf
8.88 0 0 8.88 101.16 217.92 Tm
(This information is accurate to the best of our knowledge. Please contact the
taxing entity for confirmation.)Tj
/TT2 1 Tf
10.32 0 0 10.32 303.96 707.4 Tm
(2008 Exemptions Offered)Tj
13.32 0 0 13.32 127.92 743.28 Tm
( 2008 AD VALOREM TAX RATES FOR DALLAS COUNTY )Tj
/TT4 1 Tf
8.88 0 0 8.88 101.16 152.8801 Tm
(The year in superscript after the asterisk is the year the entity first
offered the optional tax ceiling.)Tj
0 -8.2973 TD
(Non-Taxing Entities for DCAD: NC = No County-Leased Equipment, NT = No Town,
NS = No School)Tj
0 28.973 TD
(Denton Co LID #1 & RUD #1 Combined)Tj
0 -9.6486 TD
(Railroad Rolling Stock \(Comptroller PTD\))Tj
0 -5.9459 TD
(Taxes for this entity are collected by the Dallas County Tax Office.)Tj
0 -1.2703 TD
(Dallas County Schools' School Equalization provides educational support
services to the 16 ISD's.)Tj
T*
(If the optional homestead exemption is offered, it must be a minimum of
$5,000.)Tj
T*
(Optional tax ceiling on residential homesteads for over-65 or disabled persons
offered \(mandatory for ISD's\).)Tj
19.7027 -7.3243 TD
(70% -100% Disability: $12,000)Tj
0 2.5405 TD
(30% - 49% Disability: $7,500)Tj
ET
49.56 438.72 503.76 .72 re
f
48.84 438.72 .72 231 re
f
561.72 438.72 .71997 230.28 re
f
274.08 704.04 .72 13.68 re
f
456.72 704.04 .72 12.96 re
f
48.84 248.04 .72 169.8 re
f
561.72 248.04 .71997 169.08 re
f
274.8 717 182.64 .71997 re
f
274.8 704.04 182.64 .71997 re
f
49.56 669 512.88 .71997 re
f
553.32 438.72 9.12 .72 re
f
49.56 417.12 512.88 .72 re
f
49.56 248.04 512.88 .72 re
f
BT
7.44 0 0 7.44 54.72 39 Tm
[(Dallas Central Appraisal District Revised November 11,
2008)-14860.8(G:\\Entity\\Permanet\\Taxrate\\2008rate.xlsx Page 2 of 2)]TJ
ET
- - - - - Text Extraction - - - - - -
EntityTelephoneOptionalGeneralOverDisabled20072008
CodeTaxing Entity Number Hmstd ³Hmstd65PersonTax RateTax Rate
ASCarrollton-Farmers
Branch ISD *972-968-61710%15,00010,00010,0001.3671.3623
ESCedar Hill ISD ¹ *214-653-78110%15,00010,00010,0001.401.50
OSCoppell ISD *972-304-36940%15,00010,00010,0001.2691.279
DSDallas ISD ¹ *214-653-781110%15,00045,00045,0001.1996431.183402
SSDeSoto ISD *972-223-64000%15,00025,00025,0001.491.51
USDuncanville ISD ¹ *214-653-78110%15,00015,00010,0001.4181.418
FSFerris ISD *972-544-38580%15,00014,00010,0001.26971.2772
GSGarland ISD *972-494-85700%15,00010,00010,0001.25331.2533
PSGrand Prairie ISD ¹ *214-653-78110%15,00015,00010,0001.4651.465
VSGrapevine-Colleyville ISD *817-481-55750%15,00039,60010,0001.291.29
HSHighland Park ISD ¹ *214-653-781120%15,00010,00010,0001.03671.09
ISIrving ISD *972-215-54500%15,00010,00010,0001.34851.391
LSLancaster ISD ¹ *214-653-78110%15,00010,00010,0001.40771.4127
MSMesquite ISD *972-216-62040%15,00025,00010,0001.37671.40
RSRichardson ISD *469-593-050010%15,00010,00010,0001.340051.34005
YSSunnyvale ISD *972-226-71770%15,00010,00010,0001.380051.37
DDDallas County FCD #1800-977-286520%0100,000100,0002.835542.83554
DMDallas County URD972-556-06250%0001.6281.626
NLDenton County LID #1713-932-901120%0000.1550.165
NRDenton County RUD #1713-932-901120%0000.400.38
NU20%0000.5550.545
GUGrand Prairie Metro URD713-462-89060%0002.142.14
IFIrving FCD Section I ¹214-653-78110%0000.2713910.242011
IDIrving FCD Section III ¹214-653-781120%0000.2719910.26335
LMLancaster MUD #1888-726-27790%0000.900.90
NFNorthwest Dallas Co FCD972-345-04880%0000.300.30
FFValwood Improvement Auth972-484-98630%060,00000.32250.3125
TX0%0000.000.00
Notes: ¹ =
² =
³ =
* =
50% - 69% Disability: $10,000
Disabled veteran exemption amounts: 10% - 29% Disability: $5,000
SCHOOL DISTRICTS
SPECIAL DISTRICTS
This information is accurate to the best of our knowledge. Please contact the
taxing entity for confirmation.
2008 Exemptions Offered
2008 AD VALOREM TAX RATES FOR DALLAS COUNTY
The year in superscript after the asterisk is the year the entity first offered
the optional tax ceiling.
Non-Taxing Entities for DCAD: NC = No County-Leased Equipment, NT = No Town,
NS = No School
Denton Co LID #1 & RUD #1 Combined
Railroad Rolling Stock (Comptroller PTD)
Taxes for this entity are collected by the Dallas County Tax Office.
Dallas County Schools' School Equalization provides educational support
services to the 16 ISD's.
If the optional homestead exemption is offered, it must be a minimum of $5,000.
Optional tax ceiling on residential homesteads for over-65 or disabled persons
offered (mandatory for ISD's).
70% -100% Disability: $12,000
30% - 49% Disability: $7,500
Dallas Central Appraisal District Revised November 11,
2008G:\Entity\Permanet\Taxrate\2008rate.xlsx Page 2 of 2
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://www.1t3xt.com/docs/book.php