[REBOL] PDF maker questions
From: kpeters:otaksoft at: 7-Aug-2007 19:12
PDF maker's docs state that an offset can be added - I have added it as I understand
it.
Not only does it not work this way - the entire PDF built is now empty.
It seems to me that PDF maker generates empty PDFs at best as soon as it runs into
problems.
Questions I have:
1) Is that a valid assessment?
2) How then do I specify an offset properly?
3) Is there a way to make PDF maker verbose with regards to parsing problems?
4) The code below produces a PDF with one line only (the first one). What am I doing
wrong here?
TIA,
Kai
build-page: func[ record [block!]][
[ ; page must be a block
page size 216 279 offset 10 10
textbox [
LEFT ALIGN
"Staff member: #" (record/r_staffid) (record/r_staffname) newline
"Client: #" (record/r_clid) (record/r_clname) newline
]
]
]
print-screenshot: [
ss-record: compose [
r_clid (sf-clientid/text)
r_clname (sf-clientname/text)
r_staffid (staffnumber/text)
r_staffname (staffname/text)
]
document: make block! 1
page: compose/deep build-page ss-record
append/only document page
probe document
write/binary %TimesheetScreenshot.pdf layout-pdf document
]