REBOL

REBOL3 - PDF-Maker (discuss Gabriele's pdf-maker [web-public])

Return to Index Page
Most recent messages (300 max) are listed first.

#UserMessageDate
796GrahamPDF documentation a la Leonardo ?26-Aug-10 9:55
795Gabrieleah, that's an interesting idea to try...26-Aug-10 9:54
794GrahamAt least you don't use mirror writing26-Aug-10 9:54
793Grahamwe don't ... you said you couldn't .. hence the questions :)26-Aug-10 9:53
792Gabriele(but more importantly... why do you guys always expect me to do all the work? :P )26-Aug-10 9:53
791Grahamtext and bezier curves :)26-Aug-10 9:50
790Gabrielewell... the "tutorial" for v1 mostly works for v2 as well, as it only covers very basic functionality.26-Aug-10 9:47
789Grahama lot of people managed to use V1 .. I've never seen anyone use V226-Aug-10 9:46
788GabrieleI think the main reason is that v2 was never really "finished" and published as such. it's missing many little things (though, it should do all that v1 does and more... it is slower though as it's missing optimization and the ability to turn off the TeX engine when you don't need it)26-Aug-10 9:46
787GrahamHmm... quantively or qualitatively?26-Aug-10 9:46
786Gabrielev1 had much less docs than v2 :-)26-Aug-10 9:45
785GrahamI should have a layout-pdf2 .... so I can use both26-Aug-10 9:36
784GrahamI'd suggest that perhaps this is because you never managed to write the user documentation!26-Aug-10 9:33
783Grahamso Cheyenne already had v1 loaded and didn't load v2 for me !26-Aug-10 9:32
782Gabrielev1 is very stable, v2 has never been exstensively tested. so it's not a easy choice i guess :)26-Aug-10 9:32
781GrahamI have this ...

if not value? 'layout-pdf [ *do %pdf-maker.r ]

