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

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

#UserMessageDate
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
496Oldesand which windows encoding? Maybe can janeks just set some flag or something which specifies his encoding in the file.3-Mar-07 10:35
495Oldesreally? I cannot believe that PDF is not able to be in unicode. What is adobe encoding?3-Mar-07 10:27
494Gabrielethe pdf format only supports adobe encoding, windows encoding and mac encoding. the pdf maker only uses windows encoding (which is basically latin1).3-Mar-07 9:56
493JaneksCan I use scripts of Oldes to get right encoding output of pdf from pdfMaker?

It seems that Rebol uses for my Win platform Win1257. In which encoding should I convert text for input to pdfMaker to get right accentuated characters in pdf generated by pdf maker?

2-Mar-07 15:58
492AntonThose are details. Any default is still better than an error (if trying to make the dialect forgiving and friendly). At least the user will see something appear, even if it has the wrong size and in the wrong position.26-Nov-06 0:53
491Gabrielethere's also the issue, that if we allow specifying a binary! instead of image! and interpert it as a jpeg file, then the dialect will have no default to use for the size, unless we go on and parse the jpeg header, or load the jpeg into a image! temporarily just to get its size. (binary! would have the added benefit to work also in Core, however that would only be for jpeg images)25-Nov-06 16:10
490AntonOn balance, (and since I discovered the resuling PDF was a bit large), I think it's not worth me forking and complicating the dialect.25-Nov-06 10:27
489AntonYou have, of course, the benefit of knowing how the dialect works inside out. People new to the dialect would like to find out how it works by experimenting. Then it would be good to be more friendly, not causing error on missing parameters, similar to LAYOUT.25-Nov-06 10:24
488Gabrielewell, i always output pdf from programs, and the default size does not help much there, but i'm not saying it does harm either. if everyone else wants that, then go for it.25-Nov-06 9:25
487AntonHmm...25-Nov-06 4:45
486AntonI was thnking of having pdf-maker as an output format for bubble-doc.25-Nov-06 4:44
485AntonAh, but I don't want to do it if you don't think it's a good idea.25-Nov-06 4:42
484Gabrielenote, of course you are free to do these changes and distribute them. v1 is public domain actually :) (not even bsd)24-Nov-06 16:09
483AntonI see, and I understand and accept your position regarding the "low-level-ness" of the dialect. Sorry for the confusion, but I left the line setting the default position commented so you could uncomment it *if* you already had a "current layout position" variable handy. I thought any position would be better than no position.24-Nov-06 8:39
482Gabrielethere's also to say, that the layout-pdf dialect is still meant to be rather low level. a human would write in QML or makedoc or some high level dialect, not layout-pdf; thus the defaults for image would be useless (even if a human was to write it, they'd only cover some 10-20% of the cases, since not all images have the same dpi, and 99% of the time you don't want the image at the bottom left corner of the page).24-Nov-06 8:01
481Gabrielestill, 0 0 does not seem a reasonable default for the position to me, unless you want the image to cover the whole page. anyway, "You could, however, easily add a small helper rule to accept 2 numbers or a pair": it's not so in v2 (because of evaluation), and I don't intend to do anything except necessary bug fixes for v1 :)24-Nov-06 7:58
480AntonWith the above patch, this: layout-pdf [ [ image logo.gif ] ]

shows the image with the size of 100x24 mm. When rendered by Adobe Reader at 100%, that appears about 3.5 times larger in each direction than view layout [ image logo.gif ]

Actually, it would be better to multiply by the pixels/mm ratio. Let me have a look...

