diff --git a/pdf/css/remark.css b/pdf/css/remark.css index 26103fd18845e22a47da32e429390cf8b3b87761..b0cbe369c67f8649d4d39e2fadc6ed71c2ef0c77 100644 --- a/pdf/css/remark.css +++ b/pdf/css/remark.css @@ -39,4 +39,9 @@ table thead th { .space-3 { margin-top: 5em +} + +.full-width-pre > pre { + margin-left: -4em; + margin-right: -4em; } \ No newline at end of file diff --git a/pdf/illustrations.bmpr b/pdf/illustrations.bmpr new file mode 100644 index 0000000000000000000000000000000000000000..1745fb6aab88210db30ec95f4e897449f9105041 Binary files /dev/null and b/pdf/illustrations.bmpr differ diff --git a/pdf/images/image.png b/pdf/images/image.png new file mode 100644 index 0000000000000000000000000000000000000000..33af978ca22aa14c8be119e1a92c7c12cb0bf764 Binary files /dev/null and b/pdf/images/image.png differ diff --git a/pdf/images/rectangle.png b/pdf/images/rectangle.png new file mode 100644 index 0000000000000000000000000000000000000000..50a627f27f2eb2ece1f1e29f8b9e961fcdf653c6 Binary files /dev/null and b/pdf/images/rectangle.png differ diff --git a/pdf/images/sizing.png b/pdf/images/sizing.png new file mode 100644 index 0000000000000000000000000000000000000000..52fc954d9c900f5d987e9d9888fb6a90437b1edc Binary files /dev/null and b/pdf/images/sizing.png differ diff --git a/pdf/pdf.html b/pdf/pdf.html index 590d013198aa7619394fa1a9adbda2dc9d007c13..a26e4857741889a52cd21caa2c348f58eb5148a9 100644 --- a/pdf/pdf.html +++ b/pdf/pdf.html @@ -37,7 +37,7 @@ showpage % Show page Primarily used for vector graphics, but also turing-complete stack-oriented programming language. -What the printer sees! Interopability. +What the printer sees! --- @@ -110,7 +110,7 @@ PDF/A Subversions: Single purpose, which is archived: **It displays content equally on all devices.** -<div class="space-3"></div> +<img src="images/sizing.png" width="60%"> Comarison: How webpages deal with different devices: - Adapt font size, colors, spacing, ... to screen size @@ -146,6 +146,14 @@ Out of these tokens, the higher-level objects are composed - Dictionaries - Streams +```html +<</Type /Catalog /Pages 2 0 R>> + +stream +BT 1 0 0 1 22 20 cm 1 w /F 12 Tf 14.4 TL (Hello world)Tj ET +endstream +``` + --- # Structure (1/2) @@ -192,6 +200,8 @@ startxref --- +class: full-width-pre + # Body ```html @@ -229,16 +239,19 @@ BT 1 0 0 1 22 20 cm 1 w /F 12 Tf 14.4 TL (Hello world)Tj ET endstream ``` -Drawing (`RG` = line color, `rg` = background color, `re` = rectangle, `b` = painting mode) +Drawing (`rg` = background color, `re` = rectangle, `b` = painting mode) ```html stream -1 0 0 1 40 20 cm 0.5 w 0.68 0.98 0.94 RG 0.67 0.8 0.73 rg 0 0 20 30 re b +1 0 0 1 40 20 cm 0.5 w 0.67 0.8 0.73 rg 0 0 20 30 re b endstream ``` +<img src="images/rectangle.png" width="20%"> + + --- -# Image +# Include Image Stream with binary image data @@ -253,7 +266,22 @@ endstream endobj ``` -Print image (`Do` = print referenced image) +<img src="images/image.png" width="20%"> + +--- + +# Print image + +Declare image alias (for `4 0 R` referenced as `Resources` in ` Page`): +```html +4 0 obj +<</XObject <</I 5 0 R>> /ProcSet [/PDF /ImageC]>> +endobj +5 0 obj +(image stream) +``` + +Print image (`Do` = print referenced image): ```html 6 0 obj <</Length 28>> @@ -265,6 +293,14 @@ endobj --- +class: center, middle + +# Enough foreplay: Render text! + +<i>Or: What is the most complicated approach to "support" unicode?</i> + +--- + # Supporting unicode `WinAnsiEncoding` is a single byte encoding; so are the other default encodings. @@ -272,7 +308,7 @@ endobj What if I need a character not contained in these standard encodings (like chinese characters)? Steps: -- Embedd font which supports character as stream +- Embed font which supports character as stream - Declare encoding of text (PDF) onto glyphs (font) - Declare meta data (widths of characters, ...) @@ -280,8 +316,14 @@ Steps: --- +class: center, middle + # The TTF format +--- + + + </textarea>