pdf:paintingapage
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
pdf:paintingapage [2015/04/02 14:48] – [Comments] christian | pdf:paintingapage [2016/02/24 17:49] (current) – [Hello World - How text gets onto a page] christian | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== How does text get onto a PDF page ====== | + | ====== |
A PDF page has a content stream (**''/ | A PDF page has a content stream (**''/ | ||
Line 25: | Line 25: | ||
To achieve this in Smalltalk you can write the following: | To achieve this in Smalltalk you can write the following: | ||
<code smalltalk> | <code smalltalk> | ||
- | page := Page newInBounds: | + | page := Page newInBounds: |
renderer fillColor: CmykColor black. | renderer fillColor: CmykColor black. | ||
renderer textObjectDo: | renderer textObjectDo: | ||
Line 32: | Line 32: | ||
renderer showString: 'Hello World' | renderer showString: 'Hello World' | ||
</ | </ | ||
+ | {{demo01_HelloWorld.pdf}} See the class method '' | ||
+ | |||
You notice that I did not use the font ID **''/ | You notice that I did not use the font ID **''/ | ||
/var/www/virtual/code4hl/html/dokuwiki/data/attic/pdf/paintingapage.1427978919.txt.gz · Last modified: 2015/04/02 14:48 by christian