24-Nov-06 4:15
479AntonI agree the above code is more complicated. You could, however, easily add a small helper rule to accept 2 numbers or a pair.24-Nov-06 4:05
478Gabrielethe reason i don't accept pairs is consistency; since values are decimal, and pair is integer only, i don't allow them to avoid confusion and complicating the rules even more (in v2 this would be even more complicated because of evaluation)23-Nov-06 19:14
477Gabrieleimage logo.gif would be at position 0 0 and 1 mm high, 1 mm wide (unless there's another transformation involved)23-Nov-06 19:12
476AntonSorry, defaults for what ? The above changes allow eg: layout-pdf [ [ image logo.gif ] ] layout-pdf [ [ image 20x150 200x96 logo.gif ] ]23-Nov-06 13:32
475Gabrieleso 0 0 1 1 are reasonable defaults? hmm.23-Nov-06 9:52
474AntonAha... images are not compressed. Two images of 1.34 MB made a 67MB pdf ... Onward pdf-maker-2 ... :)23-Nov-06 8:37
473Anton(5 changed lines.)23-Nov-06 8:25
472Anton| 'image ( push new gfx: none insert tail new/contents new: make default-space [] ) opt [opt 'at [copy val1 2 number! | set val1 pair!] (if pair? val1 [val1: reduce [val1/x val1/y]] new/translate: val1)] ; <-- now translation is optional, and can be a pair too opt [opt 'size [copy val1 2 number! | set val1 pair!] (if pair? val1 [val1: reduce [val1/x val1/y]] new/scale: val1)] ; <-- now scale is optional, and can be a pair too any [ 'rotated set val1 number! (new/rotate: val1) | 'skew [copy val1 2 number! | set val1 pair!] (if pair? val1 [val1: reduce [val1/x val1/y]] new/skew: val1) ; <-- now accepts a pair ] set val1 [image! | file! | word!] ( if word? val1 [val1: get val1] if file? val1 [val1: load val1] ;if none? new/translate [new/translate: [0 0]] ; <- default position (could set this to "current layout position") if none? new/scale [new/scale: reduce [val1/size/x val1/size/y]] ; <- default size insert insert tail used-images val2: join "Img" length? used-images val1 gfx-emit [to-refinement val2 'Do] new: pop gfx: none )23-Nov-06 8:24
471AntonGabriele, I have patched pdf-maker.r 1.27.1 of 3-Aug-2006 to make the dialect a little easier with images. Starting at line 1051, the changed lines are commented:23-Nov-06 8:24
470Henriksome day someone will write a PDF viewer for REBOL that will rival Preview.app for mac, so things will be good. :-)8-Oct-06 11:39
469OldesBut maybe you are right.8-Oct-06 11:31
468OldesI know people who are able to send me PDF where is only one image (they are Mac users of course)8-Oct-06 11:31
467Henrikso you shouldn't hate PDF, but the viewer :-)8-Oct-06 11:30
466OldesOf course, PDF is the main format for everything on Mac:-)8-Oct-06 11:30
465Henrikoldes, depends on the viewer. I use PDF's under OSX all the time. :-)8-Oct-06 11:28
464OldesIt must be related to acrobat as I have same problems with other PDF documents sometimes if I open them in Firefox - I must say that I don't like PDFs at all8-Oct-06 11:25
463james_nakMaybe the acrobat driver wasn't running. In any case, nice work Gabriele.6-Oct-06 18:05
462OldesBut it's working now, strange6-Oct-06 8:53
461OldesThe link above just crashed my Firefox6-Oct-06 8:49
460AntonLooks great. Good work. http://www.colellachiara.com/soft/PDFM2/test.pdf6-Oct-06 5:18
459Gabriele...done. last page of test.pdf.5-Oct-06 16:33
458Gabriele:) it's uploading...5-Oct-06 16:32
457AntonYou want to show off your technology don't you ? :)5-Oct-06 16:24
456Gabrielelet me add one for you...5-Oct-06 16:23
455AntonOk.5-Oct-06 16:23
454Anton.. but doesn't appear to be one. Maybe you could add it ?5-Oct-06 16:23
453Gabrieleit's not there, but the pdf-emitter for qml creates them :)5-Oct-06 16:22
452AntonI'm looking for a definition-list example in the test document ...5-Oct-06 16:20
451AntonAh.. I have experienced this problem. That is a good improvement.5-Oct-06 16:19
450Gabrielein the pdf maker, two words in the first column would not be broken, since shrinking a column with text that is already more that one line is better than shrinking a column with text which can fit in one line.5-Oct-06 16:17
449Gabrielei.e. the first column is forced to be very small by the second column having long text5-Oct-06 16:16
448Gabrielewhat you get in web browsers is that if you have two words in the first column, they are very likely to be broken into two lines5-Oct-06 16:16
447Gabrielethis means that the description is usually long, while the first column only has a word or two.5-Oct-06 16:15
446Gabrieleclassic example: you are doing a definition list with a table, so you have a column with words and a column with the description.5-Oct-06 16:15
445AntonI see your embedded image. Very nice. Can you explain briefly how the column width calculation is better ?5-Oct-06 15:04
444Gabrieleupdate: changes to tables, now can calculate the column widths automatically. (it does so *much* better than web browsers.)4-Oct-06 17:09
443Gabrielehmm, rereading the spec, it may work just putting the jpg file there. i will try that, eventually. :)29-Sep-06 17:50
442Gabrielepdf wants the dct data, not the whole jpg binary, afaik. the data in the jpg header go to the image object dictionary.29-Sep-06 17:44
441Oldes(I mean embedding images into the PDF, to make it clear, the format is different of course)29-Sep-06 15:46
440OldesIs the PDF format so different? SWF and PDF are now in the same stable = Adobe29-Sep-06 15:43
439OldesI'm embedding JPGs into SWF files without problem, there is not required any special operation on the JPG's data to embedd. With the other formats I have to count pallete and use Rebol's compress (zlib) to embedd such an image (gif or png). It's not so fast, but it does what I need (and I don't mind if it takes a second more time to compile)29-Sep-06 15:42
438Gabrielethanks oldes, i'll probably ask you more when i get to this :)27-Sep-06 17:19
437OldesAnd yes, Rebol's compress is some older version of zlib compression - I use Rebol's compress function to create compressed SWF files, but in some cases Rebol is not able to decompress zlib binaries (so I use the dll)27-Sep-06 14:02
436OldesBut it's Rebol?pro version (using a dll) http://oldes.multimedia.cz/rebol/zlib_latest.rip27-Sep-06 14:00
435AntonOldes made a zlib compressor/decompressor. I found it in my cache: public/box.lebeda.ws/~hmm/rebol/zlib/latest/zlib.r but it's not there on the web, apparently. Try check for his latest website.27-Sep-06 5:31
434Gabrielei think compress is from zlib26-Sep-06 16:21
433Henrikmaybe a compression group would be in order...26-Sep-06 16:16
432MaximI seem to remember someone building a wrapper around compress to cope with this issue... yes... but its sooo long ago... maybe it was something else.26-Sep-06 16:15
431Henrikisn't the current compress, a gz compression lacking some headers?26-Sep-06 16:14
430Maxim(and compress/TAR)26-Sep-06 16:12
429Maximyes! compress/RLA compress/ZIP compress/GZIP compress/JPEG compress/MP326-Sep-06 16:11
428Gabrielei will eventually have a look at this... for now, i'm happy with them being uncompressed :)26-Sep-06 16:11
427Gabrielealso every image to jpg is not a good idea (users may not want that, if the image is not a photo but a drawing for eg)26-Sep-06 16:11
426Henrikit would be nice if compress had more modes that are "strategically" made to be compatible with various types of binaries where such compressed data is embedded.26-Sep-06 16:10
425Maxim(embed jpg file saved from rebol and converted to jpeg with image-magic)26-Sep-06 16:10
424Gabrielemax: sure but you still have to parse the resulting jpeg data26-Sep-06 16:10
423Maximyou could use edgar's image-magic examples and use image magic if pro licence and image magic is found... its going to be Extremely fast.26-Sep-06 16:09
422Gabrielebut i guess i'm not so lucky that compress is compatible...26-Sep-06 16:09
421Gabrieleif compress does work, that could be applied to everything else too, so the resulting file would be surely smaller.26-Sep-06 16:09
420Gabrieleone possibilty would be: pass jpg file name, not image!; parse jpeg file for jpeg data; embed jpeg data in the pdf26-Sep-06 16:08
419Henrikwould take minutes to compress anyway...26-Sep-06 16:07
418Gabrielebut jpg is nothing i want to write in rebol ;)26-Sep-06 16:07
417Gabrielewell... run-length or similar should not be a big problem (will be slow, but maybe the result of compress does work after removing header)26-Sep-06 16:07
416HenrikI guess compression is hard to do?26-Sep-06 16:06
415Gabrielenope. that's why it's big26-Sep-06 16:06
414Henrikis the image of you compressed in some way?26-Sep-06 16:05
413Gabrielei should add something instead of that box... maybe i should convert something from draw.26-Sep-06 16:05
412Gabrieleyes. not great gfx i know, but shows that it works ;)26-Sep-06 16:04
411Henrik"You can also "display" graphics:"

