This shows you the differences between two versions of the page.
Both sides previous revision
Previous revision
|
Last revision
Both sides next revision
|
paintingapage [2016/09/24 08:17] dokuadmin ↷ Page moved from pdf:paintingapage to paintingapage |
paintingapage [2016/09/24 08:17] dokuadmin ↷ Links adapted because of a move operation |
renderer showString: 'Hello World']]. | renderer showString: 'Hello World']]. |
</code> | </code> |
{{demo01_HelloWorld.pdf}} See the class method ''demo01_HelloWorld'' in class ''Document''. | {{pdf:demo01_helloworld.pdf}} See the class method ''demo01_HelloWorld'' in class ''Document''. |
| |
You notice that I did not use the font ID **''/F1''** but the font directly (referenced as the global #Helvetica). ''renderer **setFont:**'' takes care of that and puts the font into the resources and assigns it to an internal name which is used in the content stream. This mechanism works for all resource types so that the programmer can always use the appropriate object directly and never needs to care about the internal IDs. | You notice that I did not use the font ID **''/F1''** but the font directly (referenced as the global #Helvetica). ''renderer **setFont:**'' takes care of that and puts the font into the resources and assigns it to an internal name which is used in the content stream. This mechanism works for all resource types so that the programmer can always use the appropriate object directly and never needs to care about the internal IDs. |
to get the simple string ''10 5 Td''? | to get the simple string ''10 5 Td''? |
| |
Firstly, I wanted operators as objects and not just as strings you write into the contents stream. The objects can be read from a PDF (try: from the [[PDFExplorer]] inspect a **''/Contents''** object and send it ''#operations'') and the list of operator you create can be written to a PDF. There are some things a program could do with operators: | Firstly, I wanted operators as objects and not just as strings you write into the contents stream. The objects can be read from a PDF (try: from the [[pdf:pdfexplorer]] inspect a **''/Contents''** object and send it ''#operations'') and the list of operator you create can be written to a PDF. There are some things a program could do with operators: |
| |
* check the consistency/validity. F.ex. **''BeginText (BT)''** must be written before **''EndText (ET)''** and must enclose certain text operators; they cannot be nested etc. etc. | * check the consistency/validity. F.ex. **''BeginText (BT)''** must be written before **''EndText (ET)''** and must enclose certain text operators; they cannot be nested etc. etc. |