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
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
[166x5]
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. :)
(otoh, we're not using metafont, so TeX is still going to look better 
in most cases.)
Robert
4-Aug-2006
[171]
I'm going to add a MDP emitter as well :-)) Looks very good!!
Henrik
5-Aug-2006
[172]
this question might not entirely be related to PDF Maker, but I had 
an idea of using Pages for MacOSX to create pretty PDF documents 
with areas where text can be put in by a separate program and then 
create a new PDF (not X-Forms) for printing. This would require the 
ability to search/replace text in PDFs. Is this possible with compressed 
PDFs?
Gabriele
5-Aug-2006
[173]
you have to parse it out and rebuild it. (or at least recreate some 
objects and append them as a change, but then you have both the original 
and the new version in the file)
Henrik
5-Aug-2006
[174]
no easy task it seems...
Gabriele
11-Aug-2006
[175x3]
just typeset the first paragraph with the total-fit algo and actual 
font metrics. now i just add some page breaking (first fit), add 
the pdf file output from previous version, and i've got an alpha 
to test. :) (i'll be on vacation next week so this probably means 
the alpha will be available after that)
if you want to play (at your own risk! it still does nothing useful), 
http://www.colellachiara.com/soft/PDFM2/
(note, i'll be doing more changes during the afternoon)
Pekr
11-Aug-2006
[178]
there is so many MLs around, that one starts to lose himself in the 
current situation :-)
Gabriele
11-Aug-2006
[179]
the pdf maker is not a markup language :) it's a (rather low level) 
dialect. you generally want to hook up higher level mls to it (like 
makedoc and qml)
Pekr
11-Aug-2006
[180]
what is wetan then (or what was the name)? :-)
Gabriele
11-Aug-2006
[181]
wetan is an emitter for makedoc. so the ml is still makedoc basically 
:)
Gabriele
24-Aug-2006
[182]
first results of the typesetter: http://www.colellachiara.com/soft/PDFM2/test.pdf
Volker
24-Aug-2006
[183]
Looks good.
Anton
24-Aug-2006
[184]
Yep, looks good.
Henrik
24-Aug-2006
[185]
I don't have anything to say, so I'm just going to agree with Volker 
and Anton :-)
Pekr
25-Aug-2006
[186]
hmm, looked at PDF, what is special about two columns output? :-) 
Disclaimer - I know completly nothing about what typesetting is, 
so bear with me please :-)