and after that, there is a box. is this correct?

very nice, by the way :-)

26-Sep-06 16:03
410Gabrieleupdate: images; embedding gfx into text. (see last page of test.pdf)26-Sep-06 16:00
409AntonAh :)26-Sep-06 8:00
408Gabrielecircle: i didn't spend much time on it. it's done by just setting the margins of each line so that it looks like a circle. :)25-Sep-06 17:03
407Gabrielethe bugs were not visible in test.pdf, but they were in various qml documents. :) i will upload the new qml-ed very soon.25-Sep-06 17:02
406AntonI didn't notice much different in test.pdf. Probably small differences there. I keep looking at that circle and wondering if the centre can be positioned so that there's as much text on the first row as the final row.25-Sep-06 15:28
405Gabrieleupdate: many bugfixes25-Sep-06 15:08
404GrahamYes ... it is. But documentation seems lacking, and it appears to be deprecated by Adobe.24-Sep-06 23:33
403MichaelBIsn't that one of the formats for Acrobat Forms ? There should be several types, like xfdf and the like .... but I'm not 100% sure.24-Sep-06 21:39
402GrahamAnyone know anything much about the FDF format?24-Sep-06 18:41
401GrahamNeeds Ghostscript doesn't it?22-Sep-06 0:16
400?PDFCreator

