r3wp [groups: 83 posts: 189283]
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

World: r3wp

[PDF-Maker] discuss Gabriele's pdf-maker

Gabriele
5-Apr-2006
[120x2]
for the typesetter, the one i'm designing for pdf maker 2 could be 
easily reused (based on TeX, and i will write it as a RLP so you'll 
have full docs)
james, i'm glad it's useful :)
Henrik
5-Apr-2006
[122x3]
it is indeed very useful
but it would be even more useful if we could emit postscript directly 
from code.
would you mind if I made a group that would focus on the challenges 
in such an effort?
Joe
1-Jun-2006
[125x2]
I have to design a complex form with lots of boxes and text. Is there 
a dialect to define that ? thxs
Gabriele, will you have a pdf-maker 2 alpha ?
Gabriele
2-Jun-2006
[127x2]
Joe: I have no ETA yet.
btw, I just fixed a bug with the View 1.3 version of the pdf-maker 
and images.
Joe
2-Jun-2006
[129]
thanks. Gabriele, you specify A4 with as 211mm but it is 210mm http://www.cl.cam.ac.uk/~mgk25/iso-paper.html
Gabriele
3-Jun-2006
[130]
i got the number somewhere - i don't remember where, though. maybe 
they where converting back from inches and so had an error?
Anton
4-Jun-2006
[131]
The reason for magic numbers must be written down, even if it's just 
; I'm not sure about this number
PeterWood
4-Jun-2006
[132]
The reason is in the document of which Joe gave the URL two messages 
ago. It's all to do with the square root of 2.
Gabriele
5-Jun-2006
[133]
tolerance seems to be +/- 2mm, so 211 is still acceptable. i'll fix 
it in the future though.
Joe
7-Jun-2006
[134x2]
I just printed a PDF doc and it shows 3 different measures: 1) the 
preview window shows 210,02 x 297,01 2) Document: 211,0 x296,7 and 
3) Paper: 209,9x296,7 Weird!
So maybe PDF uses 211 for the doc but assumes the paper is 210 ?
Janeks
29-Jul-2006
[136]
Why I am getting this error?
>> do %pdf-maker.r
Script: "PDF Maker" (2-Jun-2006)
>> layout-pdf [[textbox ["This is some text."]]]
** Script Error: Cannot use add on none! value
** Where: make-pages
** Near: pid: (2 * length? pages) + i
foreach
>>
Gabriele
30-Jul-2006
[137x2]
hmm, anything unusual in your user.r file?
also, what version of REBOL?
Janeks
31-Jul-2006
[139]
REBOL/View 1.3.50.3.1 14-Oct-2005 Core 2.7.0
Copyright 2000-2005 REBOL Technologies.  All rights reserved.
REBOL is a trademark of REBOL Technologies. WWW.REBOL.COM
>> change-dir winpath-to-file "C:\rebol\scripts\pdf_maker"
== %/C/rebol/scripts/pdf_maker/
>> do %pdf-maker.r
>> myLayPdf: layout-pdf [[textbox ["This is some text."]]]
** Script Error: Cannot use add on none! value
** Where: make-pages
** Near: pid: (2 * length? pages) + i
foreach
>>
Gabriele
1-Aug-2006
[140]
any reason why you are using 1.3.50? also, that winpath-to-file shows 
you do have something in user.r ;) anything you may be accidentally 
overwriting? (btw, rebol has TO-REBOL-FILE as native, so no reason 
to define your own)
Janeks
2-Aug-2006
[141]
There was a reason - already forgot it.

The only thing in user.r was the function above (except set-net) 
- and I removed it ;-)
But:
REBOL/View 1.3.2.3.1 5-Dec-2005 Core 2.6.3
Copyright 2000-2005 REBOL Technologies.  All rights reserved.
REBOL is a trademark of REBOL Technologies. WWW.REBOL.COM
>> change-dir to-rebol-file "C:\rebol\scripts\pdf_maker"
== %/C/rebol/scripts/pdf_maker/
>> do %pdf-maker.r
>> myLayPdf: layout-pdf [[textbox ["This is some text."]]]
** Script Error: Cannot use add on none! value
** Where: make-pages
** Near: pid: (2 * length? pages) + i


