I am studying Marked content in PDF.
I came across one PDF file which has Marked content but few object from marked content are hidden.
So here one block of BDC-EMC has both visible and hidden objects. I don't see OCGs array in document.
How does this works, how to know which object (graphics/text) is visible and which one is hidden?
I do not see option to attach pdf file here so sharing content stream. Here only one BT-ET block enter code herein "/PlacedPDF /MC0 BDC " is visible all other are hidden.
Any help is highly appreciated.enter code here
Thanks!!,
Chetan
PDF Content Stream
/Span <</Lang (en)/MCID 1597 >>BDC
/Span <</ActualText (þÿ )>>BDC
EMC
EMC
/Span <</Lang (en)/MCID 1598 >>BDC
EMC
/Span <</Lang (en)/MCID 1599 >>BDC
/Span <</ActualText (þÿ )>>BDC
EMC
EMC
q
/Perceptual ri
/GS0 gs
/T1_1 1 Tf
/Fm0 Do
Q
/Figure <</MCID 1602 >>BDC
/PlacedPDF /MC0 BDC
<------------------------------- START -------------------------------->
BT
0 0 0 1 k
/Perceptual ri
/GS0 gs
/T1_0 1 Tf
6.7092 0 0 6.7092 91.8006 408.647 Tm
[(St)-20(andard)]TJ
ET
<------------------------------- END -------------------------------->
q
67.107 261.154 77 188.188 re
W n
BT
-0.12 Tw 6.7092 0 0 6.7092 332.5724 347.7748 Tm
[(Mec)50(hanical T)115(ee)]TJ
0 Tw 17.697 9.073 Td
[(A)40(WW)40(A Ductile Iron Pipe)]TJ
-34.941 -1.057 Td
[(R)20(educing)]TJ
-1.399 -20.545 Td
(Outlet Coupling)Tj
ET
Q
q
67.107 261.154 77 188.188 re
W n
BT
6.7092 0 0 6.7092 339.3285 306.0237 Tm
[(Saddle-L)20(et)]TJ
-18.251 6.751 Td
[(R)20(educing)]TJ
-4.096 -1.2 Td
(\(2" x 1\275", 2\275" x 2", 3" x 2\275"\))Tj
-0.025 Tw 20.744 8.715 Td
[(Flange A)20(dapter)]TJ
0 Tw 2.279 -20.578 Td
[(W)-20(ildcat)]TJ
19.004 0 Td
(HDPE Pipe)Tj
ET
Q
q
67.107 261.154 77 188.188 re
W n
BT
-0.025 Tw 6.7092 0 0 6.7092 467.048 359.0001 Tm
[(IPS )-25(to A)40(WW)40(A)]TJ
ET
EMC
EMC
/Figure <</MCID 1603 >>BDC
/PlacedPDF /MC1 BDC
Q
q
170.527 255.484 83.892 188.189 re
W n
BT
6.7092 0 0 6.7092 73.8793 402.9777 Tm
[(St)-20(andard)]TJ
0.205 -7.706 Td
(GapSeal)Tj
-0.12 Tw 35.682 -1.367 Td
[(Mec)50(hanical T)115(ee)]TJ
0 Tw 17.697 9.073 Td
[(A)40(WW)40(A Ductile Iron Pipe)]TJ
ET
Q
q
170.527 255.484 83.892 188.189 re
W n
BT
6.7092 0 0 6.7092 65.2513 303.5076 Tm
[(End P)20(rotection)]TJ
38.18 -0.47 Td
[(Saddle-L)20(et)]TJ
ET
Q
q
170.527 255.484 83.892 188.189 re
W n
BT
-0.025 Tw 6.7092 0 0 6.7092 310.6531 396.0676 Tm
[(Flange A)20(dapter)]TJ
0 Tw 2.279 -20.578 Td
(W)Tj
6.7092 0 0 6.7092 171.4775 337.5969 Tm
24.043 -11.863 Td
(ildcat)Tj
17.984 0 Td
(HDPE Pipe)Tj
-56.203 -0.017 Td
[(F)20(astFit)]TJ
4.1287 0 0 4.1287 96.3529 259.9574 Tm
(\256)Tj
-0.025 Tw 6.7092 0 0 6.7092 449.1268 353.3308 Tm
[(IPS )-25(to A)40(WW)40(A)]TJ
ET
EMC
EMC
/Figure <</MCID 1604 >>BDC
/PlacedPDF /MC2 BDC
Q
q
62.748 59.87 83.953 188.188 re
W n
BT
6.7092 0 0 6.7092 -157.3332 207.3635 Tm
[(St)-20(andard)]TJ
0.205 -7.706 Td
(GapSeal)Tj
ET
Q
q
62.748 59.87 83.953 188.188 re
W n
BT
6.7092 0 0 6.7092 202.1706 207.3635 Tm
[(A)40(WW)40(A Ductile Iron Pipe)]TJ
-34.941 -1.057 Td
[(R)20(educing)]TJ
-1.399 -20.545 Td
(Outlet Coupling)Tj
-18.53 6.776 Td
[(End P)20(rotection)]TJ
ET
Q
q
62.748 59.87 83.953 188.188 re
W n
BT
6.7092 0 0 6.7092 -32.2543 150.0337 Tm
[(R)20(educing)]TJ
-4.096 -1.2 Td
(\(2" x 1\275", 2\275" x 2", 3" x 2\275"\))Tj
ET
Q
q
62.748 59.87 83.953 188.188 re
W n
BT
6.7092 0 0 6.7092 222.231 62.3919 Tm
(HDPE Pipe)Tj
-56.203 -0.017 Td
[(F)20(astFit)]TJ
4.1287 0 0 4.1287 -134.8597 64.3432 Tm
(\256)Tj
-0.025 Tw 6.7092 0 0 6.7092 217.9142 157.7166 Tm
[(IPS )-25(to A)40(WW)40(A)]TJ
ET
EMC
EMC
/Figure <</MCID 1605 >>BDC
/PlacedPDF /MC3 BDC
Q
q
169.441 59.898 85.291 183.362 re
W n
BT
6.7092 0 0 6.7092 -181.845 207.3911 Tm
[(St)-20(andard)]TJ
0.205 -7.706 Td
(GapSeal)Tj
-0.12 Tw 35.682 -1.367 Td
[(Mec)50(hanical T)115(ee)]TJ
ET
Q
q
169.441 59.898 85.291 183.362 re
W n
BT
6.7092 0 0 6.7092 -56.7661 200.2995 Tm
[(R)20(educing)]TJ
-1.399 -20.545 Td
(Outlet Coupling)Tj
-18.53 6.776 Td
[(End P)20(rotection)]TJ
38.18 -0.47 Td
[(Saddle-L)20(et)]TJ
-18.251 6.751 Td
[(R)20(educing)]TJ
-4.096 -1.2 Td
(\(2" x 1\275", 2\275" x 2", 3" x 2\275"\))Tj
-0.025 Tw 20.744 8.715 Td
[(Flange A)20(dapter)]TJ
0 Tw 2.279 -20.578 Td
[(W)-20(ildcat)]TJ
ET
Q
q
169.441 59.898 85.291 183.362 re
W n
BT
6.7092 0 0 6.7092 -179.356 62.3054 Tm
[(F)20(astFit)]TJ
4.1287 0 0 4.1287 -159.3715 64.3708 Tm
(\256)Tj
ET
EMC
EMC
Q
The text objects (except the first one drawing "Standard") are prepended by a clip path definition their respective text is drawn outside of. Thus, those text pieces are not visible.
For example:
q
67.107 261.154 77 188.188 re
W n
BT
-0.12 Tw 6.7092 0 0 6.7092 332.5724 347.7748 Tm
[(Mec)50(hanical T)115(ee)]TJ
0 Tw 17.697 9.073 Td
[(A)40(WW)40(A Ductile Iron Pipe)]TJ
-34.941 -1.057 Td
[(R)20(educing)]TJ
-1.399 -20.545 Td
(Outlet Coupling)Tj
ET
Q
At the beginning of this block the current clip path is reduced to a rectangle with its lower left corner at (67.107, 261.154) and a size of 77×188.188. The text pieces thereafter are drawn rightwards with approximate baseline starts at
(333, 348)
(350, 357)
(315, 356)
(314, 335)
These baseline starts clearly are right of that clip path rectangle, so the text pieces drawn rightwards also are. Thus, they are hidden.
Related
I would like to "overlay" a text onto an existing PDF document, by appending something at the end of the PDF file (after %%EOF). It is very important that nothing before the %%EOF is modified.
Is it even possible to do this ?
How can I "generate" what to append after %%EOF to do this, for a given text ? The technology doesn't really matter, once I have my "blob" I will just append it myself.
Thanks a lot!
How can I "generate" what to append after %%EOF to do this, for a given text ? The technology doesn't really matter, once I have my "blob" I will just append it myself.
That "blob" to append depends on the PDF to append it to. Essentially you'll have to parse the original PDF and find the page object for the page to overlay. Then you can append a new annotation or content stream with the overlay text, a copy of the page object with a reference to that new annotation or content stream, and a new cross reference section. In general you do that using a PDF library for your preferred programming language.
In a comment to your question you asked for example code to run and see the before/after and reverse-engineer it.
In the following example I use Java and the iText 7 PDF library (current development head but any 7.1.x version should do):
try ( PdfReader pdfReader = new PdfReader(SOURCE_PDF);
PdfWriter pdfWriter = new PdfWriter(TARGET_PDF);
PdfDocument pdfDocument = new PdfDocument(pdfReader, pdfWriter, new StampingProperties().useAppendMode());
Document document = new Document(pdfDocument)
) {
pdfWriter.setCompressionLevel(0);
Paragraph paragraph = new Paragraph("Hello! This text is added for Fratt");
paragraph
.setWidth(100)
.setBorder(new SolidBorder(new DeviceRgb(0f, 0f, 0.6f), 3))
.setRotationAngle(Math.PI / 4);
Rectangle box = pdfDocument.getFirstPage().getCropBox();
document.showTextAligned(paragraph,
(box.getLeft() + box.getRight()) / 2,
(box.getTop() + box.getBottom()) / 2,
1,
TextAlignment.CENTER,
VerticalAlignment.MIDDLE,
0);
}
(ShowTextAtPosition test testAddCenteredBorderedParagraph)
This adds the following rotated framed text to the first page of the source document:
In case of my example document the following "blob" is added after the original %%EOF:
16 0 obj
<</CreationDate(D:20060808104513+02'00')/Creator(TeX)/ModDate(D:20201221183247+01'00')/PTEX.Fullbanner(This is pdfeTeX, Version 3.141592-1.21a-2.2 (Web2C 7.5.4) kpathsea version 3.5.4)/Producer(pdfeTeX-1.21a; modified using iText® 7.1.14-SNAPSHOT ©2000-2020 iText Group NV \(AGPL-version\))>>
endobj
19 0 obj
<</BaseFont/Helvetica/Encoding/WinAnsiEncoding/Subtype/Type1/Type/Font>>
endobj
1 0 obj
<</Font<</F1 19 0 R/F73 6 0 R/F8 9 0 R>>/ProcSet[/PDF /Text]>>
endobj
2 0 obj
<</Contents[18 0 R 3 0 R 17 0 R]/MediaBox[0 0 595.2756 841.8898]/Parent 10 0 R/Resources 1 0 R/Type/Page>>
endobj
17 0 obj
<</Length 568>>stream
Q
q
0.70711 0.70711 -0.70711 0.70711 358.89 -66.87 cm
q
0 0 0.6 rg
251.62 401.57 m
351.62 401.57 l
354.62 404.57 l
248.62 404.57 l
251.62 401.57 l
f
Q
q
0 0 0.6 rg
351.62 401.57 m
351.62 374.93 l
354.62 371.93 l
354.62 404.57 l
351.62 401.57 l
f
Q
q
0 0 0.6 rg
351.62 374.93 m
251.62 374.93 l
248.62 371.93 l
354.62 371.93 l
351.62 374.93 l
f
Q
q
0 0 0.6 rg
251.62 374.93 m
251.62 401.57 l
248.62 404.57 l
248.62 371.93 l
251.62 374.93 l
f
Q
q
BT
/F1 12 Tf
255.94 391.23 Td
(Hello! This text is)Tj
( )Tj
ET
Q
q
BT
/F1 12 Tf
262.27 377.91 Td
(added for Fratt)Tj
ET
Q
Q
endstream
endobj
18 0 obj
<</Length 2>>stream
q
endstream
endobj
xref
1 2
0000009898 00000 n
0000009976 00000 n
16 4
0000009500 00000 n
0000010098 00000 n
0000010715 00000 n
0000009809 00000 n
trailer
<</ID [<98bc0d0e9347d0a066ab140ebd9ce62c><fa0dda3a13b826a6ecbd129bb048a3d0>]/Info 16 0 R/Prev 9003/Root 15 0 R/Size 20>>
%iText-7.1.14-SNAPSHOT
startxref
10764
%%EOF
Because of the pdfWriter.setCompressionLevel(0) in the code, the content stream is not compressed and you can read and understand it easily.
i have a PDF and i want to get the Text of this PDF with PDFBox 2.x an i want to keep all Whitespaces on the beginning from the Line!
Here the PDF Examples:
First Example with seven Whitespace on the Line-Beginning
when i mark the Text in the PDF and copy it to a Editor i get this:
> Erster Testuebertrag auf die Neuentwicklung fuer die PSA Direktbank ma
> l mit sehr langen Verwendungszweck gleich zum testen wann dieser cuted
EDIT: here is the Stream-Dump from this Sectionimage:
BT
/F19 8.9664 Tf 96.197 606.119 Td [(Kommunikation)]TJ
ET
q
1 0 0 1 85.238 594.35 cm
[]0 d 0 J 0.398 w 0 0 m 0 7.352 l S
Q
BT
/F19 8.9664 Tf 133.856 595.758 Td [(Erster)-600(Testuebertrag)-600(auf)-600(die)-600(Neuentwicklung)-600(fuer)-600(die)-600(PSA)-600(Direktbank)-600(ma)]TJ
ET
q
1 0 0 1 85.238 583.989 cm
[]0 d 0 J 0.398 w 0 0 m 0 7.352 l S
Q
BT
/F19 8.9664 Tf 133.856 585.397 Td [(l)-600(mit)-600(sehr)-600(langen)-600(Verwendungszweck)-600(gleich)-600(zum)-600(testen)-600(wann)-600(dieser)-600(cuted)]TJ
ET
Second Example with five Whitespaces in second Line
when i mark the Text in the PDF and copy it to a Editor i get this:
> Rueckzahlung mal mit Umlauten obwohl das ganze ja gar nicht mehr gehen
> duerte, aber hier haben wir jetzt sogar die zweite Zeile erreicht
EDIT: this is the Stream-Dump of the Sectionimage #2:
BT
/F19 8.9664 Tf 96.197 267.821 Td [(Kommunikation)-8400(:)]TJ
ET
q
1 0 0 1 85.238 256.052 cm
[]0 d 0 J 0.398 w 0 0 m 0 7.352 l S
Q
BT
/F19 8.9664 Tf 117.716 257.46 Td [(Rueckzahlung)-600(mal)-600(mit)-600(Umlauten)-600(obwohl)-600(das)-600(ganze)-600(ja)-600(gar)-600(nicht)-600(mehr)-600(gehen)]TJ
ET
q
1 0 0 1 85.238 245.691 cm
[]0 d 0 J 0.398 w 0 0 m 0 7.352 l S
Q
BT
/F19 8.9664 Tf 123.096 247.099 Td [(duerte,)-600(aber)-600(hier)-600(haben)-600(wir)-600(jetzt)-600(sogar)-600(die)-600(zweite)-600(Zeile)-600(erreicht)]TJ
ET
So, when i extract the Text with
PDFText2HTML Stripper = new PDFText2HTML();
or
PDFTextStripper Stripper = new PDFTextStripper();
the i get every Time the Text without leading Whitespaces on the Line-Beginning but i need it ;)
Example:
> Erster Testuebertrag auf die Neuentwicklung fuer die PSA Direktbank ma
> l mit sehr langen Verwendungszweck gleich zum testen wann dieser cuted
>
> Rueckzahlung mal mit Umlauten obwohl das ganze ja gar nicht mehr gehen
> duerte, aber hier haben wir jetzt sogar die zweite Zeile erreicht
Is there every Solution to keep the Whitespaces with PDFBox 2.x?
Greats
Considering following operator sequence:
q
0.12 0 0 0.12 0 0 cm
1 g
472 471.922 4014 6073 re
f
0 G
0 g
q
8.33333 0 0 8.33333 0 0 cm
BT
/R7 12 Tf
0 1.00055 -1 0 71.52 336.711 Tm
[text 1] TJ
/R8 9.96 Tf
0 1.00057 -1 0 105.12 60.3506 Tm
[text 2] TJ
ET
Q
885 502.922 6 297 re
f
q
8.33333 0 0 8.33333 0 0 cm
BT
/R8 9.96 Tf
0 1.00057 -1 0 105.12 95.9906 Tm
[text 3] TJ
0 1.00057 -1 0 116.16 60.3505 Tm
[text 4] TJ
ET
Q
977 502.922 6 535 re
f
q
8.33333 0 0 8.33333 0 0 cm
BT
/R8 9.96 Tf
0 1.00057 -1 0 116.16 124.551 Tm
[text 5] TJ
0 1.00057 -1 0 127.2 60.3507 Tm
[text 6] TJ
ET
Q
1069 502.922 6 386 re
f
q
8.33333 0 0 8.33333 0 0 cm
BT
/R8 9.96 Tf
0 1.00057 -1 0 127.2 106.671 Tm
[text 7] TJ
0 1.00057 -1 0 138.24 60.3508 Tm
[text 8] TJ
ET
Q
1161 502.922 6 437 re
f
q
8.33333 0 0 8.33333 0 0 cm
-----------------------------------------------------------------------------
BT
/R8 9.96 Tf
0 1.00057 -1 0 138.24 112.791 Tm
[line 1] TJ
ET
Q
q
1268 2621.92 m
1268 2675.92 l
1380 2675.92 l
1380 2621.92 l
h
W
n
q
8.33333 0 0 8.33333 0 0 cm
BT
/R9 11.04 Tf
0 0.999402 -1 0 162.6 314.631 Tm
Tj
ET
Q
Q
q
1268 2621.92 m
1268 4396.92 l
2049 4396.92 l
2049 2621.92 l
h
W
n
1 g
1267 2620.92 780 1775 re
f*
Q
q
8.33333 0 0 8.33333 0 0 cm
BT
/R9 11.04 Tf
0 0.999402 -1 0 204.6 515.751 Tm
Tj
ET
Q
0 0 1 RG
0 0 1 rg
q
8.33333 0 0 8.33333 0 0 cm
BT
/R9 11.04 Tf
0 0.999402 -1 0 227.16 355.071 Tm
[line 2] TJ
ET
Q
1903 2958.92 6 1101 re
f
0 G
0 g
q
8.33333 0 0 8.33333 0 0 cm
BT
/R9 11.04 Tf
0 0.999402 -1 0 227.16 487.191 Tm
Tj
ET
Q
q
0 1565 -408 0 1705 2732.92 cm
/X0 Do
Q
q
0 1738 -506 0 2659 2639.92 cm
/X1 Do
Q
q
8.33333 0 0 8.33333 0 0 cm
BT
/R7 12 Tf
0 1.00055 -1 0 342 398.991 Tm
[line 3] TJ
ET
I simplified TJ command to state only text. Please be aware that Tj is incorrectly displayed it is <01> Tj and you can see it in source when you try to edit question.
Page is rotated clockwise 90°. Page properties:
[Type] => Page
[MediaBox] => Array
(
[0] => 0
[1] => 0
[2] => 595
[3] => 842
)
[Rotate] => 90
[Resources] => Array
(
[Font] => Array
(
[R7] => Array
(
[Name] => Helvetica-Bold
[Type] => Type1
[BaseFont] => Helvetica-Bold
[Subtype] => Type1
)
[R8] => Array
(
[Name] => Helvetica
[Type] => Type1
[BaseFont] => Helvetica
[Subtype] => Type1
)
[R9] => Array
(
[Name] => DUCRGK+Calibri
[Type] => TrueType
[BaseFont] => DUCRGK+Calibri
[FirstChar] => 1
[LastChar] => 18
[Subtype] => TrueType
)
)
[XObject] => Array
(
[X0] => Array
(
[Subtype] => Image
[ColorSpace] => DeviceRGB
[Width] => 250
[Height] => 65
[BitsPerComponent] => 8
[Filter] => DCTDecode
[Length] => 3927
)
[X1] => Array
(
[Subtype] => Image
[ColorSpace] => DeviceRGB
[Width] => 278
[Height] => 81
[BitsPerComponent] => 8
[Filter] => FlateDecode
[Length] => 2617
)
)
)
[Contents] => Array
(
[Filter] => FlateDecode
[Length] => 2525
)
[Parent] => Array
(
[Type] => Pages
[Count] => 20
)
In PDF viewer it looks like:
line 1
image 1
line 2
image 2
line 3
Because of page rotation e Tx and f Ty are switched. And for example in 0 1.00057 -1 0 138.24 112.791 Tm 138.24 is stating vertical shift and 112.791 horizontal.
For convenience I'll add also matrix representation here:
[a b 0]
[c d 0]
[e f 1]
or
[a b c d e f]
It seems to be because of cm operator which states scaling image Tx and Ty are so big. Considering it we will have following results:
Ty Content Calculation
138.24 line 1
204,6 image 1 1705/8.33333
227.16 line 2
319,08 image 1 2659/8.33333
342 line 3
Which seems to be correct.
Transformations according to PDF reference v1.7 (Page 205):
•Translations are specified as [ 1 0 0 1 tx ty ], where tx and ty are
the distances to translate the origin of the coordinate system in the
horizontal and vertical dimensions, respectively.
•Scaling is obtained by [ sx 0 0 sy 0 0 ]. This scales the coordinates
so that 1 unit in the horizontal and vertical dimensions of the new
coordinate system is the same size as sx and sy units, respectively,
in the previous coordinate system.
•Rotations are produced by [ cos θ sin θ −sin θ cos θ 0 0 ], which has
the effect of rotating the coordinate system axes by an angle θ
counterclockwise.
•Skew is specified by [ 1 tan α tan β 1 0 0 ], which skews the x axis
by an angle α and the y axis by an angle β.
Questions:
Is matrix which cm/Tm operators change is same matrix? Meaning, after image processing and then modifying matrix for text with operator like Td/TD should it modify matrix after cm state?
Referencing to quote with transformation description. How to get known which of those transformation can be applied together with 1 command? For example for Scaling should there be only sx and sy stated and all other values are like in example 0, which identifies that it is scaling but 0 values should not be applied to actual matrix? It is evident that Skew + Rotation cannot be applied in 1 command as both of the uses b c. In same time Translations and Rotations is used together as I see in the example above.
In PDF reference it is stated that Tm replaces current matrix (Page 406) and cm concatenating (Page 219). Considering this my result is incorrect as along with 1705/8.33333 we should also add previous Ty position which is 138.24 and as result we will have 342,84 and it gives wrong Ty position. What is wrong here?
According to PDF reference v1.7 (Page 206) transformation is applied in following order: Translate, Rotate, Scale or skew. And I thought that scaling is applied to object itself not to the Tx and Ty positioning. So is that right what I'm doing 1705/8.33333 to identify image position?
I answer your questions referencing the PDF specification ISO 32000-1 because the specification is an ISO norm while the PDF references have been called not normative in nature by Adobe staff.
Is matrix which cm/Tm operators change is same matrix? Meaning, after image processing and then modifying matrix for text with operator like Td/TD should it modify matrix after cm state?
No, it is not the same matrix, and cm and Tm operate completely different.
cm manipulates the current transformation matrix (CTM), an element of the PDF graphics state, which defines the transformation from user space to device space. And it does so by multiplying the cm argument to the current value of the CTM, not by replacing the current value as is. (Cf. section 8.3.2.3 - User Space - and Table 57 - Graphics State Operators - in the PDF specification ISO 32000-1)
As element of the PDF graphics state the CTM is subject to save and restore graphics state operators.
Tm, on the other hand, sets the text matrix, Tm, and the text line matrix, Tlm (it does not multiply its argument to the current value). Tm in combination with the text state parameters Tfs, Th, and Trise determine the transformation from text space to user space. (Cf. section 9.4.4 - Text Space Details - and Table 108 - Text-positioning operators - in the PDF specification ISO 32000-1)
Furthermore, at the beginning of a text object, Tm and Tlm are reset to the identity matrix, and Td and TD modify these matrices. Tm is advanced by text showing operators.
Conceptually, the entire transformation from text space to device space may be represented by a text rendering matrix, Trm
And considering your question details, Tm, TD, Td, and all the other text related operators have no effect on the CTM.
Referencing to quote with transformation description. How to get known which of those transformation can be applied together with 1 command? For example for Scaling should there be only sx and sy stated and all other values are like in example 0, which identifies that it is scaling but 0 values should not be applied to actual matrix? It is evident that Skew + Rotation cannot be applied in 1 command as both of the uses b c. In same time Translations and Rotations is used together as I see in the example above.
Any of those example transformations can be combined by simple matrix multiplication. As the text before those samples in the PDF specification states, this sub-clause lists the arrays that specify the most common transformations, it does not list all possible ones.
In PDF reference it is stated that Tm replaces current matrix (Page 406) and cm concatenating (Page 219). Considering this my result is incorrect as along with 1705/8.33333 we should also add previous Ty position which is 138.24 and as result we will have 342,84 and it gives wrong Ty position. What is wrong here?
In your analysis you ignored the operators q and Q which simply cannot be ignored for a proper result.
The q operator pushes a copy of the entire graphics state onto the Graphics State stack.
The Q operator restores the entire graphics state to its former value by popping it from the stack.
As the CTM is part of the graphics state, Q replaces the CTM with the value stored at the time of the corresponding q. (Cf. section 8.4.2 - Graphics State Stack - in the PDF specification ISO 32000-1)
Thus, you have to take this into account. If we do, we get the following progression of active CTM and CTMs on the graphics state stack. As we are interested in coordinates in the default user space coordinate system (i.e. relative to the MediaBox [0 0 595 842] which due to the Rotate value 90 is oriented to have rising x coordinates going down and rising y coordinates going right), we start with the identity matrix as CTM value:
****CTM: [1 0 0 1 0 0]
****Stack: -
q
****CTM: [1 0 0 1 0 0]
****Stack: [1 0 0 1 0 0]
0.12 0 0 0.12 0 0 cm
****CTM: [0.12 0 0 0.12 0 0]
****Stack: [1 0 0 1 0 0]
1 g
472 471.922 4014 6073 re
f
0 G
0 g
q
****CTM: [0.12 0 0 0.12 0 0]
****Stack: [1 0 0 1 0 0] [0.12 0 0 0.12 0 0]
8.33333 0 0 8.33333 0 0 cm
****CTM: [1 0 0 1 0 0]
****Stack: [1 0 0 1 0 0] [0.12 0 0 0.12 0 0]
BT
/R7 12 Tf
0 1.00055 -1 0 71.52 336.711 Tm
[text 1] TJ
/R8 9.96 Tf
0 1.00057 -1 0 105.12 60.3506 Tm
[text 2] TJ
ET
Q
****CTM: [0.12 0 0 0.12 0 0]
****Stack: [1 0 0 1 0 0]
885 502.922 6 297 re
f
q
****CTM: [0.12 0 0 0.12 0 0]
****Stack: [1 0 0 1 0 0] [0.12 0 0 0.12 0 0]
8.33333 0 0 8.33333 0 0 cm
****CTM: [1 0 0 1 0 0]
****Stack: [1 0 0 1 0 0] [0.12 0 0 0.12 0 0]
BT
/R8 9.96 Tf
0 1.00057 -1 0 105.12 95.9906 Tm
[text 3] TJ
0 1.00057 -1 0 116.16 60.3505 Tm
[text 4] TJ
ET
Q
****CTM: [0.12 0 0 0.12 0 0]
****Stack: [1 0 0 1 0 0]
977 502.922 6 535 re
f
q
****CTM: [0.12 0 0 0.12 0 0]
****Stack: [1 0 0 1 0 0] [0.12 0 0 0.12 0 0]
8.33333 0 0 8.33333 0 0 cm
****CTM: [1 0 0 1 0 0]
****Stack: [1 0 0 1 0 0] [0.12 0 0 0.12 0 0]
BT
/R8 9.96 Tf
0 1.00057 -1 0 116.16 124.551 Tm
[text 5] TJ
0 1.00057 -1 0 127.2 60.3507 Tm
[text 6] TJ
ET
Q
****CTM: [0.12 0 0 0.12 0 0]
****Stack: [1 0 0 1 0 0]
1069 502.922 6 386 re
f
q
****CTM: [0.12 0 0 0.12 0 0]
****Stack: [1 0 0 1 0 0] [0.12 0 0 0.12 0 0]
8.33333 0 0 8.33333 0 0 cm
****CTM: [1 0 0 1 0 0]
****Stack: [1 0 0 1 0 0] [0.12 0 0 0.12 0 0]
BT
/R8 9.96 Tf
0 1.00057 -1 0 127.2 106.671 Tm
[text 7] TJ
0 1.00057 -1 0 138.24 60.3508 Tm
[text 8] TJ
ET
Q
****CTM: [0.12 0 0 0.12 0 0]
****Stack: [1 0 0 1 0 0]
1161 502.922 6 437 re
f
q
****CTM: [0.12 0 0 0.12 0 0]
****Stack: [1 0 0 1 0 0] [0.12 0 0 0.12 0 0]
8.33333 0 0 8.33333 0 0 cm
****CTM: [1 0 0 1 0 0]
****Stack: [1 0 0 1 0 0] [0.12 0 0 0.12 0 0]
BT
/R8 9.96 Tf
0 1.00057 -1 0 138.24 112.791 Tm
[line 1] TJ
ET
Q
****CTM: [0.12 0 0 0.12 0 0]
****Stack: [1 0 0 1 0 0]
q
****CTM: [0.12 0 0 0.12 0 0]
****Stack: [1 0 0 1 0 0] [0.12 0 0 0.12 0 0]
1268 2621.92 m
1268 2675.92 l
1380 2675.92 l
1380 2621.92 l
h
W
n
q
****CTM: [0.12 0 0 0.12 0 0]
****Stack: [1 0 0 1 0 0] [0.12 0 0 0.12 0 0] [0.12 0 0 0.12 0 0]
8.33333 0 0 8.33333 0 0 cm
****CTM: [1 0 0 1 0 0]
****Stack: [1 0 0 1 0 0] [0.12 0 0 0.12 0 0] [0.12 0 0 0.12 0 0]
BT
/R9 11.04 Tf
0 0.999402 -1 0 162.6 314.631 Tm
<01> Tj
ET
Q
****CTM: [0.12 0 0 0.12 0 0]
****Stack: [1 0 0 1 0 0] [0.12 0 0 0.12 0 0]
Q
****CTM: [0.12 0 0 0.12 0 0]
****Stack: [1 0 0 1 0 0]
q
****CTM: [0.12 0 0 0.12 0 0]
****Stack: [1 0 0 1 0 0] [0.12 0 0 0.12 0 0]
1268 2621.92 m
1268 4396.92 l
2049 4396.92 l
2049 2621.92 l
h
W
n
1 g
1267 2620.92 780 1775 re
f*
Q
****CTM: [0.12 0 0 0.12 0 0]
****Stack: [1 0 0 1 0 0]
q
****CTM: [0.12 0 0 0.12 0 0]
****Stack: [1 0 0 1 0 0] [0.12 0 0 0.12 0 0]
8.33333 0 0 8.33333 0 0 cm
****CTM: [1 0 0 1 0 0]
****Stack: [1 0 0 1 0 0] [0.12 0 0 0.12 0 0]
BT
/R9 11.04 Tf
0 0.999402 -1 0 204.6 515.751 Tm
<01> Tj
ET
Q
****CTM: [0.12 0 0 0.12 0 0]
****Stack: [1 0 0 1 0 0]
0 0 1 RG
0 0 1 rg
q
****CTM: [0.12 0 0 0.12 0 0]
****Stack: [1 0 0 1 0 0] [0.12 0 0 0.12 0 0]
8.33333 0 0 8.33333 0 0 cm
****CTM: [1 0 0 1 0 0]
****Stack: [1 0 0 1 0 0] [0.12 0 0 0.12 0 0]
BT
/R9 11.04 Tf
0 0.999402 -1 0 227.16 355.071 Tm
[line 2] TJ
ET
Q
****CTM: [0.12 0 0 0.12 0 0]
****Stack: [1 0 0 1 0 0]
1903 2958.92 6 1101 re
f
0 G
0 g
q
****CTM: [0.12 0 0 0.12 0 0]
****Stack: [1 0 0 1 0 0] [0.12 0 0 0.12 0 0]
8.33333 0 0 8.33333 0 0 cm
****CTM: [1 0 0 1 0 0]
****Stack: [1 0 0 1 0 0] [0.12 0 0 0.12 0 0]
BT
/R9 11.04 Tf
0 0.999402 -1 0 227.16 487.191 Tm
<01> Tj
ET
Q
****CTM: [0.12 0 0 0.12 0 0]
****Stack: [1 0 0 1 0 0]
q
****CTM: [0.12 0 0 0.12 0 0]
****Stack: [1 0 0 1 0 0] [0.12 0 0 0.12 0 0]
0 1565 -408 0 1705 2732.92 cm
****CTM: [0 187.8 -48.96 0 204.6 327.95]
****Stack: [1 0 0 1 0 0] [0.12 0 0 0.12 0 0]
/X0 Do
Q
****CTM: [0.12 0 0 0.12 0 0]
****Stack: [1 0 0 1 0 0]
q
****CTM: [0.12 0 0 0.12 0 0]
****Stack: [1 0 0 1 0 0] [0.12 0 0 0.12 0 0]
0 1738 -506 0 2659 2639.92 cm
****CTM: [0 208.56 -60.72 0 319.08 316.79]
****Stack: [1 0 0 1 0 0] [0.12 0 0 0.12 0 0]
/X1 Do
Q
****CTM: [0.12 0 0 0.12 0 0]
****Stack: [1 0 0 1 0 0]
q
****CTM: [0.12 0 0 0.12 0 0]
****Stack: [1 0 0 1 0 0] [0.12 0 0 0.12 0 0]
8.33333 0 0 8.33333 0 0 cm
****CTM: [1 0 0 1 0 0]
****Stack: [1 0 0 1 0 0] [0.12 0 0 0.12 0 0]
BT
/R7 12 Tf
0 1.00055 -1 0 342 398.991 Tm
[line 3] TJ
ET
If you prefer coordinates in the rotated default user space coordinate system (i.e. in the rectangle [0 -595 842 0] which is the MediaBox [0 0 595 842] rotated clockwise by 90° around the origin), you have to multiply the matrices above from the right by [0 -1 1 0 0 0].
For the CTMs used for the images this in particular means:
****CTM: [187.8 0 0 48.96 327.95 -204.6]
****Stack: [0 -1 1 0 0 0] [0 -0.12 0.12 0 0 0]
/X0 Do
...
****CTM: [208.56 0 0 60.72 316.79 -319.08]
****Stack: [0 -1 1 0 0 0] [0 -0.12 0.12 0 0 0]
/X1 Do
According to PDF reference v1.7 (Page 206) transformation is applied in following order: Translate, Rotate, Scale or skew. And I thought that scaling is applied to object itself not to the Tx and Ty positioning. So is that right what I'm doing 1705/8.33333 to identify image position?
The specification more exactly says: If several transformations are combined, the order in which they are applied is significant. For example, first scaling and then translating the x axis is not the same as first translating and then scaling it. In general, to obtain the expected results, transformations should be done in the following order: Translate, Rotate, Scale or skew.
This is a recommendation, not a requirement, and it is merely meant to make the life of PDF creators easier. With some Linear Algebra knowledge one knows how to multiply matrices and what to expect regardless of the order, keeping to the recommended order merely makes things easier to understand.
Concerning your thought that scaling is applied to object itself not to the Tx and Ty positioning: The current transformation matrix (including any scaling in it) is applied to anything you do in the user space; usually, though, objects are located or anchored at the origin (0,0) of the current user coordinate system, and the origin is the fixed point of all pure scaling transformations. Thus, scaling wont change that location / anchor point.
I have downloading PDF's and PDF downloading with the opening of a new tab using _blank in the link
both download fine
However
I am trying to get "Attachment"=>0) so that is opens in the tab
this now leads to a page of text that has not rendered as a PDF
Using SLIM and TWIG I have the following
$html = $twig->render('reportPdfView.html', array(
'pageTitle' => 'Report Detail',
'report' => $reportShowResult,
'users' => $userList
));
$dompdf->load_html($html);
$dompdf->render();
$dompdf->stream("sample.pdf",array("Attachment"=>0));
in response to question what do I see -
%PDF-1.3 1 0 obj << /Type /Catalog /Outlines 2 0 R /Pages 3 0 R >> endobj 2 0 obj << /Type /Outlines /Count 0 >> endobj 3 0 obj << /Type /Pages /Kids [6 0 R 13 0 R 17 0 R 21 0 R 23 0 R ] /Count 5 /Resources << /ProcSet 4 0 R /Font << /F1 8 0 R /F2 9 0 R /F3 10 0 R >> /XObject << /I1 11 0 R /I2 12 0 R /I3 15 0 R /I4 16 0 R /I5 19 0 R /I6 20 0 R >> >> /MediaBox [0.000 0.000 612.000 792.000] >> endobj 4 0 obj [/PDF /Text /ImageC ] endobj 5 0 obj << /Creator (DOMPDF) /CreationDate (D:20140208210105+00'00') /ModDate (D:20140208210105+00'00') /Title (Trainers Report) >> endobj 6 0 obj << /Type /Page /Parent 3 0 R /Contents 7 0 R >> endobj 7 0 obj << /Length 1534 >> stream 1.000 1.000 1.000 rg 34.016 34.016 543.969 723.969 re f 0.200 0.200 0.200 rg BT 34.766 713.165 Td /F1 28.5 Tf [(Attendance List)] TJ ET q 180.000 0 0 61.500 397.234 695.734 cm /I2 Do Q BT 34.016 682.774 Td /F1 10.5 Tf [(ID: 26 - )] TJ ET BT 71.364 682.774 Td /F2 10.5 Tf [(Sun 29th September 2013)] TJ ET BT 193.941 682.774 Td /F1 10.5 Tf [( - Trainer: des cooke )] TJ ET 0.957 0.957 0.957 rg 34.016 652.459 222.028 27.263 re f 0.200 0.200 0.200 rg BT 40.016 661.512 Td /F3 10.5 Tf [(Name)] TJ ET 0.957 0.957 0.957 rg 256.044 652.459 166.521 27.263 re f 0.200 0.200 0.200 rg BT 262.044 661.512 Td /F3 10.5 Tf [(House)] TJ ET 0.957 0.957 0.957 rg 422.565 652.459 38.855 27.263 re f 0.200 0.200 0.200 rg BT 428.565 661.512 Td /F3 10.5 Tf [(Day1)] TJ ET 0.957 0.957 0.957 rg 461.420 652.459 38.855 27.263 re f 0.200 0.200 0.200 rg BT 467.420 661.512 Td /F3 10.5 Tf [(Day2)] TJ ET 0.957 0.957 0.957 rg 500.274 652.459 38.855 27.263 re f 0.200 0.200 0.200 rg BT 506.274 661.512 Td /F3 10.5 Tf [(Day3)] TJ ET 0.957 0.957 0.957 rg 539.129 652.459 38.855 27.263 re f 0.200 0.200 0.200 rg BT 545.129 661.512 Td /F3 10.5 Tf [(Cert)] TJ ET BT 34.016 625.249 Td /F1 10.5 Tf [(Key:)] TJ ET 0.933 0.933 0.933 rg 0.933 0.933 0.933 RG 34.016 607.197 m 577.984 607.197 l 577.984 606.447 l 34.016 606.447 l f 0.200 0.200 0.200 rg BT 34.016 579.237 Td /F1 10.5 Tf [(Days Y -Attended, N -Absent, am -attended am, pm -attended pm )] TJ ET BT 34.016 563.974 Td /F1 10.5 Tf [(Certtificates C -completed, A -attended, N -no certificate)] TJ ET endstream endobj 8 0 obj << /Type /Font /Subtype /Type1 /Name /F1 /BaseFont /Helvetica /Encoding /WinAnsiEncoding >> endobj 9 0 obj << /Type /Font /Subtype /Type1 /Name /F2 /BaseFont /Helvetica-Oblique /Encoding /WinAnsiEncoding >> endobj 10 0 obj << /Type /Font /Subtype /Type1 /Name /F3 /BaseFont /Helvetica-Bold /Encoding /WinAnsiEncoding >> endobj 11 0 obj << /Type /XObject /Subtype /Image /Width 240 /Height 82 /Filter /FlateDecode /DecodeParms << /Predictor 15 /Colors 1 /Columns 240 /BitsPerComponent 8>> /ColorSpace /DeviceGray /BitsPerComponent 8 /Length 5494>> stream xœí\dríÿŸãH’$I’$I’$É$I’ÌL&3If&33“ÉÌd233™™™I2333“™ÉÌÌ$3ÉL2I’Iff’$ù\çW?Î9ÝÏžÏó}¾÷ãyýqßw缯¯ëÇû×u{hè_ü‹ñ/þ#·|•É—+ŸïÅìÝ’ðïîÍ_ŒñÈk»¥mÖßÝ©¿ "ï}›Á¿»gئz¶ª|èïîßÿŒÓÁl´xðßÝÅÿ%ÅÖ¯ùþ³ksÄÁÕü×/kÅ_Û†èú'tl¬Á=`ø×ExÀ$PKÀL¨ŠÉ€ÕÕ©å×£õú/¸;Žs?¤Ûn?°™´hBSv¥˜Ãb!¥mŸÇãD"1<³[‚i¾B·NrIÍã°™”ª˜Ó7ëÑi”2>‹*ÐC(U*å¤;07Ídž‘_ì'Õlþb3«8ôÛø}{,òØL]7m™ ŸCÐõ<¯;%N?#æy_Ém±€CÛÔ,¿ÅD, ;a§„ù H=øúúú®ÕH‡E´‹ráï?WD"P+E² |0¬’p1yÒBûrÊìžáM‘JFŒj¢d?¦?q‰‚Q'²á5ügÖ~rÉ|«•÷÷Jõã»Ö¤ë_JÆ¥›bXÞ‘¨.KÁ:%w¢®Ý¾ð8´"”yäÛ‹f¥E´¦ù"¿¾šÑ‰Ù”ÞÈÞ:×3ã&9ÅÇ'oüT¬’jù,åÒO©§L¶ðþY£é_Y#¤ÛÅ° G&mWˆ¸ÌþžÀ” ‘ÍØ<ÉÞ$–=&—•·PK>mÎÚ•<©'‰‹E§VÈæ×±ŸÑÍ…±%R%õüÓÍY,;ß=¿½SµÝþ6I©ƒ øpû¤–u2>»oÿAð=áÜÑê„VƒÜÒõTÍÇ–Š”¦dá$4©–ÒY¯ÄÃéºÇ âð±™k$ŽBäõÜÊ=œî¬.Î/Ö÷NéÂg›ŒúˆŠ2¨N¿Ø¹E-êÓ(|N©EéjkÊV äÃ4k5d ¶²Ç«ã¶žª4%ßov¦‡Eý땼¢lF¸–¾Ü"ï«êÃqhÆi5[®™•½‹Ç,eã}MPåÃ&ɽÙtnOg 'ܨ}||T>¿Áïòuí6t„½ÿ®‚€4*ÈÜF–ÑEêˆtêý®”K…|’ÊížÏØGzëïDánwÚ dq1Âõ—8%.Jž®y,j™D*טœ³GwE²D‰2¨ô„Ûï£Ã2^W²Cøû£üö’~Æ~m.6½ÈÃxg¾*o©Äe<¸:Z÷%èþa&£V)^Ÿnoo“Ÿíb}6:ÂÅ)K‡ñ ±½·QÊ “xv·=ã0†‡Q§)K¨èjùåfÙm7ê´z£mÌårè¥=Ž>·B¶DÞv÷¦ÆúóÖn K¨$’û$=A"ܨ^òé°ûØ \;Ùõi% sðgƒY›F.y,Ô²A&üEåí.²ä–‹H¦ÒêԲĥò…×{œZ>ÑK¸Q 4Ÿöôî ˜+³øûJ7Û½àW„‹Ï7g]‹{á1J1ïoáz|ó`Ž¾ótk\/pYL<¸Á…zéù4èÒK¸,ƒÁdsB Ó1öF¼ì{áõî螎pýÚüˆºÇÈB,‘>Ô?™ó SE— ׳‰Èfh§³¬7'btÍ ÜHÌ[eˆhm·óøpD+æv"‡(öð#·ë3K1ó´ƒÙšU0¡¯Bîáh휎p£Bm?¨èÙS Jö¾mîæ-´žA¸–>ߘõL/>ڧߩAµB‡p³ ñ'ŽÒõî¬YÊF|u·µK»VÜq\ðÌÓûëeh\ÝÕR}i‚y¼`1Ÿ: y#´„ËTÂï¢~Â#}³Q~>¿ƒÎ—î~:Œ›ÍΘ·+‘>v³Ï©ä#‚‡û«ØšÛ€`0Gfíšý;‡NBlœp9}¼d—ч§„Æ{/¤ã[ÓÖ0-aŠSŒlÏôA,NŸ^k5*[f m´Ô!œŠ-ÚÔ ƒJZÛSfD„[ÕÂÓÍiìÅÁ~xut|5£Ým–vê‰à·¥T„Þ ðà³wvõ:=aº€m¿»‡aÖ.#DC×`—ptÞ,ˆT¶=\þmuBu‡p)ß.ÎÍø|3^—UC„x0[lp•: e]TáA>_åÇ›ŠâeÊ…ÔÉê¸V¤%\¦ †€j52¦éÞkÍÿ5a“„謄Y´Ë‘Žã„ßî—&íf#ŠaƒF!⦚Á•™=ÝE•s #Œ!xïÙ`ÂfL¢U|ž¹QÊ[¥%\¢ÙÄ &¬–5ú×_³,¡zNocÌN8{³å5)%"B>·›˜<àÝÝušIŽ£ŒVìgãñ`–Ö J`ïùd,0¢ä±Wh óõ„j¥—øÁÓ#¾íöý9¡ÑO‚Ù"mŽùÈã„U«°™8pOØ1ù ³§ëâ_L$&Sƒÿ|ŠÒ»yCx0Þ*½^oy "6s™žðÚúžIŒû £Ž“ĈëˆûM7²‹qÂ/Á1%²R!ˆš€Œåfw7rÞréÅl‘MÉ/Ùdl¯g {ÿ]H-9\ƒžpá5K ðŠ«þ ˜LlHžâ{Vˆ, k—ð¨b#ê]Õr“ûhåË?¦r8iìWå+š¢¸Å+çá©a#ø-Îu=ý?o‡LqÅq_±~¾æþÂùO#Œ¥ÃÛD+÷ó6…€7‰ÿJl¹u|šô6oÍbúl8‚L˜A»‡ë¹ÔÃsñ¿g,ïËàPGB‚o™Û)ƒˆù£Fs¥†qbÿ7·¦Œ2¡ß¹Ã9³„º¦ùxÛ…dtÁ¦à±˜lZ-]}¸¾Í”)1âOëMÅÒ†˜B\yf¢ˆCú³F“D?†gÒÛ÷+NDLDî«cxÒ§·îu4kÅ—äíÍõõuŽ–ðKâô4ñRþ”soÕ¾B îóÊ(„A´El¥³•÷§„cŽDOµæžÏ¢”â;°²”T4i‰p&~¸½N?¾ëÍf‹Jíë9h_!gð»=ìÏx<Ÿ†|ÓÑøc&W¤œ2|U ÙL:ÉæKÕ/zE/ìæèhÁ"ìáçÝî”Aø'#FMŽç¥ŠG1”8k·6ÜÀé/>Ð >Y™°xü›‡gײìwéå!~z||z™HfòZ·{CÞ“¢#Œ{û3â?C1j¸¢þº\wë%’ÎÁbku\'êßÆ4=>XdÂQ½fØáž[= ‹6‹ÏW‡+KKËkÛ‘ó»Lღ¾{m7)IKx'¼~ãŸ#Œ®ñj‰ðŒI*”wIš«£Èé[W}àf¸Õj6êµÚ7"/M"âi¥X¬Ð[”1*=]„'Gm6‡Ó3Ü;ÈÑÌñ›©ãÙÒ^ÀVÿ4aˆµ…®ßï£ÆªŽ‰f[Û#€q7äÂOR¾ªÅlæù)•zz¢ÏZÂ69Ã+ƒ” ÎÄÃócµ\®PlóÇ÷Y*á’½³¦i ê³üø“%ÝïXC<W{Œ,Úd\®Äؽ,wl׊;š‹ ü]yKÝœŸ§öÛ¤“+¡d ‰ýÅQ„Ïåpù"¹Î>ŒÝQõ»SÍûa¼'íÂýÞô*õe‰º3Œ7ò™Œúm2‹¯°uÓ!on½Oâv’g»k?ÀÒÕ`ÂÀÓæPN¢ÛÉز,&ÃW¨4¹ƒGÔ4vÙ0†¢Ø³æÛmØ£üš°¬Ýv ÜŽ÷©‰QM‚–²A„éɳn›”BìFAøãå*YÃ=”f²c |5~ÜîxÁþçýá5áv;Î#fSÌðëåÚxÇñ"ß÷ÂzüQÊÞÇ‚zà š7–ºÜíS=¹Ú{áù2ì³v¯ ŒÙÀ+p-lœâýÉ]unæ<-ZñÅn„iz!“|7‹‹Œþ=¼BxOÅí2"lQPkh֪ŷt"ºê1;5T¢JxºØ] „bé>uT¯³çÛsv•€Õ£?WÀ“jmž¥ØC PÍÆ;û¡.Ú¡Žc‘B®-QÍ.=ãÞ †äUQ{CS¢ÄسyJ‡ÿ0‘Éåóù7Ùìk&u{¶˜#o}cöíÄŸ^Á«\^ŸÑ5Ÿgfi+Ï”¿jõz£‚ñükê:¶îs¨…¤nÀ å‡×¿9»Ï?oÎygCÇ÷éçÄðÐÕÏÜgéd|ô‘'PÚöož³hÓo ¾§ßÓg=GH•Ô,#º·{G æHÍÓëÑ‹ë×W—g± oÌ€Ü^‚ –È0¹²zyEFüì0ä5[F½þƒ“øíCê „<·—±í%·E%¤G;Ë)v÷|0¼¿¿éw{üÛGçÑuDŸÃh:_3æß9¹8Ý_vé„®Ôä];<‹#]ßÜ¥²Î˜Ú+¼¡¶YÍ^÷åÓ`–H;:³ÚØì`}myaÊiV‹ÑûiÈéºÍ³¸Z'#´ºèµëär•Á>9…÷£±££èA8ä÷Žä|]`_®³8½³s3.»Õ19¿ZÌ€#Gò%æÉ…ÕPÐï±*ùlŽHã˜Z ¢MolíÝdj±ú¡Ì3EA7?óÿˆ²Ïû”é¬c®‰‰I.çˆÅ –ò±È,D±Úäwõc||ÌnTÀŒ'’kM—Ç7·è_œ÷yÇí¥ˆ;à8BY UéÍV³A£Ö™ìN×ø(ðA°Ë0[¤2:œãΓxçÈ®78±–Ý3+7í =_ÅÔ ¢{»Þ'¢KD2¥ZÁ¡V«”r)r]ï1Ää¤ ¥Š ¥¹ Î`°8|±\6[¬³Q¯–‰¨·{¶2Ìdó„©T,Š¤ •Z°;¼`tðH¥"!ð jÙˆ>ü©ó‡Ægñé|sª{µßX,—×.—Ãî½u1Xl·O¤+‡~zÆá Db‰T" xœÁtqÎ&¨DXË\¤Ôi‹x„^³CšÆšHB»üÑ'-ZuÀ÷bÛgSL5åû òWø·Œ>ôÉ!€ˆwXL&üÇÐ`Ÿ{ 0 ê :‘–ˆGݦ“Û#IºýôÖªùÔùÖ,bÿ°Cÿ hQÿ—õ3…z÷æÕëûךõ¯÷ìýɆϮҩÏß0WáðGrŒØl|Wé›èÚ”õ÷å‹Ü€3x6ã/•?)šÍFí³œK^ì/»-Jûÿൿ QØç÷osÕGHØÜ6êݧëØÆÜØ0âü®|ÑS s9vÿV¥ÿp§ÕjÔëµï#÷æ8¼ä±iăÜß0G2<<ºÏU¾©g£-0¹µïÏJá5y}^žÞž€æ;¬ß hvÌŒ&2Åêw½Ñ9*nµ¶¥\úøòéQã`oï7â›&—÷._‹ä¼Þ#€œL}Vß¹ôãõÉþú¢gĨ¢ùæìwÂØàœ[ÄÒ¹Bé½Zý¨V+ïåb>—IÝÅO6—}.›^)¦ûªð·ÄäJ4ÖÉÅõ}>>¥3//™ôSò>?î®|“#&LÈe1~WãKÄ`äzÛ„/°>ˆŸœžžÇ÷¶CËóS.‡I«ó‘“œÆô¢#ÒBz}þÀòrÀ??;í1F.æsYƒ¿Øþ](£©Þh±Ù»Õb4èT ¦åsþlQ©D*“Ëe (òyXLûOd‹‰•™ ªFÁÂ.÷þcÉÀþGø§1鮂Ö~ endstream endobj 12 0 obj << /Type /XObject /Subtype /Image /Width 240 /Height 82 /SMask 11 0 R /Filter /FlateDecode /DecodeParms << /Predictor 15 /Colors 3 /Columns 240 /BitsPerComponent 8>> /ColorSpace /DeviceRGB /BitsPerComponent 8 /Length 6214>> stream xœíy˜ÅùÇ¿U}ÌtÏìÁî²,Dz°ÜQTLx*D#ü¢B¨`ÂåÊ%ñ<¸5b~êÅpŠþ!Š–ÕeÙåX`wçè£~Œ;OÏÝÓÓƒ˜ôç™ÇGz«»ª«ßzë·ÞªÎOAÈv$Û8ü—À󼪪¡ÿoSZÚµk×òöå-JJŠŠŠšåçË^/G)cŒâóûÏœ>]Ss¬âpÅ®]»vìø¥T×õÌ‹á´CFBcJZ¶ìÒ¹Ëå?¾ü¢‹.¦”*Š¢iZÊÛA ”nxíµÍ›6ž:u*?¿Y]Ý©ŒÊ“ÉÍ………?ýiÿ›‡ “$)Z~ŽÇãY·î™×7lj!ÖpÚÁ Ç]s͵cùË°†¶…ÚÚÚ)“'eòG Ò£¤¤åÔiÓZ·nÍ󼢦®®î×wO„U=í´ƒÀz_ØgôèQ¥¥mu]φ(‡ùlçÎ'Ÿ|ÂÚ½¼½Eqø#ä|èÞ£û˜1cËËËMõ2äâ¾}ËÚµ«8|ؽŽ†vHFAAÁ„‰/ºèâ# ( c¬¢¢`„P¯×[XX(‚ªª™hñššš©S&[¸ñ¿KCË #PFd±ßü ÿ¿™4IQ”$Ò¬(Ê3¦=zÔx±¬¬lØðáÝ»÷eÙšX·iÓ¦]»v‡ÓWÒñ5ô H•Ð?…º ºY1—#3{‚³òHá&BŒj¾°Ú2+¡gòŽh z5¸2Ð ðu`*p¬ ú·`Ðë²Ó~À=Áµá€ÍÐÔxÑx;‘õÀóüSO/*..Nž5clܯn÷ûý‰Ü0dèÈ‘# ±blØðÚË/½”î]ñs ~:\¡ÿ÷Õ‚-FðÓ„¯o…Ÿ€{îL¦†þu1jŽ0m#×Ar'þÐûŸ[à_¡šÏ½äXkÐ…pµu5=Ÿkä¨óL”6-®ÿ9 î¦+UÐo/nâ'ᾜ±À¡1*!¤°¨pÉ’e”¦P8ª¢ÜqÇø$Ê;„ËåZ¼di~~~òd±TUUÝwï=éÞ¿ÐAc#èç)]÷kÇBL7ƒDì….€è€å_JuGö †äJœ8ôŽ9 ³áöšQPàØ"¸_ÔTh*O8ïg#c l†ü\EMm)ôû UÄIdÎŽ×ÀºvíºhñÒ”ÒL)>ýþ”Ò Ü=qÂÁÿ;eÊ(:tèî-H$ÐJÌ(¹ÂfÈWÚay×e¨’RútàQ¸ÌH¦ÂWoNêàÙùbpæUº]£ïb?Aš1$ê3qÀ¡ÄýUÌŸöÇ\)-m;ã™f¤ùoo¼Q]]m¾Øóæ=ä7!ýQäxsÒ½%~ÑÕŠä€Ì‡kÜ9£ÚH"&~iÑ´38ã €þ ´ÐªÁø¦‹ÿ€¶ÝœAEÈK bŠC |\HýÁ½ Oh܆Däfº±0 ™ØårMŸ1$u±}>߳Ϯ3WäïPUõÉ…9ŽKÔ/¤:èÚ ÐÜ›GÃw0±JH‰±:9à3#3/"¹&¤åz~C&0¾#†_îa¸O€=ˆ„Ú(t`5ÜžÈÜ)жúËPöBÓ ¤'¸kÁõ—’¡½AŒƒx„³†7 ™Æ¢¤¥‚òÀƒ3yžOY„×^{5|¾cÿþ}õõõ’$™LO9u*í#%ëƃ <é)^Og,•7ÈTøÌ?¨-è T…o)I롉l~Û¡ FC^:št\e ƧP`=”•ˆˆËiÛ u+TùÀRH™hkÜñçŒypÀZ(¹À0ØdܧOI–(G MѺ\î|ðµ\V¯^5uê4“‰«ªª,daJ Cï«fp?\]Á-´{üž’#Ð× ElW”Û™„Ä|¯ƒä"…ëò˜ û$jÞäzðˬ3Y7‰lØ"\šÆ<—‚ef ìƒ~gßœ5:vìŽr„Дínÿ¾/,gLFç¹ÝîwÞyÛB¦Zv#Û_gÐ)û‚3 ¯ ô·î2é°×á1™X.E}ÊÌB¿Ðày½\7ÐØ¡½Ix w¤÷ØV;Ì$4YÉ×Ô(°ÚÄÌtG,Ý{t§G(!„¤ÖÖ·œ‘ù5)Û·o¯¬¬´Ez³u_Aÿ5ü3í€Q+À…çb,#˜É_£¹ÉËW ¸ ÿôË`zHC.ˆ±õS`’Ý‚e$ÀóipºíÒìõz§IsjdëUˆ”Á„•¿_a1÷¼ õ:4œˆTu0üÐó)8ä[°÷"íð"dkOûYäØë$Xuž”ÔÝ—qÀ€1¶Z!¼^/Ó ¥õ¢CÇŽ–óE—{cúý÷544XËÂb<… ÜßèQ50®^HÏטUž# j4V²É’L÷¬«ãYlºÜ/ÚA¦Áw\ž!n·;ø¡Î;›T´±”—·Ož€ã¸5øƒ5c#„õ!Œƒïÿ åW~waú#z T#?lúgòÔ‚ÝTirAþÙüDwˆ®†ºâ€Ïll‰e&\F»n”YÎÑ$~ _¿~ÖfÆ¿#É_].×êU«¶n}×jÑ€ÌÃGg!°¤¯a´¤OÀ=.ÍÎQ¹-ý)€P_ ÑØd-ï€ïKÓfƒ$,a¨È¦†ž¡$<Þ€u©|”– ©\Jèºvë#¶mÛ–V.„6mÚ‡·:ˆBÅyóÚ³{wZ%ÃN¸þŠH±øèè4½ý,›¡Ù+¡¼Ù“„XéÇV ¤¬jËaŸ}|±Ñ5vÑØØHiz궸¤Åˆ#Óº…1vç]Is0œ÷ÐÜÇI’;nóØ E˜ÿ_!‡U–Üñ…81Nß" ‚ …`ÄF`)¤¹ðo1á}‹J‘½æ7 ¢ÛNslw6GŸ§OŸ654 ©ÚÍÆ}ñÅÞÝ»w›ô+8¨K—.‰Úår=üÈ£¤‰ŠŠŠ;w~òñÇG**ÎÖŸM«l6hhœ»>cˆÀRdÚÚìe‚ëŒzáF°¹p 7ÑŸ}h™…Õká†i˜o,h/‡J÷EQfΚ=èºëÌHsiié]ªgŒ1¿ßïóùŠŠŠ8{ÎœuÏ=÷øüyyiÄRÛ Ð!öAÿÂÐ3à‚óÉÝb-”yD)× 0â]©æÿe0šu »}U†‚36”J至©žCìß·Ï¢]×ÇŽ»îÙ犚7O’¬eËVó,49c,¶k×nåªU¿[þ{·Û”~´ó«L‚ßhdðÀì¦Z²ÄÛPï†/ªX¸ ÂMIõôg‘͵$ à1C·&Ïfm,häøñã'OYÏp¹\Ë—¯øÝòƤëßÀÓ‹Yvó…),,XûÇg®¾úš”)ã·Ë<gíWÐÇ›sAÜñÆÈój4ú8Þ‚'üõ< —¢>»óȺ‚®ƒe㻀Iðœ`¼Wòª¡N|ñÖ/eZ¼9\ À`¤˜_¸b¸ Àt>H<xžð÷fÀ4„?Œ×ë¿`¡Ç둤;HpÇq|]Ý©S§N5Ôׂ·Kêö£nI,taó¦MÉC±mV3O"hìZ4 ýy¹S¿ ßÓÒÀï µHàÄ:f”t/H[k}Á?þ{Y1R__ÿÂÏg¢J5M²,·nݺs—.={^Щs'¥€¢(72jÔh‰l$ûûÍÐŒYÝnß2D{9 v#OGË4{ ¹ÄC´Û nð¸3¾ù蟽ü¿/Y[¡}ÎPeèÏ~Ö«W¯DƒQûz=£_s>EwDánEcTù:€ÞϘfÀ&¨ÔðÏî Öãtbð€üÈ0ŒÖ€Ýç|jpË–ÍS§LN²-Áù€®ëÎœåñÄÍ´_ wA3zƒ`m³3~²…`<|FùU F‡Ë4ª ü«EBt5öo[õ¦¶¶vü¯nŸ1}zmm Çq*lBÈ'üÏ?Ü»gϱc5¢(fþLº®O¼ûî¸ÊŠúÜí’&e£-AŽd#›Ø}-”±Ñô€Üqu<Ãaèe†ö9âëPOÛ1 Þ43G¥TWWßß½IvvaàÀAãÆ·lálÙ²å…?=u1+ÆÀ7Ðs*mÎKG‡X‹ ±”HÜÓ]Ð÷DêÎA௰c ɨøд¸ð¯g‚_ìn ÙcÀ€+gÍžmFškjjî½gZò}JEÙ¼yÓˆ[o9RQaÍ»rà ×Ç^ÌŠ#3~aÏy/ÐÖA1V?âγ`)‚Fï†xîLÖÀ†ÈÆ\ºüäŠ+&Lœhf/]BÈÜ9³MÚ#àf|±w¯™±k·nQ³"ÐQ+IÓÚ'à{äld?0ÞƒŸCÛÓ?LEçñйwïÞ“'O1c7BæÌžuæÌ™´žÿÈ#8p ÝRƒÁz^uñ\Tâ©È®µQ†pÇÄ•ó$Q.è /Y]Ü…˜±9¸ÍýÎA¸L³fÍfÏ™krŠ¤²²ò믿¶ËsÆLíÚG/ÉŠ—£ÄØ–(Û0k¹7 I0S[à{Rø#3 ÈzÈ£,͇K‘ù®Fð9sÁ·Ó þÜ>×a\fÎœeòx+ÆØÿg5öÌ33flZ~ââ踨¬hè¶ FS«ê"ÐÍÒñ‚†>?2•¥ ‚äJ}’7R ÍëÝl÷°7«ÑØØ`yq+€wÞ~ÇüFa!bwsÌJ…ô2<–•Ù€´)RµTò½Ê&(Q}\è_ —œ«aC¶UÅM7Þ¤(¦ú JéÆ39†"|øáö´n¡1»?Ú/ÐèkP1pôÜjh˯ea¢.#ð}hQ•š²òåç_8xº\zée¹yy&SJÿþÖ[æøþ{崙¾±1ÚÀ³_ €Ëè(' çXC뀤Eš:²¨Ñ½H€æ¬Øá32#X÷JHço ‹ ÆoôÓ%ß¿=´ä$몪ҚÝeÏfι¼ñmÏMˆz˜Ð# ¿¹ÄÜjæÐi/«!›üÝt4ÅÃð¯D0J!‡¢—Þ„gôùo˜ABÝ`Œ1Ʀiš®ëº®‡/…Ñí8îMU•´– W‰ª°S %àåH± ÀKçv©,fÁ’ õû¥ê÷)À€ypE©ÒZ°´Êý"”)ðÇŽh`"„M§A<¿–X¦"´äI×4JICCý‚§ž¼mäH¿ÏTEQTUg̸%›-f%ÇqæϨa×®]QMu‰)s ÀhwCT"/î‚~Òô99\Àkmæ"pƒÁ‡þ-‹á~ÚJÌË™×%àŒê…&¥¿IȧЮGãr¸K#wØ×€\aF#øú~è•Ð·Býæûvþ$Ï^ÊÉy}ÓÆÚ“'÷} ١÷BÜCÉÙ³g9žxAEQÀó´ÉDeënø0…EE懕º®ïܹ#ê¢)n2b¬S–… #û€úbNfQÓ‹Ø]tDæ÷å$ ¤hpgÁBMdÜÆb€~஄ôôPÿ ý,X€bkÀßÞ¹Él†ZmIÚjÁnoÄhdáuÀ”–rÀI°oM8¶bÏw6m¾?»ªZé¥Wû‚{œÏYP×ÖŠ¢(ɲ,Ë„J) ½z÷þñk¯Æ9HÀ”#€ŒIê½õ=R`Zª}2掌JßÖ½É+UDì‡þxfÑs«|Á:ƒÆ••ØAUÔ¼c‘%¯Cóï¡NÕdâ#ȳÎØÑꣲ,çææ^àž›¢iÚ¨Q£2èÁƒ¯3|'Â[o¾{=¾ áØ\æ!°#UD¯…-ð’3ä P€ &PK_¦(›?0¾ëјHÓG½yWPãi™M»üŒAQzª*Í|ÅØѪªÚÚÚ3gNû}ª¢ê,âû–%-yÞºìôêÝÛ¤ÏÀsÏ=w¥z|6s$O\ànBãÛ©L⼈ýúíá,Ø(ønFã¿ §«íy`-‚¶H³±<¿#ã4¾Õ“tô~U“ÝâBÓÝÞðu ]âQ~—È£a¬QS[[WW×Pßu]‹²w9žŸ2uªå‡9ÊL4MÓ¶lÞ÷OñÛÓ¯FœHÈíÅ|m‚‰¶ˆ¢¨žñQ…ˆ§hƒÝ _ ȵàÇA”#b«”2ÈPV!X™ÛõØ|– ÐÜ(W€Wb2êÎXèúu*ÿ½èθ ‰WgÿüóD ~‘Êß…….ñ;ÛR*ŠBnnnq‹[·nݺMóâæ99¹.QŒÍw¹\Í»wï3¹PJW®Z““úÐXŽãþ°zuòÄ~ðñÙCSÕòòrÇãÍñæäääååæçå7+((((ÈËËóx=.—Ès|ìdµ¦iW^uUYYÙg»v©IA–,]fòhûÅ‹ŸNyD¢£¡’qíµ×†vÀ „ò<ç–¤œœœfÍ š5kæÍñJn‰çã´‘;v¬X±_#€¢¢¢!C†¦<ý›PòÍ‘Ê9sf›ôOÿ £Á²ÎÁƒ}~YYBÇq¼À‹¢(ÏóÔĶŽ!מ,˲,—””„Õ9c,å"EŽã–.]º}Û?ÌØÑÐ)ÈÏËzÉbMÓHhº›r”RJ)gòhCH’ôî»ï>óÌÚ†úô–À8íš={Ξ5GQ•ïãí†çù,Y¼¨¶¶ÖÂíŽ#;˜¢OŸ>÷MŸ²²!4„MS¿ùæÛÇ{ìÌ™ÓÖŸcc™þ³)++›¿`a6žÌóüë6¼øâúL–$†pÚ! <Ï܇æµoß>óÌ)¥¢(nÛ¶íÏ/®¯©©±kktG Ò¦[·n£FßÖ½{w¿ßŸ–N¥” ‚à÷ùß{oë‡~øõ×lß‹Úh‹””´0`#ž=:vì$Bhax©áwB(ÇiªVUõíáÇ8°g÷î#1mÄhhÑ¢¤c§ŽZ¶*((àrº®îäÉ“ÕÕÕ‡Œ]›íààààààààààààààààààààààààààà`'ÿ|º¢ endstream endobj 13 0 obj << /Type /Page /Parent 3 0 R /Contents 14 0 R >> endobj 14 0 obj << /Length 6472 >> stream 0.200 0.200 0.200 rg 0.933 0.933 0.933 RG 1.000 1.000 1.000 rg 34.016 34.016 543.969 723.969 re f 0.200 0.200 0.200 rg BT 34.766 713.165 Td /F1 28.5 Tf [(Trainers Report )] TJ ET q 180.000 0 0 61.500 397.234 695.734 cm /I4 Do Q BT 34.016 682.774 Td /F1 10.5 Tf [(ID: 26 - )] TJ ET BT 71.364 682.774 Td /F2 10.5 Tf [(Sun 29th September 2013)] TJ ET BT 193.941 682.774 Td /F1 10.5 Tf [( - Trainer: des cooke )] TJ ET 0.957 0.957 0.957 rg 34.016 652.459 242.150 27.263 re f 0.200 0.200 0.200 rg BT 40.016 661.512 Td /F3 10.5 Tf [(Label)] TJ ET 0.957 0.957 0.957 rg 276.166 652.459 301.819 27.263 re f 0.200 0.200 0.200 rg BT 282.166 661.512 Td /F3 10.5 Tf [(Content)] TJ ET 0.867 0.867 0.867 RG 0.75 w 0 J [ ] 0 d 34.016 652.459 m 276.166 652.459 l S BT 40.016 636.372 Td /F1 10.5 Tf [(Course Date)] TJ ET 0.75 w 0 J [ ] 0 d 276.166 652.459 m 376.772 652.459 l S 0.75 w 0 J [ ] 0 d 376.772 652.459 m 477.378 652.459 l S 0.75 w 0 J [ ] 0 d 477.378 652.459 m 577.984 652.459 l S BT 282.166 636.372 Td /F1 10.5 Tf [(Sun 29th 0000027104 00000 n 0000033576 00000 n 0000033641 00000 n 0000034648 00000 n 0000040387 00000 n 0000046859 00000 n 0000046924 00000 n 0000047094 00000 n 0000047159 00000 n trailer << /Size 25 /Root 1 0 R /Info 5 0 R >> startxref 47307 %%EOF
I have a pdf document (created by a 3rd party using RealObjects PDFreactor), which is not a form. I'm trying to extract information from that PDF using iTextSharp. I'm able to extract all the plain text (using SimpleTextExtractionStrategy), but there is some information that is represented with radio buttons, which does not come across in the plain text extracted. I'm a complete beginner with iTextSharp, so I might be overlooking something very simple. PdfReader.AcroForm returns null, and PdfReader.AcroFields.Fields has 0 keys. How can I figure out the state of radio buttons and checkboxes throughout the document? The documents all have the same structure, so I don't really need the radio buttons & checkboxes to be labelled; just having a list of items, and knowing whether they are checked or not would be sufficient.
I've confirmed that the radio buttons are not just images using this approach.
I made a feeble attempt at finding all the BTN objects on a page by modifying the code to extract images, but I apparently messed up because it doesn't return anything on a page that contains radio buttons:
private List<PdfObject> GetBTNFromPdfDict(PdfDictionary dict, PdfReader doc)
{
List<PdfObject> objects = new List<PdfObject>();
foreach (PdfName name in dict.Keys)
{
PdfObject obj = dict.Get(name);
PdfDictionary tg = PdfReader.GetPdfObject(obj) as PdfDictionary;
if (null != tg)
{
PdfName subtype = (PdfName)(PdfReader.GetPdfObject(tg.Get(PdfName.SUBTYPE)));
if (obj.IsIndirect())
{
if (PdfName.BTN.Equals(subtype))
{
int xrefIdx = ((PRIndirectReference)obj).Number;
PdfObject pdfObj = doc.GetPdfObject(xrefIdx);
objects.Add(pdfObj);
}
else if (PdfName.FORM.Equals(subtype) || PdfName.GROUP.Equals(subtype))
{
objects.AddRange(GetBTNFromPdfDict(tg, doc));
}
}
else objects.AddRange(GetBTNFromPdfDict(tg, doc));
}
}
return objects;
}
I also looked at the content for the page using PdfContentReaderTool; the output didn't include any BTN, so I'm not sure what is going on. Here's the output (I replaced all the lines of text with [TEXT]). Just looking at the content stream section, it seems trivial to extract all strings (everything between brackets followed by Tj), but I can't seem to figure out radio buttons and checkboxes. (I had to abridge the output, the question was too long)
==============Page 2====================
- - - - - Dictionary - - - - - -
(/Type=/Page, /TrimBox=System.Collections.Generic.List`1[iTextSharp.text.pdf.PdfObject], /Contents=Stream, /Parent=Dictionary of type: /Pages, /Group=Dictionary of type: /Group, /BleedBox=System.Collections.Generic.List`1[iTextSharp.text.pdf.PdfObject], /Resources=Dictionary, /MediaBox=System.Collections.Generic.List`1[iTextSharp.text.pdf.PdfObject])
Subdictionary /Parent = (/Count=10, /Type=/Pages, /Parent=Dictionary of type: /Pages, /Kids=System.Collections.Generic.List`1[iTextSharp.text.pdf.PdfObject])
Subdictionary /Parent = (/Count=39, /Type=/Pages, /ITXT=2.1.6, /Kids=System.Collections.Generic.List`1[iTextSharp.text.pdf.PdfObject])
Subdictionary /Group = (/Type=/Group, /S=/Transparency, /CS=/DeviceRGB)
Subdictionary /Resources = (/ColorSpace=Dictionary, /ProcSet=System.Collections.Generic.List`1[iTextSharp.text.pdf.PdfObject], /Font=Dictionary)
Subdictionary /ColorSpace = (/CS=/DeviceRGB)
Subdictionary /Font = (/F1=Dictionary of type: /Font, /F3=Dictionary of type: /Font, /F2=Dictionary of type: /Font, /F4=Dictionary of type: /Font)
Subdictionary /F1 = (/Type=/Font, /BaseFont=/Helvetica, /Subtype=/Type1, /Encoding=/WinAnsiEncoding)
Subdictionary /F3 = (/Type=/Font, /BaseFont=/Times-Bold, /Subtype=/Type1, /Encoding=/WinAnsiEncoding)
Subdictionary /F2 = (/Type=/Font, /BaseFont=/Times-Roman, /Subtype=/Type1, /Encoding=/WinAnsiEncoding)
Subdictionary /F4 = (/Type=/Font, /BaseFont=/Times-Italic, /Subtype=/Type1, /Encoding=/WinAnsiEncoding)
- - - - - XObject Summary - - - - - -
No XObjects
- - - - - Content Stream - - - - - -
q
BT
36 805.89 Td
ET
Q
q
0 841.89 m
0 0 l
595.29 0 l
595.29 841.89 l
h
W
n
1 w
2 J
0 j
10 M
[]0 d
q
q
0 841.89 m
0 0 l
595.29 0 l
595.29 841.89 l
h
W
n
0.03 w
2 J
0 j
10 M
[]0 d
q
0 841.89 m
0 0 l
595.29 0 l
595.29 841.89 l
h
W
n
0 841.89 m
595.29 841.89 l
595.29 0 l
0 0 l
0 841.89 l
h
W
n
0 0 0 rg
BT
/F1 233.33 Tf
0.03 0 0 0.03 540.69 4.71 Tm
12.63 Tc
(TEXT)Tj
0 Tc
ET
BT
/F1 233.33 Tf
0.03 0 0 0.03 129.18 4.71 Tm
11.37 Tc
(TEXT)Tj
0 Tc
ET
0.8 0.8 0.8 rg
15 826.89 m
580.29 826.89 l
580.29 494.79 l
15 494.79 l
15 826.89 l
h
f
0 0 0 rg
20.1 826.89 m
575.16 826.89 l
574.41 826.14 l
20.85 826.14 l
h
f
20.85 495.54 m
574.41 495.54 l
575.16 494.79 l
20.1 494.79 l
h
f
20.1 826.89 m
20.85 826.14 l
20.85 495.54 l
20.1 494.79 l
h
f
574.41 826.14 m
575.16 826.89 l
575.16 494.79 l
574.41 495.54 l
h
f
1 1 1 rg
20.85 826.14 m
574.41 826.14 l
574.41 495.54 l
20.85 495.54 l
20.85 826.14 l
h
f
0 0 0 rg
28.35 818.64 m
566.91 818.64 l
566.91 799.14 l
28.35 799.14 l
28.35 818.64 l
h
f
1 1 1 rg
BT
/F3 350 Tf
0.03 0 0 0.03 31.35 804.69 Tm
6.52 Tc
(I. )Tj
0 Tc
ET
BT
/F3 350 Tf
0.03 0 0 0.03 41.07 804.69 Tm
27.57 Tc
(TEXT)Tj
0 Tc
ET
0 0 0 rg
BT
/F2 300 Tf
0.03 0 0 0.03 28.35 789.54 Tm
( )Tj
ET
28.35 787.14 m
566.91 787.14 l
566.16 786.39 l
29.1 786.39 l
h
f
29.1 728.64 m
566.16 728.64 l
566.91 727.89 l
28.35 727.89 l
h
f
28.35 787.14 m
29.1 786.39 l
29.1 728.64 l
28.35 727.89 l
h
f
566.16 786.39 m
566.91 787.14 l
566.91 727.89 l
566.16 728.64 l
h
f
29.1 729.39 m
296.88 729.39 l
297.63 728.64 l
29.1 728.64 l
h
f
296.88 786.39 m
297.63 786.39 l
297.63 728.64 l
296.88 729.39 l
h
f
BT
/F2 250 Tf
0.03 0 0 0.03 32.1 775.14 Tm
19.36 Tc
(TEXT)Tj
0 Tc
ET
0.37647 0.37647 0.37647 rg
32.1 772.89 m
293.88 772.89 l
292.38 771.39 l
33.6 771.39 l
h
f
0.87843 0.87843 0.87843 rg
292.38 771.39 m
293.88 772.89 l
293.88 744.39 l
292.38 745.14 l
h
f
0.37647 0.37647 0.37647 rg
32.1 772.89 m
33.6 771.39 l
33.6 745.14 l
32.1 744.39 l
h
f
0 0 0 rg
33.6 745.14 m
292.38 745.14 l
293.88 744.39 l
32.1 744.39 l
h
f
1 1 1 rg
33.6 771.39 m
292.38 771.39 l
292.38 745.14 l
33.6 745.14 l
33.6 771.39 l
h
f
q
0 841.89 m
0 0 l
595.29 0 l
595.29 841.89 l
h
W
n
0.03 w
2 J
0 j
10 M
[]0 d
q
0 841.89 m
0 0 l
595.29 0 l
595.29 841.89 l
h
W
n
33.72 766.14 m
287.13 766.14 l
287.13 750.39 l
33.72 750.39 l
33.72 766.14 l
h
W
n
q
0 841.89 m
0 0 l
595.29 0 l
595.29 841.89 l
h
W
n
0.74987 w
2 J
0 j
10 M
[]0 d
q
33.72 766.14 m
33.72 750.39 l
287.13 750.39 l
287.13 766.14 l
h
W
n
1 1 1 rg
33.72 766.14 m
287.13 766.14 l
287.13 750.39 l
33.72 750.39 l
33.72 766.14 l
h
f
33.72 766.14 m
287.13 766.14 l
287.13 750.39 l
33.72 750.39 l
33.72 766.14 l
h
W
n
q
0 841.89 m
0 0 l
595.29 0 l
595.29 841.89 l
h
W
n
0.74987 w
2 J
0 j
10 M
[]0 d
q
33.72 766.14 m
33.72 750.39 l
287.13 750.39 l
287.13 766.14 l
h
W
n
0 0 0 rg
BT
/F2 18 Tf
0.74973 0 0 0.75 33.72 753.31 Tm
2.02 Tc
(TEXT)Tj
0 Tc
ET
BT
/F2 18 Tf
0.74973 0 0 0.75 76.53 753.31 Tm
( )Tj
ET
BT
/F2 18 Tf
0.74973 0 0 0.75 80.63 753.31 Tm
1.85 Tc
(TEXT)Tj
0 Tc
ET
Q
Q
Q
Q
Q
Q
0 0 0 rg
297.63 729.39 m
566.16 729.39 l
566.16 728.64 l
297.63 728.64 l
h
f
BT
/F2 250 Tf
0.03 0 0 0.03 300.63 775.14 Tm
18.42 Tc
(TEXT)Tj
0 Tc
ET
0.37647 0.37647 0.37647 rg
300.63 772.89 m
563.16 772.89 l
561.66 771.39 l
302.13 771.39 l
h
f
0.87843 0.87843 0.87843 rg
561.66 771.39 m
563.16 772.89 l
563.16 744.39 l
561.66 745.14 l
h
f
0.37647 0.37647 0.37647 rg
300.63 772.89 m
302.13 771.39 l
302.13 745.14 l
300.63 744.39 l
h
f
0 0 0 rg
302.13 745.14 m
561.66 745.14 l
563.16 744.39 l
300.63 744.39 l
h
f
1 1 1 rg
302.13 771.39 m
561.66 771.39 l
561.66 745.14 l
302.13 745.14 l
302.13 771.39 l
h
f
q
0 841.89 m
0 0 l
595.29 0 l
595.29 841.89 l
h
W
n
0.03 w
2 J
0 j
10 M
[]0 d
q
0 841.89 m
0 0 l
595.29 0 l
595.29 841.89 l
h
W
n
302.25 766.14 m
556.41 766.14 l
556.41 750.39 l
302.25 750.39 l
302.25 766.14 l
h
W
n
q
0 841.89 m
0 0 l
595.29 0 l
595.29 841.89 l
h
W
n
0.74987 w
2 J
0 j
10 M
[]0 d
q
302.25 766.14 m
302.25 750.39 l
556.41 750.39 l
556.41 766.14 l
h
W
n
1 1 1 rg
302.25 766.14 m
556.41 766.14 l
556.41 750.39 l
302.25 750.39 l
302.25 766.14 l
h
f
302.25 766.14 m
556.41 766.14 l
556.41 750.39 l
302.25 750.39 l
302.25 766.14 l
h
W
n
q
0 841.89 m
0 0 l
595.29 0 l
595.29 841.89 l
h
W
n
0.74987 w
2 J
0 j
10 M
[]0 d
q
302.25 766.14 m
302.25 750.39 l
556.41 750.39 l
556.41 766.14 l
h
W
n
0 0 0 rg
BT
/F2 18 Tf
0.74973 0 0 0.75 302.25 753.31 Tm
1.42 Tc
(TEXT)Tj
0 Tc
ET
BT
/F2 18 Tf
0.74973 0 0 0.75 344.3 753.31 Tm
( )Tj
ET
BT
/F2 18 Tf
0.74973 0 0 0.75 348.4 753.31 Tm
1.8 Tc
(TEXT)Tj
0 Tc
ET
BT
/F2 18 Tf
0.74973 0 0 0.75 431.64 753.31 Tm
( )Tj
ET
BT
/F2 18 Tf
0.74973 0 0 0.75 435.75 753.31 Tm
1.23 Tc
(TEXT)Tj
0 Tc
ET
Q
Q
Q
Q
Q
Q
0 0 0 rg
28.35 727.89 m
566.91 727.89 l
566.16 727.14 l
29.1 727.14 l
h
f
29.1 503.79 m
566.16 503.79 l
566.91 503.04 l
28.35 503.04 l
h
f
28.35 727.89 m
29.1 727.14 l
29.1 503.79 l
28.35 503.04 l
h
f
566.16 727.14 m
566.91 727.89 l
566.91 503.04 l
566.16 503.79 l
h
f
29.1 670.14 m
296.88 670.14 l
297.63 669.39 l
29.1 669.39 l
h
f
296.88 727.14 m
297.63 727.14 l
297.63 669.39 l
296.88 670.14 l
h
f
BT
/F2 250 Tf
0.03 0 0 0.03 32.1 715.89 Tm
19.68 Tc
(TEXT )Tj
0 Tc
ET
0.37647 0.37647 0.37647 rg
32.1 713.64 m
293.88 713.64 l
292.38 712.14 l
33.6 712.14 l
h
f
0.87843 0.87843 0.87843 rg
292.38 712.14 m
293.88 713.64 l
293.88 685.14 l
292.38 685.89 l
h
f
0.37647 0.37647 0.37647 rg
32.1 713.64 m
33.6 712.14 l
33.6 685.89 l
32.1 685.14 l
h
f
0 0 0 rg
33.6 685.89 m
292.38 685.89 l
293.88 685.14 l
32.1 685.14 l
h
f
1 1 1 rg
33.6 712.14 m
292.38 712.14 l
292.38 685.89 l
33.6 685.89 l
33.6 712.14 l
h
f
q
0 841.89 m
0 0 l
595.29 0 l
595.29 841.89 l
h
W
n
0.03 w
2 J
0 j
10 M
[]0 d
q
0 841.89 m
0 0 l
595.29 0 l
595.29 841.89 l
h
W
n
33.72 706.89 m
287.13 706.89 l
287.13 691.14 l
33.72 691.14 l
33.72 706.89 l
h
W
n
q
0 841.89 m
0 0 l
595.29 0 l
595.29 841.89 l
h
W
n
0.74987 w
2 J
0 j
10 M
[]0 d
q
33.72 706.89 m
33.72 691.14 l
287.13 691.14 l
287.13 706.89 l
h
W
n
1 1 1 rg
33.72 706.89 m
287.13 706.89 l
287.13 691.14 l
33.72 691.14 l
33.72 706.89 l
h
f
33.72 706.89 m
287.13 706.89 l
287.13 691.14 l
33.72 691.14 l
33.72 706.89 l
h
W
n
q
0 841.89 m
0 0 l
595.29 0 l
595.29 841.89 l
h
W
n
0.74987 w
2 J
0 j
10 M
[]0 d
q
33.72 706.89 m
33.72 691.14 l
287.13 691.14 l
287.13 706.89 l
h
W
n
0 0 0 rg
BT
/F2 18 Tf
0.74973 0 0 0.75 33.72 694.06 Tm
1.8 Tc
(TEXT)Tj
0 Tc
ET
BT
/F2 18 Tf
0.74973 0 0 0.75 77.19 694.06 Tm
( )Tj
ET
BT
/F2 18 Tf
0.74973 0 0 0.75 81.3 694.06 Tm
1.89 Tc
(TEXT)Tj
0 Tc
ET
Q
Q
Q
Q
Q
Q
0 0 0 rg
297.63 670.14 m
566.16 670.14 l
566.16 669.39 l
297.63 669.39 l
h
f
BT
/F2 250 Tf
0.03 0 0 0.03 300.63 715.89 Tm
22.9 Tc
(TEXT )Tj
0 Tc
ET
0.37647 0.37647 0.37647 rg
300.63 713.64 m
563.16 713.64 l
561.66 712.14 l
302.13 712.14 l
h
f
0.87843 0.87843 0.87843 rg
561.66 712.14 m
563.16 713.64 l
563.16 685.14 l
561.66 685.89 l
h
f
0.37647 0.37647 0.37647 rg
300.63 713.64 m
302.13 712.14 l
302.13 685.89 l
300.63 685.14 l
h
f
0 0 0 rg
302.13 685.89 m
561.66 685.89 l
563.16 685.14 l
300.63 685.14 l
h
f
1 1 1 rg
302.13 712.14 m
561.66 712.14 l
561.66 685.89 l
302.13 685.89 l
302.13 712.14 l
h
f
q
0 841.89 m
0 0 l
595.29 0 l
595.29 841.89 l
h
W
n
0.03 w
2 J
0 j
10 M
[]0 d
q
0 841.89 m
0 0 l
595.29 0 l
595.29 841.89 l
h
W
n
302.25 706.89 m
556.41 706.89 l
556.41 691.14 l
302.25 691.14 l
302.25 706.89 l
h
W
n
q
0 841.89 m
0 0 l
595.29 0 l
595.29 841.89 l
h
W
n
0.74987 w
2 J
0 j
10 M
[]0 d
q
302.25 706.89 m
302.25 691.14 l
556.41 691.14 l
556.41 706.89 l
h
W
n
1 1 1 rg
302.25 706.89 m
556.41 706.89 l
556.41 691.14 l
302.25 691.14 l
302.25 706.89 l
h
f
302.25 706.89 m
556.41 706.89 l
556.41 691.14 l
302.25 691.14 l
302.25 706.89 l
h
W
n
q
0 841.89 m
0 0 l
595.29 0 l
595.29 841.89 l
h
W
n
0.74987 w
2 J
0 j
10 M
[]0 d
q
302.25 706.89 m
302.25 691.14 l
556.41 691.14 l
556.41 706.89 l
h
W
n
Q
Q
Q
Q
Q
Q
0 0 0 rg
29.1 504.54 m
566.16 504.54 l
566.16 503.79 l
29.1 503.79 l
h
f
0.86667 0.86667 0.86667 rg
29.1 669.39 m
566.16 669.39 l
566.16 504.54 l
29.1 504.54 l
29.1 669.39 l
h
f
0 0 0 rg
BT
/F2 250 Tf
0.03 0 0 0.03 32.1 658.14 Tm
19.96 Tc
(TEXT)Tj
0 Tc
ET
q
0 841.89 m
0 0 l
595.29 0 l
595.29 841.89 l
h
W
n
0.03 w
2 J
0 j
10 M
[]0 d
q
0 841.89 m
0 0 l
595.29 0 l
595.29 841.89 l
h
W
n
54.6 647.46 m
61.35 647.46 l
61.35 640.71 l
54.6 640.71 l
54.6 647.46 l
h
W
n
q
0 841.89 m
0 0 l
595.29 0 l
595.29 841.89 l
h
W
n
0.75 w
2 J
0 j
10 M
[]0 d
q
54.6 647.46 m
54.6 640.71 l
61.35 640.71 l
61.35 647.46 l
h
W
n
Q
Q
Q
q
47.85 654.21 m
68.1 654.21 l
68.1 633.96 l
47.85 633.96 l
47.85 654.21 l
h
W
n
1 1 1 rg
61.35 644.08 m
61.35 642.22 59.84 640.71 57.97 640.71 c
56.11 640.71 54.6 642.22 54.6 644.08 c
54.6 645.95 56.11 647.46 57.97 647.46 c
59.84 647.46 61.35 645.95 61.35 644.08 c
h
f
Q
q
47.85 654.21 m
68.1 654.21 l
68.1 633.96 l
47.85 633.96 l
47.85 654.21 l
h
W
n
0 0 0 rg
57.97 646.71 m
59.42 646.71 60.6 645.53 60.6 644.08 c
60.6 642.64 59.42 641.46 57.97 641.46 c
56.53 641.46 55.35 642.64 55.35 644.08 c
55.35 645.53 56.53 646.71 57.97 646.71 c
h
57.97 647.46 m
56.11 647.46 54.6 645.95 54.6 644.08 c
54.6 642.22 56.11 640.71 57.97 640.71 c
59.84 640.71 61.35 642.22 61.35 644.08 c
61.35 645.95 59.84 647.46 57.97 647.46 c
h
f
Q
Q
BT
/F2 250 Tf
0.03 0 0 0.03 64.35 642.39 Tm
21.62 Tc
(TEXT)Tj
0 Tc
ET
q
0 841.89 m
0 0 l
595.29 0 l
595.29 841.89 l
h
W
n
0.03 w
2 J
0 j
10 M
[]0 d
q
0 841.89 m
0 0 l
595.29 0 l
595.29 841.89 l
h
W
n
54.6 630.39 m
61.35 630.39 l
61.35 623.64 l
54.6 623.64 l
54.6 630.39 l
h
W
n
q
0 841.89 m
0 0 l
595.29 0 l
595.29 841.89 l
h
W
n
0.75 w
2 J
0 j
10 M
[]0 d
q
54.6 630.39 m
54.6 623.64 l
61.35 623.64 l
61.35 630.39 l
h
W
n
Q
Q
Q
q
47.85 637.14 m
68.1 637.14 l
68.1 616.89 l
47.85 616.89 l
47.85 637.14 l
h
W
n
1 1 1 rg
61.35 627.01 m
61.35 625.15 59.84 623.64 57.97 623.64 c
56.11 623.64 54.6 625.15 54.6 627.01 c
54.6 628.88 56.11 630.39 57.97 630.39 c
59.84 630.39 61.35 628.88 61.35 627.01 c
h
f
Q
q
47.85 637.14 m
68.1 637.14 l
68.1 616.89 l
47.85 616.89 l
47.85 637.14 l
h
W
n
0 0 0 rg
57.97 629.64 m
59.42 629.64 60.6 628.46 60.6 627.01 c
60.6 625.57 59.42 624.39 57.97 624.39 c
56.53 624.39 55.35 625.57 55.35 627.01 c
55.35 628.46 56.53 629.64 57.97 629.64 c
h
57.97 630.39 m
56.11 630.39 54.6 628.88 54.6 627.01 c
54.6 625.15 56.11 623.64 57.97 623.64 c
59.84 623.64 61.35 625.15 61.35 627.01 c
61.35 628.88 59.84 630.39 57.97 630.39 c
h
f
59.66 627.01 m
59.66 626.08 58.91 625.33 57.97 625.33 c
57.04 625.33 56.29 626.08 56.29 627.01 c
56.29 627.95 57.04 628.7 57.97 628.7 c
58.91 628.7 59.66 627.95 59.66 627.01 c
h
f
Q
Q
BT
/F2 250 Tf
0.03 0 0 0.03 64.35 625.32 Tm
18.25 Tc
(TEXT)Tj
0 Tc
ET
q
0 841.89 m
0 0 l
595.29 0 l
595.29 841.89 l
h
W
n
0.03 w
2 J
0 j
10 M
[]0 d
q
0 841.89 m
0 0 l
595.29 0 l
595.29 841.89 l
h
W
n
65.1 610.32 m
71.85 610.32 l
71.85 603.57 l
65.1 603.57 l
65.1 610.32 l
h
W
n
q
0 841.89 m
0 0 l
595.29 0 l
595.29 841.89 l
h
W
n
0.75 w
2 J
0 j
10 M
[]0 d
q
65.1 610.32 m
65.1 603.57 l
71.85 603.57 l
71.85 610.32 l
h
W
n
Q
Q
Q
q
58.35 617.07 m
78.6 617.07 l
78.6 596.82 l
58.35 596.82 l
58.35 617.07 l
h
W
n
1 1 1 rg
71.85 606.94 m
71.85 605.08 70.34 603.57 68.47 603.57 c
66.61 603.57 65.1 605.08 65.1 606.94 c
65.1 608.81 66.61 610.32 68.47 610.32 c
70.34 610.32 71.85 608.81 71.85 606.94 c
h
f
Q
q
58.35 617.07 m
78.6 617.07 l
78.6 596.82 l
58.35 596.82 l
58.35 617.07 l
h
W
n
0 0 0 rg
68.47 609.57 m
69.92 609.57 71.1 608.39 71.1 606.94 c
71.1 605.5 69.92 604.32 68.47 604.32 c
67.03 604.32 65.85 605.5 65.85 606.94 c
65.85 608.39 67.03 609.57 68.47 609.57 c
h
68.47 610.32 m
66.61 610.32 65.1 608.81 65.1 606.94 c
65.1 605.08 66.61 603.57 68.47 603.57 c
70.34 603.57 71.85 605.08 71.85 606.94 c
71.85 608.81 70.34 610.32 68.47 610.32 c
h
f
70.16 606.94 m
70.16 606.01 69.41 605.26 68.47 605.26 c
67.54 605.26 66.79 606.01 66.79 606.94 c
66.79 607.88 67.54 608.63 68.47 608.63 c
69.41 608.63 70.16 607.88 70.16 606.94 c
h
f
Q
Q
BT
/F2 250 Tf
0.03 0 0 0.03 74.85 605.25 Tm
21.69 Tc
( TEXT)Tj
0 Tc
ET
BT
/F2 250 Tf
0.03 0 0 0.03 399.88 605.25 Tm
( )Tj
ET
q
0 841.89 m
0 0 l
595.29 0 l
595.29 841.89 l
h
W
n
0.03 w
2 J
0 j
10 M
[]0 d
q
0 841.89 m
0 0 l
595.29 0 l
595.29 841.89 l
h
W
n
65.1 593.25 m
71.85 593.25 l
71.85 586.5 l
65.1 586.5 l
65.1 593.25 l
h
W
n
q
0 841.89 m
0 0 l
595.29 0 l
595.29 841.89 l
h
W
n
0.75 w
2 J
0 j
10 M
[]0 d
q
65.1 593.25 m
65.1 586.5 l
71.85 586.5 l
71.85 593.25 l
h
W
n
Q
Q
Q
q
58.35 600 m
78.6 600 l
78.6 579.75 l
58.35 579.75 l
58.35 600 l
h
W
n
1 1 1 rg
71.85 589.87 m
71.85 588.01 70.34 586.5 68.47 586.5 c
66.61 586.5 65.1 588.01 65.1 589.87 c
65.1 591.74 66.61 593.25 68.47 593.25 c
70.34 593.25 71.85 591.74 71.85 589.87 c
h
f
Q
q
58.35 600 m
78.6 600 l
78.6 579.75 l
58.35 579.75 l
58.35 600 l
h
W
n
0 0 0 rg
68.47 592.5 m
69.92 592.5 71.1 591.32 71.1 589.87 c
71.1 588.43 69.92 587.25 68.47 587.25 c
67.03 587.25 65.85 588.43 65.85 589.87 c
65.85 591.32 67.03 592.5 68.47 592.5 c
h
68.47 593.25 m
66.61 593.25 65.1 591.74 65.1 589.87 c
65.1 588.01 66.61 586.5 68.47 586.5 c
70.34 586.5 71.85 588.01 71.85 589.87 c
71.85 591.74 70.34 593.25 68.47 593.25 c
h
f
Q
Q
BT
/F2 250 Tf
0.03 0 0 0.03 74.85 588.18 Tm
23.16 Tc
( TEXT)Tj
0 Tc
ET
BT
/F2 250 Tf
0.03 0 0 0.03 407.97 588.18 Tm
( )Tj
ET
q
0 841.89 m
0 0 l
595.29 0 l
595.29 841.89 l
h
W
n
0.03 w
2 J
0 j
10 M
[]0 d
q
0 841.89 m
0 0 l
595.29 0 l
595.29 841.89 l
h
W
n
65.1 576.18 m
71.85 576.18 l
71.85 569.43 l
65.1 569.43 l
65.1 576.18 l
h
W
n
q
0 841.89 m
0 0 l
595.29 0 l
595.29 841.89 l
h
W
n
0.75 w
2 J
0 j
10 M
[]0 d
q
65.1 576.18 m
65.1 569.43 l
71.85 569.43 l
71.85 576.18 l
h
W
n
Q
Q
Q
q
58.35 582.93 m
78.6 582.93 l
78.6 562.68 l
58.35 562.68 l
58.35 582.93 l
h
W
n
1 1 1 rg
71.85 572.8 m
71.85 570.94 70.34 569.43 68.47 569.43 c
66.61 569.43 65.1 570.94 65.1 572.8 c
65.1 574.67 66.61 576.18 68.47 576.18 c
70.34 576.18 71.85 574.67 71.85 572.8 c
h
f
Q
q
58.35 582.93 m
78.6 582.93 l
78.6 562.68 l
58.35 562.68 l
58.35 582.93 l
h
W
n
0 0 0 rg
68.47 575.43 m
69.92 575.43 71.1 574.25 71.1 572.8 c
71.1 571.36 69.92 570.18 68.47 570.18 c
67.03 570.18 65.85 571.36 65.85 572.8 c
65.85 574.25 67.03 575.43 68.47 575.43 c
h
68.47 576.18 m
66.61 576.18 65.1 574.67 65.1 572.8 c
65.1 570.94 66.61 569.43 68.47 569.43 c
70.34 569.43 71.85 570.94 71.85 572.8 c
71.85 574.67 70.34 576.18 68.47 576.18 c
h
f
Q
Q
BT
/F2 250 Tf
0.03 0 0 0.03 74.85 571.11 Tm
23.08 Tc
( TEXT )Tj
0 Tc
ET
BT
/F2 250 Tf
0.03 0 0 0.03 78 560.04 Tm
23.94 Tc
(TEXT )Tj
0 Tc
ET
BT
/F4 250 Tf
0.03 0 0 0.03 168.51 560.04 Tm
26.34 Tc
(TEXT)Tj
0 Tc
ET
BT
/F2 250 Tf
0.03 0 0 0.03 183.81 560.04 Tm
22.63 Tc
(TEXT)Tj
0 Tc
ET
BT
/F2 250 Tf
0.03 0 0 0.03 78 539.97 Tm
20.99 Tc
(TEXT)Tj
0 Tc
ET
0.37647 0.37647 0.37647 rg
111.57 558.54 m
179.94 558.54 l
178.44 557.04 l
113.07 557.04 l
h
f
0.87843 0.87843 0.87843 rg
178.44 557.04 m
179.94 558.54 l
179.94 530.04 l
178.44 530.79 l
h
f
0.37647 0.37647 0.37647 rg
111.57 558.54 m
113.07 557.04 l
113.07 530.79 l
111.57 530.04 l
h
f
0 0 0 rg
113.07 530.79 m
178.44 530.79 l
179.94 530.04 l
111.57 530.04 l
h
f
1 1 1 rg
113.07 557.04 m
178.44 557.04 l
178.44 530.79 l
113.07 530.79 l
113.07 557.04 l
h
f
q
0 841.89 m
0 0 l
595.29 0 l
595.29 841.89 l
h
W
n
0.03 w
2 J
0 j
10 M
[]0 d
q
0 841.89 m
0 0 l
595.29 0 l
595.29 841.89 l
h
W
n
113.19 551.79 m
173.19 551.79 l
173.19 536.04 l
113.19 536.04 l
113.19 551.79 l
h
W
n
q
0 841.89 m
0 0 l
595.29 0 l
595.29 841.89 l
h
W
n
0.75 w
2 J
0 j
10 M
[]0 d
q
113.19 551.79 m
113.19 536.04 l
173.19 536.04 l
173.19 551.79 l
h
W
n
1 1 1 rg
113.19 551.79 m
173.19 551.79 l
173.19 536.04 l
113.19 536.04 l
113.19 551.79 l
h
f
113.19 551.79 m
173.19 551.79 l
173.19 536.04 l
113.19 536.04 l
113.19 551.79 l
h
W
n
q
0 841.89 m
0 0 l
595.29 0 l
595.29 841.89 l
h
W
n
0.75 w
2 J
0 j
10 M
[]0 d
q
113.19 551.79 m
113.19 536.04 l
173.19 536.04 l
173.19 551.79 l
h
W
n
Q
Q
Q
Q
Q
Q
0 0 0 rg
BT
/F2 250 Tf
0.03 0 0 0.03 179.94 539.97 Tm
(TEXT)Tj
ET
BT
/F2 250 Tf
0.03 0 0 0.03 197.04 539.97 Tm
20.99 Tc
(TEXT)Tj
0 Tc
ET
0.37647 0.37647 0.37647 rg
230.61 558.54 m
298.98 558.54 l
297.48 557.04 l
232.11 557.04 l
h
f
0.87843 0.87843 0.87843 rg
297.48 557.04 m
298.98 558.54 l
298.98 530.04 l
297.48 530.79 l
h
f
0.37647 0.37647 0.37647 rg
230.61 558.54 m
232.11 557.04 l
232.11 530.79 l
230.61 530.04 l
h
f
0 0 0 rg
232.11 530.79 m
297.48 530.79 l
298.98 530.04 l
230.61 530.04 l
h
f
<snip!>
I figured this out, at least for the documents I'm dealing with. This is not a generic solution that would work with all sorts of pdf documents. In my case, I was dealing a software-generated pdf, which always produced the same 'graphic paths' for checkboxes and radio buttons. Thus, I was able to use some regexes on each page's content:
private string GetPageContent(PdfReader pdfReader, int page)
{
StringBuilder sb = new StringBuilder();
// from http://www.java2s.com/Open-Source/CSharp/PDF/iTextSharp/iTextSharp/text/pdf/parser/PdfContentReaderTool.cs.htm
RandomAccessFileOrArray f = pdfReader.SafeFile;
byte[] contentBytes = pdfReader.GetPageContent(page, f);
f.Close();
foreach (byte b in contentBytes)
sb.Append((char)b);
return sb.ToString();
}
For example, an unchecked radio button always looked like this:
1 1 1 rg
61.35 644.08 m
61.35 642.22 59.84 640.71 57.97 640.71 c
56.11 640.71 54.6 642.22 54.6 644.08 c
54.6 645.95 56.11 647.46 57.97 647.46 c
59.84 647.46 61.35 645.95 61.35 644.08 c
h
f
Q
q
47.85 654.21 m
68.1 654.21 l
68.1 633.96 l
47.85 633.96 l
47.85 654.21 l
h
W
n
0 0 0 rg
57.97 646.71 m
59.42 646.71 60.6 645.53 60.6 644.08 c
60.6 642.64 59.42 641.46 57.97 641.46 c
56.53 641.46 55.35 642.64 55.35 644.08 c
55.35 645.53 56.53 646.71 57.97 646.71 c
h
57.97 647.46 m
56.11 647.46 54.6 645.95 54.6 644.08 c
54.6 642.22 56.11 640.71 57.97 640.71 c
59.84 640.71 61.35 642.22 61.35 644.08 c
61.35 645.95 59.84 647.46 57.97 647.46 c
h
f
3 concentric circles, while a checked radio button always had 4 concentric circles. The annotation always followed the concentric circles. Similarly for checkboxes.