PDF maker questions
[1/4] 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
]
[2/4] from: santilli:gabriele::gmail at: 8-Aug-2007 9:14
2007/8/8, Kai Peters <kpeters-otaksoft.com>:
> 1) Is that a valid assessment?
It seems correct. There may be a bug.
> 3) Is there a way to make PDF maker verbose with regards to parsing
> problems?
Use v2.
Regards,
Gabriele.
[3/4] from: kpeters:otaksoft at: 8-Aug-2007 23:21
Hmm - be careful what you wish for :)
V2:
All I did was:
textbox [
left align
"Staff member: #" (record/r_staffid) (record/r_staffname) newline
"Client: #" (record/r_clid) (record/r_clname) newline
The PDF looks good (& as expected), yet:
Warning: line/column above tolerance (ratio: 7.0305308934338 , tolerance: 2.52 ).
Line "Client: #8000Willie Nelson"
Warning: line/column above tolerance (ratio: 6.62989670573424 , tolerance: 2.52 ).
Line "Staff member: #999Kai Peters"
What is it so verbose about?
Kai
On Wed, 8 Aug 2007 09:14:50 +0200, Gabriele Santilli wrote:
[4/4] from: santilli::gabriele::gmail::com at: 9-Aug-2007 10:36
2007/8/9, Kai Peters <kpeters-otaksoft.com>:
> Hmm - be careful what you wish for :)
Well... what i meant is that v2 has error reporting. But, v2 has not
been tested much, and I still consider it "alpha" in many ways.
> What is it so verbose about?
1) because there's no way yet to turn off those messages 2) because
those messages mean that the typesetter was not able to find a good
way to typeset you text. (What "good" means is defined by you, but the
default is ok most of the times.)
Keep in mind, that there are differences in the dialect between v1 and
v2. In particular, you don't need COMPOSE with v2 because it will
evaluate your code automatically. Also, the typesetting is completely
different, v2 is based on the TeX engine.
HTH,
Gabriele.