Could it be connected with that I am starting rebol with view.exe 
-i ?
Graham
2-Aug-2006
[142x2]
>> do %pdf-maker.r
Script: "PDF Maker" (11-Aug-2005)
>> myLayPdf: layout-pdf [[textbox ["This is some text."]]]
== #{
255044462D312E330A342030206F626A0A3C3C202F54797065202F466F6E7420
2F53756274797065202F5479706531202F42617365466F6E74202F48656C...
>>
perhaps your version of pdf-maker.r is corrupted?
BrianH
2-Aug-2006
[144]
Janeks, the only reason to use 1.3.50 is if you have rebcode that 
hasn't been converted to the new naming convention.
Gabriele
3-Aug-2006
[145x6]
seems very strange to me, the pdf maker should not worry about -i 
(doesn't touch view-root etc.)
as graham suggests, try redownloading it just to be sure.
it's also possible that the 2-jun-2006 version has a bug; it was 
released to fix a bug with images, and it's not to exclude that it 
introduced another bug, although i haven't got any reports about 
it.
ah, confirmed it was a bug. i just fixed it and uploaded a new version.
Everyone using the PDF Maker on View 1.3 should update to this version, 
as previous ones contained bugs.
if you are using it on 1.2, please continue using the old version 
(from 2003 or so).
Janeks
3-Aug-2006
[151]
What about unicode in pdf?
Gabriele
4-Aug-2006
[152x2]
my plan is to eventually have that in version 2 (a first release 
of version 2 is due in a couple weeks). however, note that while 
the pdf format directly supports latin1 encoding, it does not support 
unicode encodings directly. so it's a pain to make it work. openoffice, 
for example, creates divides the characters you use in the document 
in groups of 256, then creates a new custom font for each group. 
(i also assume that the 14 standard fonts do not support unicode, 
so you need custom font support to be able to use unicode.)
please blame adobe for this. :)
Graham
4-Aug-2006
[154x2]
Are you able to give us a preview of the capabilities of version 
2?
Will things like footers, and page numbering be there?  Automatic 
text flow?
Henrik
4-Aug-2006
[156]
I would want those things as a layer above pdf maker
Gabriele
4-Aug-2006
[157x5]
eventually version 2 will do whatever TeX can do minus math.
I already have the total-fit line breaking algorithm working (in 
the basic version).
(for those interested: http://www.colellachiara.com/soft/PDFM2/typesetter.html
however I suggest you waiting for when the docs are finished)
Henrik: that can't be done, you need low level font access for text 
flow. and you can't do footers or text flow without that.
i meant footers or automatic page splitting.
james_nak
4-Aug-2006
[162]
Hey, how about that MakeDoc? Gabriel, your typesetter page looks 
great.
Henrik
4-Aug-2006
[163]
gabriele, I was more thinking about general page layout, not the 
lower level text flow functions, so you  can decide a general template 
for your pages on your own.
Gabriele
4-Aug-2006
[164]
of course, you decide the layout. you can make text go from one textbox 
to another and so on. you can place the textboxes anywhere.
Henrik
4-Aug-2006
[165]
that's what I would like to see pre-prepared on a higher level
Gabriele
4-Aug-2006
[166x4]
i.e. it's much more flexible than TeX actually, however there are 
a number of drawbacks; you can't apply a fit algorithm to pages (boxes 
in this case) if they are not all the same width.
if they are all the same width, though, it's possible to use the 
total-fit algo on page splitting too, meaning we get something much 
better than TeX.
higher level: well, the first application of the pdfm2 will be a 
qml emitter, and i guess the second will be a md3 emitter.
so you can create books or magazines with just makedoc or qml. :)