Overview: PDFCreator is an application for converting documents into Portable Document Format (PDF) format on Microsoft Windows operating system. Once installed, it allows the user to select PDFCreator as their printer, allowing almost any application to print to PDF, PNG, JPEG, BMP, PCX, TIFF and EPS format.

Besides being installed as a printer driver, PDFCreator can be associated with .ps files to manually convert Postscript to PDF format.

21-Sep-06 21:46
399eFishAntGraham, thanks.21-Sep-06 20:28
398Grahampdf2ps21-Sep-06 19:17
397eFishAntfound http://www.pstoedit.net/pstoedit which can do vector graphics...maybe this will help...and some point would be cool to do these in REBOL.21-Sep-06 17:03
396eFishAntso I can load a .pdf and make a high res bitmap?21-Sep-06 16:58
395Alanphotoshop will strip out graphics files if thats what you need21-Sep-06 16:22
394eFishAntA way to convert content, especially graphic from .pdf to something useful.21-Sep-06 15:00
393eFishAnta quick scan here ... I do not see anything for taking a .pdf and converting it to something like an image or some markup. Does anyone know of something that converts a .pdf to generic postscript (like for GSView) or to convert to native REBOL format? Thanks.21-Sep-06 14:59
392Gabrieleyou can just use any graphics for cells. for example QML can produce boxes with rounded corners and shadows.20-Sep-06 20:13
391AntonFunny looking table borders ! :)20-Sep-06 15:33
390Antonhttp://www.colellachiara.com/soft/PDFM2/test.pdf20-Sep-06 15:30
389Gabrielesee test.pdf19-Sep-06 16:07
388Gabriele(cell decorations is a superset of table borders, cell background etc)19-Sep-06 16:07
387Gabrieleupdate: graphic commands, cell decorations19-Sep-06 16:05
386Gabrieleupdate: table options18-Sep-06 15:26
385AntonCool. Getting better.18-Sep-06 14:41
384Gabrielei have tested table inside table cell, it works fine. (see test.pdf)18-Sep-06 11:39
383Gabrieleupdate: text colors, fixed table parsing bug18-Sep-06 11:38
382Gabrieleit's much lower level than MD or QML. It's a REBOL dialect, not a ML.18-Sep-06 8:31
381?Ah. What is it? I have not played with PDF Maker18-Sep-06 3:56
380Gabrielereichart, i'm pretty sure he's using the pdf maker dialect directly.16-Sep-06 19:14
379?LOL, I meant as in HTML, MakeDoc, etc.16-Sep-06 17:11
378AntonI like the cautious optimism :) Looking good.16-Sep-06 16:21
377Gabrielethis also means that you can have a table inside a table cell - not tested yet, but maybe it works. ;)16-Sep-06 13:53
376Gabrieleupdate: added embedded tables (i.e. tables between paragraphs)16-Sep-06 13:52
375Gabrielehttp://www.colellachiara.com/soft/PDFM216-Sep-06 8:17
374LouisCurrently only English. But I'm needing to print Greek, Indonesian, and English mixed on the same page. Also, Hebrew, Indonesian, English on the same page. To be more specific, a line of Greek, then a line of Indonesian, then a line of English, then back to a line of Greek, and so on.16-Sep-06 6:14
373?Louis, what is your input lanaguge for PDFMaker?16-Sep-06 6:03
372LouisFor whatever it is worth, Gabriele, I use PDF-Maker regularly. It is core to some of my most important scripts. So, I very much appreciate your work.16-Sep-06 5:55
371LouisSomehow I lost the link to the PDF-Maker test site. Would someone please post it.16-Sep-06 5:53
370Gabriele(the table dialect is still very basic, just for testing. table layout seems to work well, uses the total-fit algorithm and should create optimal layouts in most usual cases. there are boundary cases where it can fail, but i hope we won't need to worry about them. check test.pdf for an example of a table.)15-Sep-06 15:41
369Gabrieleupdate: added preliminary table support.15-Sep-06 15:40
368?That was what I figured.11-Sep-06 21:40
367Gabriele(you can do almost everything with TeX by using tricks, but you basically need to layout the table manually. it is not able to do that automatically - something that we need to do instead.)11-Sep-06 20:34
366GabrieleAbout tables? TeX only handles very simple tables. Absolutely not enough to get QML tables there.11-Sep-06 20:33
365GeomolReichart, I'm still learning about TeX, but I'll guess, LaTeX to PDF take output from LaTeX (a TeX document) and convert it to the PDF format. To see output from LaTeX, you still need a TeX engine to view the document in the final form. Convert it to PDF, and you just need a PDF viewer.11-Sep-06 18:11
364?What do the current LaTeX to DPF programs do?11-Sep-06 15:53
363AntonCool, good luck.11-Sep-06 14:42
362Gabrieleok, i will think more about the problem (still hope to find some kind of nice solution), and see what others think too.11-Sep-06 14:40
361Anton(That's not to say people won't be looking for more complex interactions, but I think the simplest way solves most complaints the quickest.)11-Sep-06 14:40
360Gabriele(in some cases it doesn't, because it would require too much time, but the user decides this, by setting the tolerance)11-Sep-06 14:40
359AntonYes, I think it will be the easiest and simplest solution.11-Sep-06 14:39
358Gabrielethe algorithm produces the layout with the least total demerits.11-Sep-06 14:39
357Anton(Ok, so the algorithm looks for the lowest penalties first.)11-Sep-06 14:38
356Gabrielewhich is one possible solution.11-Sep-06 14:38
355Gabrielebasically you're saying: either you allow vertical alignment, or cell splitting.11-Sep-06 14:38
354Gabrielea paragraph of two lines already has a big penalty for being split. so generally it is kept together.11-Sep-06 14:37
353AntonI think that might be the simple answer, actually. It is only when the software makes a blunder with intelligent splitting that it becomes a problem. If the user can force a row to always remain together that would solve most of those problems.11-Sep-06 14:37
352Gabrielethat is possible using penalties.11-Sep-06 14:37
351Anton(or certain rows)11-Sep-06 14:35
350AntonPerhaps certain cells can be set to "never split" ?11-Sep-06 14:35
349AntonThat's not a nice problem. :-( I think if the user has some control of the variables (eg. maybe threshold), then they can influence what happens there.11-Sep-06 14:34
348AntonAs soon as you said that, I thought of a default threshold cell size which decides between splitting and moving to next page. And then this can be overridden by the user, who can move the threshold between 0% and 100%, 0% indicating always split, and 100% indicating always move.11-Sep-06 14:33

Return to Index Page