26-Aug-10 9:31
780Grahamah... I've been using V126-Aug-10 9:31
779Gabrielev1 also does not evaluate arguments to dialect commands so you have to use compose etc.26-Aug-10 9:30
778Gabrieleno. v1 does not flow text automatically across pages, does not allow putting graphics within text, does not have the TeX engine, and so on.26-Aug-10 9:30
777Grahamso I got the silent fail26-Aug-10 9:30
776Grahamso this syntax doesn't work with pdf maker 1 ?26-Aug-10 9:29
775GabrieleThat puts the image inside the text correctly. v2 should also give you an error when the dialect is wrong, while v1 did just fail silently.26-Aug-10 9:29
774Gabrieleb: layout-pdf [[textbox ["Image: " box 60 60 10 [image xbl ybl 40 40 load http://www.rebol.com/graphics/reb-logo.gif] " inside text"]]]26-Aug-10 9:28
773Grahamgot the image.26-Aug-10 9:27
772GrahamOk, got it26-Aug-10 9:27
771Gabrielev2 was done between 8-Aug-2006 and 17-Nov-200626-Aug-10 9:26
770Gabrielehttp://www.colellachiara.com/soft/PDFM2/pdf-maker.html

Gabriele Santilli <giesse@rebol.it> 17-Nov-2006, 2.34.0

26-Aug-10 9:25
769Grahamis that pdf-maker1 or 2 ?26-Aug-10 9:25
768GrahamCopyright (c) 2001-2005, Gabriele Santilli26-Aug-10 9:25
767Gabrieleyou get xbl (X Bottom Left), ybl, xtr, ytr bound within the graphic block26-Aug-10 9:24
766Gabrieleright... i don't do a coordinate transformation, that's the reason for xbl and ybl in the above snippet26-Aug-10 9:24
765GrahamInteresting .. I get nothing26-Aug-10 9:23
764Gabrielethe image comes at the bottom though, which does not look correct, so I'm probably forgetting something...26-Aug-10 9:22
763Gabrielethis works for me:

b: layout-pdf [[textbox [box 60 60 10 [image 0 0 40 40 load http://www.rebol.com/graphics/reb-logo.gif]]]]

26-Aug-10 9:21
762Gabrieleah, wait, that was probably my fault... (yes, linux, i guess it should not segfault though)26-Aug-10 9:19
761Grahamof course26-Aug-10 9:19
760Grahamlinux?26-Aug-10 9:18
759Gabrieleuh... while testing this, i got this:

>> i: load http://www.rebol.com/graphics/reb-logo.gif connecting to: www.rebol.com == GIF89a\ufffd >> load read/binary http://www.rebol.com/graphics/reb-logo.gif connecting to: www.rebol.com Segmentation fault

26-Aug-10 9:18
758Grahamsimilar

justify with margins mrgns box iw lh 0 [ image xbl ybl - ih + lh iw ih img ] space 2

25-Aug-10 10:40
757Grahamappend new-page compose/deep [ textbox 10 10 100 100 [ box 60 60 10 [image 0 0 40 40 load %247logo.png] ] ]

Doesn't work either

25-Aug-10 10:19
756Grahamok, trying again25-Aug-10 9:55
755Gabrieledepth controls the offset relative to the text baseline, for eg. the letter 'q' has a positive depth because the stem goes below the text baseline.25-Aug-10 9:15
754Gabrielebox width height depth [...gfx commands...]25-Aug-10 9:14
753Gabrieleah, sorry, box requires more args, checking...25-Aug-10 9:12
752Grahamthere's no png there...24-Aug-10 8:50
751Grahamthis is the end of the file

endstream endobj 8 0 obj << /Type /Pages /Kids [6 0 R] /Count 1 >> endobj 1 0 obj << /Type /Catalog /Version /1.4 /Outlines 2 0 R /Pages 8 0 R >> endobj 2 0 obj << /Type /Outlines /Count 0 >> endobj 3 0 obj [/PDF /Text /ImageC] endobj xref 0 9 0000000000 65535 f 0000005180 00000 n 0000005259 00000 n 0000005305 00000 n 0000000009 00000 n 0000000111 00000 n 0000000208 00000 n 0000000414 00000 n 0000005123 00000 n trailer << /Size 9 /Root 1 0 R >> startxref 5341 %%EOF

24-Aug-10 8:50
750GrahamWhen I use this command, I don't get an image, and my 13 page pdf stops at the first page24-Aug-10 8:48
749GabrieleUnless there's a bug, that should work...24-Aug-10 8:44
748Grahamok, I'll try it again .. just with the above I got an error about expecting an image so I added the compose24-Aug-10 8:35
747Gabrielegraphic commands such as image are separate from text commands. inside a text "context", you can use box or vbox to enter a graphic "context". (also, you don't need the compose, as the dialect will try to evaluate arguments anyway.)

So:

textbox 10 10 100 100 [ box [image 0 0 40 40 load %247logo.png] ]

The difference between BOX and VBOX is that the former is treated like a character, while the latter is treated like a paragraph. (So you can have the former in the middle of a text line.)

24-Aug-10 8:27
746GrahamI tried this

append new-page compose/deep [ textbox 10 10 100 100 [ image 0 0 40 40 (load %247logo.png) ] ] and not seeing any image in the pdf ..

23-Aug-10 21:24
745Gabrieleno. initially, we wanted to use it for wikis (ie. see my qml to pdf code), but the fact that the pdf was not an exact replica of the html output was not considered acceptable.23-Aug-10 9:22
744GrahamIs qtask using pdf-maker?23-Aug-10 9:21
743GrahamCarl should use pdf-maker to generate PDFs of the online docs23-Aug-10 9:20
742Gabrielea box is "inline", eg, it is treated like it was a character. a vbox is considered more like a paragraph.23-Aug-10 9:15
741Gabrieleyou can use a vbox [ ... ] and put any graphic command inside it.23-Aug-10 9:15
740Grahamfor a floating signature?23-Aug-10 9:14
739Gabrieleyou can also just put the image below the text boxes in the page template in that case.23-Aug-10 9:11
738Gabrielecorrect.23-Aug-10 9:11
737Grahamso if you were doing a watermark you don't alter the text margins23-Aug-10 9:10
736Gabrieleas you see, it determines the image size, then sets the text margins so that you can make it flow around the image. it's a "trick" but it works if the image is not fixed within the page but moves around with the text, and you know it won't be split across pages.23-Aug-10 9:09
735Grahamahh... ok23-Aug-10 9:07
734Gabrieledefine-func 'drop-image [img font size /local iw ih lh mrgns] [ ( iw: img/size/x / 5.34 ih: img/size/y / 5.34 lh: pdfm/get-font-info font size lh: lh/max-height + lh/max-depth mrgns: copy [0 0] loop round/ceiling ih / lh - 1 [ repend mrgns [iw + 2 0] ] append mrgns [0 0] none ) justify with margins mrgns box iw lh 0 [ image xbl ybl - ih + lh iw ih img ] space 2 font* font size ]23-Aug-10 9:07
733Gabrieleah, i think that is a custom function. you can define your own "functions" or "macros" within the dialect.23-Aug-10 9:07
732Grahamdrop-image load %"Gabriele Fototessera small.jpg"23-Aug-10 9:06
731Gabrieleflowing text around an image? not implemented yet. it's not trivial unless the image is fixed within the text. (this is a limitation of the TeX algorithm, the width of each row of text must be known in advance)23-Aug-10 9:06
730Grahamdrop-image?23-Aug-10 9:04
729Gabrieleyou can have different templates for even and odd pages.23-Aug-10 9:04
728Grahamok understood23-Aug-10 9:04
727Gabrieleso, it gets rendered inside the first textbox, any text that does not fit goes to the second textbox, if there is still more text, a new page is created and so on.23-Aug-10 9:03
726Gabrielethe text stream is flown inside the columns.23-Aug-10 9:02
725Gabrielebook is the text stream. the block with the two textboxes is the template (two columns)23-Aug-10 9:02
724Grahamso book is the template?23-Aug-10 9:02
723Gabrielei don't remember if page numbers are implemented or not23-Aug-10 9:01
722Gabrielethe template can include anything you wish, images, other text, etc.23-Aug-10 9:00
721Grahamso that means you must have headers and footers too?23-Aug-10 9:00
720Gabrielewhich means: "create ANY number of pages, as necessary, using the following as the template for each page"23-Aug-10 8:59
719Gabrielethen, the pages are defined as:

any [ textbox 10 29 90 248 from book textbox 110 29 90 248 from book ]

23-Aug-10 8:58
718Gabrielethat is defined in the test-pdfm.r file where it says:

text book [ .... ]

23-Aug-10 8:58
717Gabrielefor example, see the text that starts at page 4 in the test.pdf file?23-Aug-10 8:56
716Grahameg ?23-Aug-10 8:55
715Gabrielewhat you can do is create a stream of text, and then flow it across multiple text boxes, or multiple pages.23-Aug-10 8:55
714Grahamor, how does one flow text from one page to the next ?23-Aug-10 8:55
713Grahamso if text flow is automatic ... how do you know if the text overlows the box provided?23-Aug-10 8:54
712Gabrieleeg. "abc" kern 1 "def"23-Aug-10 8:54
711Gabrieleyou can add manual kerning with the kern command23-Aug-10 8:53
710Gabrieleit is automatic.23-Aug-10 8:53
709Grahamkerning?23-Aug-10 8:53
708Gabrielehyphens have a slight penalty so the engine will try to avoid them unless necessary. it also tries to avoid more than one in a row.23-Aug-10 8:52
707Gabrieleso if you have a dictionary, you can preprocess your text and just output that.23-Aug-10 8:52
706Gabrieleeg.: "This is an ex" -- "am" -- "ple"23-Aug-10 8:52
705Gabrieleyou can define hyphenation points with --23-Aug-10 8:51
704Gabrieleyes.23-Aug-10 8:51
703Grahamso does it just wrap on words?23-Aug-10 8:50
702Gabrieleno, you have to handle that.23-Aug-10 8:50
701Grahamdo you have a hyphenation dictionary?23-Aug-10 8:50
700Gabriele(you'll need a longer string to see it of course :)23-Aug-10 8:49
699Gabrieleyes, that is the default.23-Aug-10 8:49
698Grahamthat does both left and right justification?23-Aug-10 8:49
697Gabrielesimplest form (default values used for everything):

textbox [ "This is an example" ]

23-Aug-10 8:48
696GrahamThe question for tomorrow is .. how to get a block of text fully justified with microkerning23-Aug-10 8:43
695GrahamI think Nick has enough to start the tutorial :)23-Aug-10 8:41
694Grahamthe other way it moves faster off the page23-Aug-10 8:40
693Gabrielethe x and y for images are there so that you don't have to use a translation each time :)23-Aug-10 8:40
692Grahamoh yeah ...23-Aug-10 8:39
691Gabrieleif so yes, but maybe you want 0 0 for the image origin?23-Aug-10 8:39
690Grahamtranslation :)23-Aug-10 8:39
689Gabrieletranslation?23-Aug-10 8:38
688Gabriele"transformation" = ?23-Aug-10 8:38
687Grahamso

for i 1 100 10 [ apply transformation i i [ image i i w h load %file.jpg ] ]

would work?

23-Aug-10 8:38
686Gabriele(if you need greater precision, you can probably find the exact conversion factor on google)23-Aug-10 8:37
685Grahamok, great23-Aug-10 8:36
684Gabrielei think one point is 0.35 mm, so apply scaling 0.35 0.35 [...points inside here...] should work23-Aug-10 8:36
683Graham72 points to an inch23-Aug-10 8:35
682Grahamcan we use points instead then?23-Aug-10 8:35
681Gabrieleyes, unless you set transformations to use different units.23-Aug-10 8:35
680Grahamand all measurements are in mm ?23-Aug-10 8:34
679Gabrielei don't yet have a way to include the JPG data directly, i use the loaded image. this means that the image gets in the pdf without compression.23-Aug-10 8:34
678Gabrieleimage x y w h load %file.jpg23-Aug-10 8:33
677Gabrielelet me check the syntax for the image command...23-Aug-10 8:32
676Grahamso how to include a JPG?23-Aug-10 8:32
675Grahamahh... well, I just assumed it was like PS and View23-Aug-10 8:32
674Gabrielethey are "local"23-Aug-10 8:31
673Gabrieleexactly. the transformations are only in effect inside the block.23-Aug-10 8:31
672Grahamso outside the [ ] .. you're back at 0x0 ?23-Aug-10 8:31
671Gabrieleyou can think of the ] as a "reset" if you wish23-Aug-10 8:30
670Grahamif I always use 0x0 .. then I can just translate to where I want23-Aug-10 8:30
669Gabrieleapply translation 10 10 [ ... translated stuff here ...] ... no more translated outside block...23-Aug-10 8:29
668Grahamor a graphic ( how do you include jpgs? )23-Aug-10 8:29
667Grahamwell, I have 4 blocks of text I want to move around...23-Aug-10 8:29
666Gabrielecan you make an example where you need "reset"?23-Aug-10 8:28
665Grahamno reset?23-Aug-10 8:28
664Gabrielei use nested blocks, so normally you don't need to reset23-Aug-10 8:27
663Gabriele(re: demo pdf, it was mostly meant as a "test suite" so it uses most of the features)23-Aug-10 8:27
662Grahamgsave grestore ?23-Aug-10 8:27
661Grahamso how to reset ??23-Aug-10 8:27
660Grahamok, like postscript ...23-Aug-10 8:27
659Gabriele(or you can think of all transformations as matrix multiplications, then everything becomes simple :)23-Aug-10 8:26
658Gabrieleso if you nest translations you get a translation with the sum of the two vectors.23-Aug-10 8:26
657Gabrieletransformations of any kind are always relative to the current coordinate system which is determined by "previous" transformations.23-Aug-10 8:25
656GrahamSo, if we ask you questions we can build a manual from that? :)23-Aug-10 8:21
655Grahamalways relative to absolute 0x0, or to the latest 0x0 set by the last translation?22-Aug-10 20:07
654GrahamFirst question, is the translation function also relative to 0x0 or to the latest 0x0 point?22-Aug-10 20:06
653GrahamI had a quick look at the source code for the demo pdf .. and decided that it's too hard to grok. We need some clues and from that someone can write something for users.22-Aug-10 20:00
652GrahamNick, another tutorial!22-Aug-10 19:59
651NickAI'd be happy to help with that too.22-Aug-10 18:53
650Grahamjust dictate it !22-Aug-10 10:22
649GabrieleI don't think I'll have the time to write it myself in the short term. I'd be very happy to help anyone willing to write it though.22-Aug-10 10:19
648GrahamGab, is there going to be any user documentation for pdf-maker 2?22-Aug-10 10:09
647JankoA (worldwide) universal document format is really something where you would expect prime support for utf.16-May-09 8:42
646GabrieleMax, actually PDF is not a bad format, it just didn't evolve in a good direction. In particular, the format itself would allow adding Unicode support very easily. They're just not adding that for who knows what reason. (Probably just that their tools do things in other silly ways.)16-May-09 8:17
645MaximIIRC adobe is notorious for implementing the worst file formats possible.15-May-09 18:49
644JankoYes, I think PDF doesn't support Unicode (even by far) - I noticed that stated several times on adobe forums. It seems you can emulate these different older encodings with some special tricks like /Differences but it's all muddy water so I believe it's not the most joyfull thing to program or make work.15-May-09 18:43
643GabrieleNot sure when I'll be able to work on it though, so it's a good thing that you did the Haru binding.15-May-09 7:42
642GabrieleJanko, AFAIK, that only works for 256 chars encodings. We need full Unicode support... Anyway, I'll see if I can add support for /Differences so that it will at least be useful to a good part of Europe.15-May-09 7:41
641JankoI think solution for other encodings is by using that /Differences and defininf the glyph names . I looked at how Haru PDF library does it and it uses this method, but I wasn't able to make it work in my example ( but pdf-s are very complex so there is a bunch of parts that I didn't understand ). At the end I started writing binding to Haru, because having those characters is cruicial for that app. I can't make app for my country where invoices aren't able to display those characters.13-May-09 9:57
640Gabrielelet me know if you find out that a new version of the format supports unicode or that there is a simple way to implement it. to me it looks like the only way would be to create your own 1 or 2 byte encoding with the glyphs you use, or to do like OpenOffice does - it creates a separate font for each set of 256 different characters and then selects the correct font for each character.13-May-09 8:52
639Gabrielethe pdf reference documentation list all the characters in those fonts. you can download it from the adobe website.13-May-09 8:49
638JankoI need it today .. I have most stuff done and wanted to release app this week , so I can't afford to be stuck on this for days or weeks12-May-09 15:40
637OldesYes... I would need latin2 encoding as well. So I hope you will solve it before I would like to use it:)12-May-09 15:37
636Jankoit's very nice, but because of 1 letter that I can't generate in it Ch .. you have it too probably .. I need to find another solution .. and I have invoice nicely made in pdf-maker already12-May-09 15:21
635OldesI wish to have more time to play a little bit with the pdf-maker12-May-09 15:16
634JankoI can't even make it support Latin212-May-09 15:12
633JankoI think not, and it's not a simple problem to solve.. PDF looks very horrible in this regard to me12-May-09 15:12
632OldesIt's not possible to use utf8 encoding with pdf-maker ?12-May-09 14:32
631JankoI found an example of PDF from Haru library which uses all ISO8859 encoding 1 - 20 ... it is version PDF-1.3 , it does use the /Differences for each encoding, it also defines widths for them, I intend to look at it and somehow transfer it to pdf-maker .. but I am not sure how successfull I will be as pdf-maker seems quite complex beast12-May-09 12:26
630Jankodo you know are there all glyphs displayed for these standard fonts so I could at least know if Ch ch are in there at all ?12-May-09 10:48
629Jankothat might have caused the error before then ..12-May-09 10:47
628Jankoaha, thanks12-May-09 10:40
627Gabrielethe easiest way would be to change the pdf-maker code to actually produce what you need.12-May-09 10:40
626Gabrieleit's possible to edit the pdf file by appending stuff to it, but you'll need to read the specs to make that work, it's not entirely trivial either.12-May-09 10:39
625Gabrielechanging the pdf file directly will break it because the index at the end needs to point to all the objects in the file... so if objects move around the index needs to be redone.12-May-09 10:39
624JankoI will try more12-May-09 10:38
623Jankoso if that differences would work and exchange 200 with Ccaron it would all work12-May-09 10:38
622Jankoin the pdf file ... I discovered one good news now ... I need csz ( like ch sh zh in eng) .. I saw that zh that I thought before doesn't have a glyph in standard fonts didn't make it to the generated pdf and if I add it by hand and update length of stream Zh works ... so now only Ch is the problem .. (because it's not represented in win1252 , the character with same code 200 in 1252 is E (arrow) È12-May-09 10:37
621Gabrieledid you do the change in the pdf maker code or in the file?12-May-09 10:32
620Gabrielethe trailer needs to be redone12-May-09 10:32
619JankoI tried that and nothing happened then I changed the encoding object headers to << /Type /Encoding /BaseEncoding /WinAnsiEncoding /Differences [ and got error while opening (18)12-May-09 10:22
618Gabrieleyou could change the header though and just try to set it to 1.6 - though i don't know if everything else will work then. (going from 1.3 to 1.4 didn't require any changes iirc)12-May-09 10:18
617Gabrielei don't know how version support is these days, maybe it's worth upgrading to newer versions of the format.12-May-09 10:17
616Gabrieleyes, that's very likely.12-May-09 10:17
615Jankodo you think that /Encoding /Differences [ 200 /Ccaron 232 /ccaron ] doesn't work because it's PDF-1.3 and in that example it's PDF 1.6, maybe this is more recent feature?12-May-09 10:11
614Jankook thanks!12-May-09 10:08
613Gabrieleie. solid box 128.128.128 should give you a gray bg (you need the coords like in the example above)12-May-09 10:07
612Jankoaha, I will look into that then, thanks for direction12-May-09 10:06
611Gabrielebut with a solid box instead12-May-09 10:05
610Gabrieleyou need to do something like decor [box line width 0 xbl ybl xtr - xbl ytr - ybl]12-May-09 10:05
609Janko( but encoding is 100x bigger problem for me )12-May-09 10:05
608Gabrieleif i ever get to the point of adding support for custom fonts, then i might be able to also give the fonts any encoding.12-May-09 10:05
607Janko( about decor I tried in table cell decor [ set-fill 50.50.50 ] and there were no errors -- but I don't see any background .. )12-May-09 10:04
606Jankodo you know anything about this http://www.tv.com.pl/stepbystep/pdfinclude/ .. I am trying by manually editing the pdf file but so far no changes12-May-09 10:03
605Jankoyes, we just started to suspect that what you said about encoding12-May-09 10:03
604Gabrieleto do anything else font tricks are often being used. i wish they just had support for utf-8...12-May-09 10:02
603Gabrieleunfortunately the PDF format does not have direct support for encodings except for the default windows encoding, the default mac encoding, and an adobe encoding; they are all variations of latin1.12-May-09 10:02
602Gabrielenon-ascii: the only supported encoding so far is latin1 (basically... more precisely i think i have it set to the Windows variation, which iirc is windows-1252) - that is, the same that View uses on western Windows installations.12-May-09 10:01
601Jankorule12-May-09 10:01
600Jankouh, I tried cell-decor and decor probably not on the beginning ... ah I only got it now cell-decor is name of word that defines 'decor as a rure12-May-09 10:01
599Gabrielehttp://www.colellachiara.com/soft/PDFM2/pdf-maker.html#section-3.312-May-09 9:59
598Gabriele(yes, beginning of cell block.)12-May-09 9:59
597Gabrielewhat you see in the example above is the default decor. you can set a custom decor in each cell... i think at the beginning of the cell block, but i don't remember, i'd need to check.12-May-09 9:57
596Gabrielethey are: Times-Roman, Times-Bold, Times-Italic, Times-BoldItalic, Helvetica, Helvetica-Bold, Helvetica-Oblique, Helvetica-Oblique, Courier, Courier-Bold, Courier-Oblique, Courier-BoldOblique, Symbol, ZapfDingbats12-May-09 9:57
595Jankohi Gabriele .. I used decor as in your example to make table vitw visible grid ... but is it possible to make just specific cells with for example different fill color, or color ... I see it in code but can't use it

upthere is my example http://www.refaktor.si/storage/test.pdf http://www.refaktor.si/storage/try1.r

12-May-09 9:56
594Gabrielefonts: only the 14 standard pdf fonts are available.12-May-09 9:54
593Gabrieleyou'll probably just use a box so it's much simpler.12-May-09 9:54
592Gabrieletable test [56 86 56] [ ] [ top padding 3 stretch 2 bottom padding 3 stretch 2 left padding 3 right padding 3 decor [ paint edge width 0.2 255.255.0 [ xtr - 2 ybl + 2 bezier xtr + 1.5 ybl + 2 xtr - 2 ybl - 1.5 xtr - 2 ybl + 2 xtr - 2 ytr - 2 bezier xtr - 2 ytr + 1.5 xtr + 1.5 ytr - 2 xtr - 2 ytr - 2 xbl + 2 ytr - 2 bezier xbl - 1.5 ytr - 2 xbl + 2 ytr + 1.5 xbl + 2 ytr - 2 xbl + 2 ybl + 2 bezier xbl + 2 ybl - 1.5 xbl - 1.5 ybl + 2 xbl + 2 ybl + 2 close ] ]12-May-09 9:53
591Gabrieleeg. from test-pdfm.r12-May-09 9:53
590Gabrielethe keyword is just "decor".12-May-09 9:53
589Jankofor example I see cell-decor as a place to define bg-color but if I put it into cell definition next to width (or any other place) I get "cell-decor has no value"12-May-09 6:46
588JankoGabriele: I have few questions if I may :) - how to make certain tablecells / rows bg-colored (like light gray) ... - how to know what fonts are available, can I add mine (will this work on linux too, testing on windos now) - I need to have non-asci characters work too (my lang has šèž) could this be a big problem?

Thanks a ton for making pdf maker

11-May-09 23:24
587JankoThis is my sample script so far : http://www.refaktor.si/storage/try1.r this is the PDF it generates so far (I need to make an invoice) http://www.refaktor.si/storage/test.pdf11-May-09 23:14
586JankoI got to the point where document looks more like it should at the end so it will be doable :) ... still havent figured out how to set a fill color on something like a box or a table cell/row10-May-09 8:44
585JankoI am looking at that and trying to learn how to do things, but it's quite complex.. well I got some of the basics out already and am slowly forming my own pdf10-May-09 2:07
584GrahamI presume so ... I haven't looked at pdfm2 for years10-May-09 2:07
583Jankoyou mean test.pdf ?10-May-09 2:06
582GrahamIsn't there an example with the distribution?10-May-09 2:05
581JankoHi, are there any simple examples to get started with PDFM2 ?10-May-09 0:57
580Gabrielethen, there's the problem of the fonts. TeX has its own fonts which are designed correctly. TTF is not even close to what MetaFont can do, and the standard symbol font is not as good as the TeX fonts. Even if I added a good formula renderer to the pdf maker, without a good font it wouldn't look very good anyway.15-Feb-09 10:57
579Gabrieleit's not hard to render math. it's just that TeX is very well tuned (uses the correct spacing between things), which is just a long list of rules and parameters. One could get that out from the TeX source... otherwise it just takes a long time to tweak all the parameters to get a nice looking result.15-Feb-09 10:55
578Gabrielekib, that's why I asked "define alive" - if you ask whether I am working on it now, then no. if you ask whether i'll fix bugs that are reported, then yes, but you may have to wait.15-Feb-09 10:54
577Henrikit's probably better to go the tex->dvi->pdf route.14-Feb-09 11:26
576kib2I suppose it must be a hard task to implement math rendering, as they may be nested.14-Feb-09 10:06
575kib2Gabriele: good to know it's alive, I was asking the question because the pages were not updated till 2006. Is that normal ?14-Feb-09 10:04
574GabrieleI haven't spent any time on formulas. I don't have a need for that, and since it's quite time consuming to do it as good as TeX, I never really planned doing it.14-Feb-09 9:34
573GabrieleDefine "alive". :-)14-Feb-09 9:32
572kib2Hi. Is this project still alive ? Also, I would like to know if it's possible to render mathematical formulas inside (llike in TeX or Lout ). Thanks.13-Feb-09 8:56
571amacleodLooking at the files in a text editor I believe I can see were image data but where it exactly starts and ends I'm not sure. I tried to cut and past the data for a small image but I could not load it in rebol...just took a shot to see if it were in some staight forward binary format.19-Dec-08 4:15
570Gabrieledepending on how the PDF file is built, extracting text and images could be trivial, or very difficult.18-Dec-08 10:09
569Grahamgoodluck is all I can say.17-Dec-08 21:35
568amacleodAre they not parsing out the image data?17-Dec-08 21:13
567amacleodGraham, Thanks for the reply...I've been working on the house so my computer has been down for a few days...anyway: I have found some utilites to extract images and text but I'm building a tool in rebol to coordinate the conversion of pdf's to text and extracted images, to edit them, and to upload. I was hopig for a rebol solution to incorporate it all into one app. The tool will be used by non-tech so I wanted it simple as possible. How do these extaction utilities work? Are they no parsing out the image data?17-Dec-08 21:12
566RobertDoing this via a simple dialect would be very cool. Could become a nice tool.10-Dec-08 20:08
565RobertOk. I don't know a lot about PDF files, but using the Adobe tools to make forms is a pain in the ...10-Dec-08 20:08
564GabrieleRobert, I don't have any support for forms yet.10-Dec-08 8:41
563Grahamdon't think so ...9-Dec-08 10:19
562RobertCan PDF-Maker be used to create PDF-Forms that can be filled out by users with Acrobat Reader?9-Dec-08 8:20
561GrahamI ocr pdfs all the time .... because my scanner produces PDFs9-Dec-08 3:52
560Grahamif it's all grahphic ... eg. a scanned pdf .. then you need to ocr it.9-Dec-08 3:51
559Grahamunless the text is embedded in the pdf ... in which case there are utilties to pull it out.9-Dec-08 3:51
558GrahamYou can't9-Dec-08 3:51
557amacleodHow tuff would it be to parse out the image data from a pdf file...or for that matter, the text. Formating not important... Or does anyone know of a good lib or dll that does this?9-Dec-08 2:44
556Alan.14-Sep-08 6:59
555PavelReichart PDF was created in the way no executable postript code could be possible (no if no jumps no execute AND no write to disc) That is main advatage of PDF. Anyway it is possible to PDF contains tons of shit never would be imaged on page (old versions of documents for example).24-Apr-08 8:01
554ReichartAlso, keep in mind, PDF can contain all sorts of junk...

Go here http://en.wikipedia.org/wiki/Portable_Document_Format Jump to PostScript....

19-Apr-08 16:48
553ReichartDepends on the PDF editor and how it was saved. Yes, it can be compressed. Yes, it can be protected (encrypted). It can also be just PostScript at its core.19-Apr-08 16:45
552amacleodIs a pdf file compressed or encrypted. Is there anyway to parse it?19-Apr-08 15:51
551Grahamno19-Apr-08 4:17
550amacleodIs there any way to go from pdf to makedoc format?19-Apr-08 2:14
549AntonThere are tools (which I know of) in linux such as pdftotext. I presume the web links would appear in the output text, then you can use rebol parse to extract the links from that.26-Mar-08 12:20
548RondonFolks, I'm having a problem. How can I extract just the web links inside a pdf ?6-Mar-08 11:02
547Grahamunless it's one of those compressed pdf formats26-Jun-07 1:58
546Grahampostscript and pdf are similar formats and store images as either binary or as text.26-Jun-07 1:58
545btiffinWell, I hacked it...and have no clue if what I did would work the next time :)26-Jun-07 1:20
544ChrisAh, you got it...26-Jun-07 1:14
543ChrisDepends -- do you want to retain vector artwork? If not, you could rasterise it in Photoshop, GIMP, Seashore or other bitmap editors.26-Jun-07 1:13
542btiffinIt's a binary, but I've extracted it. Thanks for the hint.26-Jun-07 1:12
541Graham:)26-Jun-07 1:02
540Grahamtext editor26-Jun-07 1:02
539btiffinBefore I look into it, I thought I'd just ask. We (the graphic desgner actually) got sent a logo graphic inside a PDF (and that is all that's in the PDF). Is there an easy way of extracting the image? I'm not a huge fan of selecting and cut'n'paste as it may lose sizing etc... More curious than worried.26-Jun-07 0:14
538DaveCchange = chance.7-Jun-07 18:42
537DaveCHaven't had change to look at V2 yet.7-Jun-07 18:42
536DaveCBusy converting HTML template reports into PDF using PDF-Maker. Getting the hang of it now. The function which calculates the textbox height is providing most of the work. I'm calculating page space as text boxes are generated. As I think in point size, I've transposed mm2pt to give me a pt2mm function.7-Jun-07 18:42
535Gabrielei don't have the time to write it at this moment... also, i'm sure someone other than me would have a more user-centric perspective. ie some of the stuff in v2 that seems trivial for me might not be so for other users.2-Jun-07 12:04
534JoeGabriele, it would be nice to have a smaller PDF doc for v2, like you had for v1. Any chance ?2-Jun-07 11:54
533DaveCThanks, that makes sense to me now. I'll have a bit more time tomorrow to think things through a bit more.31-May-07 19:47
532Gabrielebasically the above will render This is a test out of the visible area.31-May-07 19:21
531Gabrieletextbox default size is not dynamic, but static, so if you set a different page size you'll want to set a custom textbox size too31-May-07 19:21
530DaveCThe page does flip to landscape though.31-May-07 15:22
529DaveCUmm. If I use this;

page size 297 211 textbox ["This is a test"]

the texbox does not render. If I comment out page size, it does.

31-May-07 15:21
528Gabrieleunless you need the advanced features in v2, yes.31-May-07 15:18
527DaveCGot it thanks. Maybe I should stick the V1 for now then.31-May-07 15:17
526Gabrielehttp://www.colellachiara.com/soft/PDFM2/31-May-07 15:17
525Gabrielenote, v2 is quite different from v1. it hasn't been tested as extensively as v1 either (v1 is being used on a daily basis in many applications).31-May-07 15:16
524DaveCCan't see a link on that page to download the code.31-May-07 15:16
523DaveCLet me see how I get on. I'd be happy to volunteer to write the user docs - I'm a bit under pressure at work right now, but I would really like to contribute something back to you.31-May-07 15:13
522DaveCI can see that in the code. I'm just getting a feel for the basics at the moment. Ok, version 2 I'll get that.31-May-07 15:11
521Gabrielestill looking for someone volunteering to write the user docs... :)31-May-07 15:11
520Gabrielebtw, version 2 is at http://www.colellachiara.com/soft/PDFM2/pdf-maker.html31-May-07 15:10
519Gabrielealso, since the result is a block of pages, you can modify the result and add anything after the layout process.31-May-07 15:08
518Gabriele5th argument to render-pages is a function that is called to make the scheleton of each page.31-May-07 15:08
517DaveCok.31-May-07 15:06
516Gabrieleshould be the latest 1.x version so you're fine.31-May-07 15:06
515DaveC:-)31-May-07 15:06
514Gabrieleah, right, that's the one with a few bugs fixed.31-May-07 15:05
513DaveCpdf-maker: 1.27.1 3-Aug-200631-May-07 15:05
512DaveCsorry, checking...31-May-07 15:04
511Gabrieleah, 1.5.0 of pdf-tables. you should have 1.24.0 of pdf-maker31-May-07 15:04
510DaveCin the header31-May-07 15:04
509DaveCYes, pdf-tables, date 24-Jul-200331-May-07 15:03
508Gabrielereally? of pdf-maker?31-May-07 15:02
507Gabrielepdf-tables lets you provide a function to create the pages, and you can still modify the output. so, you can create the headings separate from the table itself.31-May-07 15:02
506DaveCVersion 1.5.031-May-07 15:02
505DaveChang on...31-May-07 15:02
504Gabrielealso, since you refer to pdf-tables, i assume you dowloaded version 131-May-07 15:01
503Gabrieleyou may want to change the page size instead of rotating it.31-May-07 15:00
502DaveCI've just downloaded pdf-maker.r and I'd really appreciate some help to get going quickly. I've rotated a page +90 to get into landscape, but the texbox still renders the text in the same way as portrait. Do I have to rotate each textbox too?

I also downloaded pdf-tables.r too. Does a table handle a page break itself?

Talking of page breaks, in a long table which spans many pages, I'd like to render the column headings on each new page. Is there a variable I can track or an event I can listen for that lets me know that the text is about to flow to the next page.

Thanks a lot.

31-May-07 14:56
501Gabrieleso i will either need to figure out how to create a font encoding description that works for utf-16 (but i guess it would require a huge table, and so would make the documents big), or i'll need to use the same technique as OO4-Mar-07 9:39
500Gabrielethat is, if you are using "Times", and you use more than 256 different characters, openoffice creates a pdf with two fonts, "Times1" and "Times2", each with at most 256 characters.4-Mar-07 9:38
499Gabrieleopenoffice, for example, creates n 256-character fonts instead.4-Mar-07 9:37
498Gabrieleto support unicode you have to create a multibyte encoding for the fonts, and the spec does not give any detail on how this works.4-Mar-07 9:37
497Gabrieleoldes: unfortunately, no. he has to specify the encoding in the font description. the only "built-in" encodings are Adobe, WinANSI (latin1) and Mac. I think adobe is a variant of latin1.4-Mar-07 9:36

Return to Index Page