7. Mark’s Bio
Working with Java and PDF since 1997
Founded IDRsolutions 1999
Thursday, 29 March 12
8. Mark’s Bio
Working with Java and PDF since 1997
Founded IDRsolutions 1999
Speaker at Seybold, Javaone, Business of Software
Thursday, 29 March 12
9. Mark’s Bio
Working with Java and PDF since 1997
Founded IDRsolutions 1999
Speaker at Seybold, Javaone, Business of Software
Thursday, 29 March 12
10. Mark’s Bio
Working with Java and PDF since 1997
Founded IDRsolutions 1999
Speaker at Seybold, Javaone, Business of Software
MA degree in Mediaeval History from St Andrews (how useless
is that)
Thursday, 29 March 12
11. Mark’s Bio
Working with Java and PDF since 1997
Founded IDRsolutions 1999
Speaker at Seybold, Javaone, Business of Software
MA degree in Mediaeval History from St Andrews (how useless
is that)
Ask me about Java, PDF, business or anything which happened before 1500 AD
Thursday, 29 March 12
12. BUT FIRST SOME KITTENS...
The support team at IDRsolutions are waiting for your call (maybe)
Thursday, 29 March 12
14. Loading page 1124 of a file
Word
Read pages 1-1123 (time passes - scroll bar shrinks)
Found it (eventually)
Thursday, 29 March 12
15. Loading page 1124 of a file
Word
Read pages 1-1123 (time passes - scroll bar shrinks)
Found it (eventually)
PDF
Read the metadata refs table(s) - where do I find all the objects
Skip to page 1124
Thursday, 29 March 12
16. Loading page 1124 of a file
Word
Read pages 1-1123 (time passes - scroll bar shrinks)
Found it (eventually)
PDF
Read the metadata refs table(s) - where do I find all the objects
Skip to page 1124
PDF (in detail)
Read the refs table(s) - where do I find all the objects
Read the Root object - points to the Pages object
Read object for page 1124 (tells me the linked font, image,
content objects)
Draw it
Thursday, 29 March 12
17. Your PDF file is a Tree
A root linked to all the branches
Thursday, 29 March 12
31. Key takeaways from the PDF structure
We do not need to load the whole file
Thursday, 29 March 12
32. Key takeaways from the PDF structure
We do not need to load the whole file
It is equally fast to load any part of it
Thursday, 29 March 12
33. Key takeaways from the PDF structure
We do not need to load the whole file
It is equally fast to load any part of it
It is very easy to replace objects with new versions
Thursday, 29 March 12
34. Key takeaways from the PDF structure
We do not need to load the whole file
It is equally fast to load any part of it
It is very easy to replace objects with new versions
There are certain key locations - like at the end of a file
Thursday, 29 March 12
35. Key takeaways from the PDF structure
We do not need to load the whole file
It is equally fast to load any part of it
It is very easy to replace objects with new versions
There are certain key locations - like at the end of a file
You should not edit it in a text editor
Thursday, 29 March 12
36. Key takeaways from the PDF structure
We do not need to load the whole file
It is equally fast to load any part of it
It is very easy to replace objects with new versions
There are certain key locations - like at the end of a file
You should not edit it in a text editor
If you want to use PDF files across the Internet, there is a
special mode to make these load the most important parts
first.
Thursday, 29 March 12
37. Key takeaways from the PDF structure
We do not need to load the whole file
It is equally fast to load any part of it
It is very easy to replace objects with new versions
There are certain key locations - like at the end of a file
You should not edit it in a text editor
If you want to use PDF files across the Internet, there is a
special mode to make these load the most important parts
first.
Lots of features need you to setup the PDF file correctly.
Thursday, 29 March 12
38. Those PDF objects in more detail
All PDF objects have:1. An ID number
2. (Optional) A set of dictionary key pairs
3. (Optional) A block of binary data.
Thursday, 29 March 12
39. Those PDF objects in more detail
All PDF objects have:1. An ID number
2. (Optional) A set of dictionary key pairs
3. (Optional) A block of binary data.
Thursday, 29 March 12
40. PDF images are not Tiff, Png or JPeg
Thursday, 29 March 12
41. PDF images are not Tiff, Png or JPeg
Thursday, 29 March 12
46. PDF pages are ‘drawn’
0 0 0 1k set cmyk color of text to black
Thursday, 29 March 12
47. PDF pages are ‘drawn’
0 0 0 1k set cmyk color of text to black
BT start of some text
Thursday, 29 March 12
48. PDF pages are ‘drawn’
0 0 0 1k set cmyk color of text to black
BT start of some text
/T1_01Tf Use the font defined as T1_0 elsewhere
Thursday, 29 March 12
49. PDF pages are ‘drawn’
0 0 0 1k set cmyk color of text to black
BT start of some text
/T1_01Tf Use the font defined as T1_0 elsewhere
0 Tc 0 Tw 0 Ts 100 Tz 0 Tr set other text properties
Thursday, 29 March 12
50. PDF pages are ‘drawn’
0 0 0 1k set cmyk color of text to black
BT start of some text
/T1_01Tf Use the font defined as T1_0 elsewhere
0 Tc 0 Tw 0 Ts 100 Tz 0 Tr set other text properties
7.5003 0 0 7.5003 272.1643 540.2979 Tm position onscreen
Thursday, 29 March 12
51. PDF pages are ‘drawn’
0 0 0 1k set cmyk color of text to black
BT start of some text
/T1_01Tf Use the font defined as T1_0 elsewhere
0 Tc 0 Tw 0 Ts 100 Tz 0 Tr set other text properties
7.5003 0 0 7.5003 272.1643 540.2979 Tm position onscreen
(L*) Tj draw the text L*
Thursday, 29 March 12
52. PDF pages are ‘drawn’
0 0 0 1k set cmyk color of text to black
BT start of some text
/T1_01Tf Use the font defined as T1_0 elsewhere
0 Tc 0 Tw 0 Ts 100 Tz 0 Tr set other text properties
7.5003 0 0 7.5003 272.1643 540.2979 Tm position onscreen
(L*) Tj draw the text L*
/T1_1 1Tf change font
Thursday, 29 March 12
53. PDF pages are ‘drawn’
0 0 0 1k set cmyk color of text to black
BT start of some text
/T1_01Tf Use the font defined as T1_0 elsewhere
0 Tc 0 Tw 0 Ts 100 Tz 0 Tr set other text properties
7.5003 0 0 7.5003 272.1643 540.2979 Tm position onscreen
(L*) Tj draw the text L*
/T1_1 1Tf change font
0.856 0 Td move to a different location onscreen
Thursday, 29 March 12
54. PDF pages are ‘drawn’
0 0 0 1k set cmyk color of text to black
BT start of some text
/T1_01Tf Use the font defined as T1_0 elsewhere
0 Tc 0 Tw 0 Ts 100 Tz 0 Tr set other text properties
7.5003 0 0 7.5003 272.1643 540.2979 Tm position onscreen
(L*) Tj draw the text L*
/T1_1 1Tf change font
0.856 0 Td move to a different location onscreen
( = 100) Tj draw the text = 100
Thursday, 29 March 12
55. PDF pages are ‘drawn’
0 0 0 1k set cmyk color of text to black
BT start of some text
/T1_01Tf Use the font defined as T1_0 elsewhere
0 Tc 0 Tw 0 Ts 100 Tz 0 Tr set other text properties
7.5003 0 0 7.5003 272.1643 540.2979 Tm position onscreen
(L*) Tj draw the text L*
/T1_1 1Tf change font
0.856 0 Td move to a different location onscreen
( = 100) Tj draw the text = 100
-0.324 -1.133Td move to a different location onscreen
Thursday, 29 March 12
56. PDF pages are ‘drawn’
0 0 0 1k set cmyk color of text to black
BT start of some text
/T1_01Tf Use the font defined as T1_0 elsewhere
0 Tc 0 Tw 0 Ts 100 Tz 0 Tr set other text properties
7.5003 0 0 7.5003 272.1643 540.2979 Tm position onscreen
(L*) Tj draw the text L*
/T1_1 1Tf change font
0.856 0 Td move to a different location onscreen
( = 100) Tj draw the text = 100
-0.324 -1.133Td move to a different location onscreen
[(whit)6(e)] Tj draw the text white (put a gap between t and e)
Thursday, 29 March 12