
| # | User | Message | Date |
| 796 | Graham | PDF documentation a la Leonardo ? | 26-Aug-10 9:55 |
| 795 | Gabriele | ah, that's an interesting idea to try... | 26-Aug-10 9:54 |
| 794 | Graham | At least you don't use mirror writing | 26-Aug-10 9:54 |
| 793 | Graham | we don't ... you said you couldn't .. hence the questions :) | 26-Aug-10 9:53 |
| 792 | Gabriele | (but more importantly... why do you guys always expect me to do all the work? :P ) | 26-Aug-10 9:53 |
| 791 | Graham | text and bezier curves :) | 26-Aug-10 9:50 |
| 790 | Gabriele | well... the "tutorial" for v1 mostly works for v2 as well, as it only covers very basic functionality. | 26-Aug-10 9:47 |
| 789 | Graham | a lot of people managed to use V1 .. I've never seen anyone use V2 | 26-Aug-10 9:46 |
| 788 | Gabriele | I 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 |
| 787 | Graham | Hmm... quantively or qualitatively? | 26-Aug-10 9:46 |
| 786 | Gabriele | v1 had much less docs than v2 :-) | 26-Aug-10 9:45 |
| 785 | Graham | I should have a layout-pdf2 .... so I can use both | 26-Aug-10 9:36 |
| 784 | Graham | I'd suggest that perhaps this is because you never managed to write the user documentation! | 26-Aug-10 9:33 |
| 783 | Graham | so Cheyenne already had v1 loaded and didn't load v2 for me ! | 26-Aug-10 9:32 |
| 782 | Gabriele | v1 is very stable, v2 has never been exstensively tested. so it's not a easy choice i guess :) | 26-Aug-10 9:32 |
| 781 | Graham | I have this ... if not value? 'layout-pdf [ *do %pdf-maker.r ] | 26-Aug-10 9:31 |
| 780 | Graham | ah... I've been using V1 | 26-Aug-10 9:31 |
| 779 | Gabriele | v1 also does not evaluate arguments to dialect commands so you have to use compose etc. | 26-Aug-10 9:30 |
| 778 | Gabriele | no. 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 |
| 777 | Graham | so I got the silent fail | 26-Aug-10 9:30 |
| 776 | Graham | so this syntax doesn't work with pdf maker 1 ? | 26-Aug-10 9:29 |
| 775 | Gabriele | That 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 |
| 774 | Gabriele | b: 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 |
| 773 | Graham | got the image. | 26-Aug-10 9:27 |
| 772 | Graham | Ok, got it | 26-Aug-10 9:27 |
| 771 | Gabriele | v2 was done between 8-Aug-2006 and 17-Nov-2006 | 26-Aug-10 9:26 |
| 770 | Gabriele | http://www.colellachiara.com/soft/PDFM2/pdf-maker.html Gabriele Santilli <giesse@rebol.it> 17-Nov-2006, 2.34.0 | 26-Aug-10 9:25 |
| 769 | Graham | is that pdf-maker1 or 2 ? | 26-Aug-10 9:25 |
| 768 | Graham | Copyright (c) 2001-2005, Gabriele Santilli | 26-Aug-10 9:25 |
| 767 | Gabriele | you get xbl (X Bottom Left), ybl, xtr, ytr bound within the graphic block | 26-Aug-10 9:24 |
| 766 | Gabriele | right... i don't do a coordinate transformation, that's the reason for xbl and ybl in the above snippet | 26-Aug-10 9:24 |
| 765 | Graham | Interesting .. I get nothing | 26-Aug-10 9:23 |
| 764 | Gabriele | the image comes at the bottom though, which does not look correct, so I'm probably forgetting something... | 26-Aug-10 9:22 |
| 763 | Gabriele | this 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 |
| 762 | Gabriele | ah, wait, that was probably my fault... (yes, linux, i guess it should not segfault though) | 26-Aug-10 9:19 |
| 761 | Graham | of course | 26-Aug-10 9:19 |
| 760 | Graham | linux? | 26-Aug-10 9:18 |
| 759 | Gabriele | uh... 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 |
| 758 | Graham | similar justify with margins mrgns box iw lh 0 [ image xbl ybl - ih + lh iw ih img ] space 2 | 25-Aug-10 10:40 |
| 757 | Graham | append 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 |
| 756 | Graham | ok, trying again | 25-Aug-10 9:55 |
| 755 | Gabriele | depth 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 |
| 754 | Gabriele | box width height depth [...gfx commands...] | 25-Aug-10 9:14 |
| 753 | Gabriele | ah, sorry, box requires more args, checking... | 25-Aug-10 9:12 |
| 752 | Graham | there's no png there... | 24-Aug-10 8:50 |
| 751 | Graham | this 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 |
| 750 | Graham | When I use this command, I don't get an image, and my 13 page pdf stops at the first page | 24-Aug-10 8:48 |
| 749 | Gabriele | Unless there's a bug, that should work... | 24-Aug-10 8:44 |
| 748 | Graham | ok, I'll try it again .. just with the above I got an error about expecting an image so I added the compose | 24-Aug-10 8:35 |
| 747 | Gabriele | graphic 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 |
| 746 | Graham | I 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 |
| 745 | Gabriele | no. 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 |
| 744 | Graham | Is qtask using pdf-maker? | 23-Aug-10 9:21 |
| 743 | Graham | Carl should use pdf-maker to generate PDFs of the online docs | 23-Aug-10 9:20 |
| 742 | Gabriele | a 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 |
| 741 | Gabriele | you can use a vbox [ ... ] and put any graphic command inside it. | 23-Aug-10 9:15 |
| 740 | Graham | for a floating signature? | 23-Aug-10 9:14 |
| 739 | Gabriele | you can also just put the image below the text boxes in the page template in that case. | 23-Aug-10 9:11 |
| 738 | Gabriele | correct. | 23-Aug-10 9:11 |
| 737 | Graham | so if you were doing a watermark you don't alter the text margins | 23-Aug-10 9:10 |
| 736 | Gabriele | as 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 |
| 735 | Graham | ahh... ok | 23-Aug-10 9:07 |
| 734 | Gabriele | define-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 |
| 733 | Gabriele | ah, i think that is a custom function. you can define your own "functions" or "macros" within the dialect. | 23-Aug-10 9:07 |
| 732 | Graham | drop-image load %"Gabriele Fototessera small.jpg" | 23-Aug-10 9:06 |
| 731 | Gabriele | flowing 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 |
| 730 | Graham | drop-image? | 23-Aug-10 9:04 |
| 729 | Gabriele | you can have different templates for even and odd pages. | 23-Aug-10 9:04 |
| 728 | Graham | ok understood | 23-Aug-10 9:04 |
| 727 | Gabriele | so, 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 |
| 726 | Gabriele | the text stream is flown inside the columns. | 23-Aug-10 9:02 |
| 725 | Gabriele | book is the text stream. the block with the two textboxes is the template (two columns) | 23-Aug-10 9:02 |
| 724 | Graham | so book is the template? | 23-Aug-10 9:02 |
| 723 | Gabriele | i don't remember if page numbers are implemented or not | 23-Aug-10 9:01 |
| 722 | Gabriele | the template can include anything you wish, images, other text, etc. | 23-Aug-10 9:00 |
| 721 | Graham | so that means you must have headers and footers too? | 23-Aug-10 9:00 |
| 720 | Gabriele | which means: "create ANY number of pages, as necessary, using the following as the template for each page" | 23-Aug-10 8:59 |
| 719 | Gabriele | then, 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 |
| 718 | Gabriele | that is defined in the test-pdfm.r file where it says: text book [ .... ] | 23-Aug-10 8:58 |
| 717 | Gabriele | for example, see the text that starts at page 4 in the test.pdf file? | 23-Aug-10 8:56 |
| 716 | Graham | eg ? | 23-Aug-10 8:55 |
| 715 | Gabriele | what 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 |
| 714 | Graham | or, how does one flow text from one page to the next ? | 23-Aug-10 8:55 |
| 713 | Graham | so if text flow is automatic ... how do you know if the text overlows the box provided? | 23-Aug-10 8:54 |
| 712 | Gabriele | eg. "abc" kern 1 "def" | 23-Aug-10 8:54 |
| 711 | Gabriele | you can add manual kerning with the kern command | 23-Aug-10 8:53 |
| 710 | Gabriele | it is automatic. | 23-Aug-10 8:53 |
| 709 | Graham | kerning? | 23-Aug-10 8:53 |
| 708 | Gabriele | hyphens 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 |
| 707 | Gabriele | so if you have a dictionary, you can preprocess your text and just output that. | 23-Aug-10 8:52 |
| 706 | Gabriele | eg.: "This is an ex" -- "am" -- "ple" | 23-Aug-10 8:52 |
| 705 | Gabriele | you can define hyphenation points with -- | 23-Aug-10 8:51 |
| 704 | Gabriele | yes. | 23-Aug-10 8:51 |
| 703 | Graham | so does it just wrap on words? | 23-Aug-10 8:50 |
| 702 | Gabriele | no, you have to handle that. | 23-Aug-10 8:50 |
| 701 | Graham | do you have a hyphenation dictionary? | 23-Aug-10 8:50 |
| 700 | Gabriele | (you'll need a longer string to see it of course :) | 23-Aug-10 8:49 |
| 699 | Gabriele | yes, that is the default. | 23-Aug-10 8:49 |
| 698 | Graham | that does both left and right justification? | 23-Aug-10 8:49 |
| 697 | Gabriele | simplest form (default values used for everything): textbox [ "This is an example" ] | 23-Aug-10 8:48 |
| 696 | Graham | The question for tomorrow is .. how to get a block of text fully justified with microkerning | 23-Aug-10 8:43 |
| 695 | Graham | I think Nick has enough to start the tutorial :) | 23-Aug-10 8:41 |
| 694 | Graham | the other way it moves faster off the page | 23-Aug-10 8:40 |
| 693 | Gabriele | the x and y for images are there so that you don't have to use a translation each time :) | 23-Aug-10 8:40 |
| 692 | Graham | oh yeah ... | 23-Aug-10 8:39 |
| 691 | Gabriele | if so yes, but maybe you want 0 0 for the image origin? | 23-Aug-10 8:39 |
| 690 | Graham | translation :) | 23-Aug-10 8:39 |
| 689 | Gabriele | translation? | 23-Aug-10 8:38 |
| 688 | Gabriele | "transformation" = ? | 23-Aug-10 8:38 |
| 687 | Graham | so for i 1 100 10 [ apply transformation i i [ image i i w h load %file.jpg ] ] would work? | 23-Aug-10 8:38 |
| 686 | Gabriele | (if you need greater precision, you can probably find the exact conversion factor on google) | 23-Aug-10 8:37 |
| 685 | Graham | ok, great | 23-Aug-10 8:36 |
| 684 | Gabriele | i think one point is 0.35 mm, so apply scaling 0.35 0.35 [...points inside here...] should work | 23-Aug-10 8:36 |
| 683 | Graham | 72 points to an inch | 23-Aug-10 8:35 |
| 682 | Graham | can we use points instead then? | 23-Aug-10 8:35 |
| 681 | Gabriele | yes, unless you set transformations to use different units. | 23-Aug-10 8:35 |
| 680 | Graham | and all measurements are in mm ? | 23-Aug-10 8:34 |
| 679 | Gabriele | i 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 |
| 678 | Gabriele | image x y w h load %file.jpg | 23-Aug-10 8:33 |
| 677 | Gabriele | let me check the syntax for the image command... | 23-Aug-10 8:32 |
| 676 | Graham | so how to include a JPG? | 23-Aug-10 8:32 |
| 675 | Graham | ahh... well, I just assumed it was like PS and View | 23-Aug-10 8:32 |
| 674 | Gabriele | they are "local" | 23-Aug-10 8:31 |
| 673 | Gabriele | exactly. the transformations are only in effect inside the block. | 23-Aug-10 8:31 |
| 672 | Graham | so outside the [ ] .. you're back at 0x0 ? | 23-Aug-10 8:31 |
| 671 | Gabriele | you can think of the ] as a "reset" if you wish | 23-Aug-10 8:30 |
| 670 | Graham | if I always use 0x0 .. then I can just translate to where I want | 23-Aug-10 8:30 |
| 669 | Gabriele | apply translation 10 10 [ ... translated stuff here ...] ... no more translated outside block... | 23-Aug-10 8:29 |
| 668 | Graham | or a graphic ( how do you include jpgs? ) | 23-Aug-10 8:29 |
| 667 | Graham | well, I have 4 blocks of text I want to move around... | 23-Aug-10 8:29 |
| 666 | Gabriele | can you make an example where you need "reset"? | 23-Aug-10 8:28 |
| 665 | Graham | no reset? | 23-Aug-10 8:28 |
| 664 | Gabriele | i use nested blocks, so normally you don't need to reset | 23-Aug-10 8:27 |
| 663 | Gabriele | (re: demo pdf, it was mostly meant as a "test suite" so it uses most of the features) | 23-Aug-10 8:27 |
| 662 | Graham | gsave grestore ? | 23-Aug-10 8:27 |
| 661 | Graham | so how to reset ?? | 23-Aug-10 8:27 |
| 660 | Graham | ok, like postscript ... | 23-Aug-10 8:27 |
| 659 | Gabriele | (or you can think of all transformations as matrix multiplications, then everything becomes simple :) | 23-Aug-10 8:26 |
| 658 | Gabriele | so if you nest translations you get a translation with the sum of the two vectors. | 23-Aug-10 8:26 |
| 657 | Gabriele | transformations of any kind are always relative to the current coordinate system which is determined by "previous" transformations. | 23-Aug-10 8:25 |
| 656 | Graham | So, if we ask you questions we can build a manual from that? :) | 23-Aug-10 8:21 |
| 655 | Graham | always relative to absolute 0x0, or to the latest 0x0 set by the last translation? | 22-Aug-10 20:07 |
| 654 | Graham | First question, is the translation function also relative to 0x0 or to the latest 0x0 point? | 22-Aug-10 20:06 |
| 653 | Graham | I 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 |
| 652 | Graham | Nick, another tutorial! | 22-Aug-10 19:59 |
| 651 | NickA | I'd be happy to help with that too. | 22-Aug-10 18:53 |
| 650 | Graham | just dictate it ! | 22-Aug-10 10:22 |
| 649 | Gabriele | I 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 |
| 648 | Graham | Gab, is there going to be any user documentation for pdf-maker 2? | 22-Aug-10 10:09 |
| 647 | Janko | A (worldwide) universal document format is really something where you would expect prime support for utf. | 16-May-09 8:42 |
| 646 | Gabriele | Max, 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 |
| 645 | Maxim | IIRC adobe is notorious for implementing the worst file formats possible. | 15-May-09 18:49 |
| 644 | Janko | Yes, 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 |
| 643 | Gabriele | Not 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 |
| 642 | Gabriele | Janko, 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 |
| 641 | Janko | I 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 |
| 640 | Gabriele | let 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 |
| 639 | Gabriele | the pdf reference documentation list all the characters in those fonts. you can download it from the adobe website. | 13-May-09 8:49 |
| 638 | Janko | I 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 weeks | 12-May-09 15:40 |
| 637 | Oldes | Yes... 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 |
| 636 | Janko | it'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 already | 12-May-09 15:21 |
| 635 | Oldes | I wish to have more time to play a little bit with the pdf-maker | 12-May-09 15:16 |
| 634 | Janko | I can't even make it support Latin2 | 12-May-09 15:12 |
| 633 | Janko | I think not, and it's not a simple problem to solve.. PDF looks very horrible in this regard to me | 12-May-09 15:12 |
| 632 | Oldes | It's not possible to use utf8 encoding with pdf-maker ? | 12-May-09 14:32 |
| 631 | Janko | I 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 beast | 12-May-09 12:26 |
| 630 | Janko | do 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 |
| 629 | Janko | that might have caused the error before then .. | 12-May-09 10:47 |
| 628 | Janko | aha, thanks | 12-May-09 10:40 |
| 627 | Gabriele | the easiest way would be to change the pdf-maker code to actually produce what you need. | 12-May-09 10:40 |
| 626 | Gabriele | it'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 |
| 625 | Gabriele | changing 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 |
| 624 | Janko | I will try more | 12-May-09 10:38 |
| 623 | Janko | so if that differences would work and exchange 200 with Ccaron it would all work | 12-May-09 10:38 |
| 622 | Janko | in 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 |
| 621 | Gabriele | did you do the change in the pdf maker code or in the file? | 12-May-09 10:32 |
| 620 | Gabriele | the trailer needs to be redone | 12-May-09 10:32 |
| 619 | Janko | I 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 |
| 618 | Gabriele | you 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 |
| 617 | Gabriele | i 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 |
| 616 | Gabriele | yes, that's very likely. | 12-May-09 10:17 |
| 615 | Janko | do 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 |
| 614 | Janko | ok thanks! | 12-May-09 10:08 |
| 613 | Gabriele | ie. 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 |
| 612 | Janko | aha, I will look into that then, thanks for direction | 12-May-09 10:06 |
| 611 | Gabriele | but with a solid box instead | 12-May-09 10:05 |
| 610 | Gabriele | you need to do something like decor [box line width 0 xbl ybl xtr - xbl ytr - ybl] | 12-May-09 10:05 |
| 609 | Janko | ( but encoding is 100x bigger problem for me ) | 12-May-09 10:05 |
| 608 | Gabriele | if 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 |
| 607 | Janko | ( 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 |
| 606 | Janko | do 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 changes | 12-May-09 10:03 |
| 605 | Janko | yes, we just started to suspect that what you said about encoding | 12-May-09 10:03 |
| 604 | Gabriele | to do anything else font tricks are often being used. i wish they just had support for utf-8... | 12-May-09 10:02 |
| 603 | Gabriele | unfortunately 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 |
| 602 | Gabriele | non-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 |
| 601 | Janko | rule | 12-May-09 10:01 |
| 600 | Janko | uh, 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 rure | 12-May-09 10:01 |
| 599 | Gabriele | http://www.colellachiara.com/soft/PDFM2/pdf-maker.html#section-3.3 | 12-May-09 9:59 |
| 598 | Gabriele | (yes, beginning of cell block.) | 12-May-09 9:59 |
| 597 | Gabriele | what 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 |
| 596 | Gabriele | they are: Times-Roman, Times-Bold, Times-Italic, Times-BoldItalic, Helvetica, Helvetica-Bold, Helvetica-Oblique, Helvetica-Oblique, Courier, Courier-Bold, Courier-Oblique, Courier-BoldOblique, Symbol, ZapfDingbats | 12-May-09 9:57 |
| 595 | Janko | hi 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 |
| 594 | Gabriele | fonts: only the 14 standard pdf fonts are available. | 12-May-09 9:54 |
| 593 | Gabriele | you'll probably just use a box so it's much simpler. | 12-May-09 9:54 |
| 592 | Gabriele | table 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 |
| 591 | Gabriele | eg. from test-pdfm.r | 12-May-09 9:53 |
| 590 | Gabriele | the keyword is just "decor". | 12-May-09 9:53 |
| 589 | Janko | for 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 |
| 588 | Janko | Gabriele: 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 |
| 587 | Janko | This 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.pdf | 11-May-09 23:14 |
| 586 | Janko | I 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/row | 10-May-09 8:44 |
| 585 | Janko | I 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 pdf | 10-May-09 2:07 |
| 584 | Graham | I presume so ... I haven't looked at pdfm2 for years | 10-May-09 2:07 |
| 583 | Janko | you mean test.pdf ? | 10-May-09 2:06 |
| 582 | Graham | Isn't there an example with the distribution? | 10-May-09 2:05 |
| 581 | Janko | Hi, are there any simple examples to get started with PDFM2 ? | 10-May-09 0:57 |
| 580 | Gabriele | then, 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 |
| 579 | Gabriele | it'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 |
| 578 | Gabriele | kib, 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 |
| 577 | Henrik | it's probably better to go the tex->dvi->pdf route. | 14-Feb-09 11:26 |
| 576 | kib2 | I suppose it must be a hard task to implement math rendering, as they may be nested. | 14-Feb-09 10:06 |
| 575 | kib2 | Gabriele: 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 |
| 574 | Gabriele | I 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 |
| 573 | Gabriele | Define "alive". :-) | 14-Feb-09 9:32 |
| 572 | kib2 | Hi. 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 |
| 571 | amacleod | Looking 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 |
| 570 | Gabriele | depending on how the PDF file is built, extracting text and images could be trivial, or very difficult. | 18-Dec-08 10:09 |
| 569 | Graham | goodluck is all I can say. | 17-Dec-08 21:35 |
| 568 | amacleod | Are they not parsing out the image data? | 17-Dec-08 21:13 |
| 567 | amacleod | Graham, 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 |
| 566 | Robert | Doing this via a simple dialect would be very cool. Could become a nice tool. | 10-Dec-08 20:08 |
| 565 | Robert | Ok. 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 |
| 564 | Gabriele | Robert, I don't have any support for forms yet. | 10-Dec-08 8:41 |
| 563 | Graham | don't think so ... | 9-Dec-08 10:19 |
| 562 | Robert | Can PDF-Maker be used to create PDF-Forms that can be filled out by users with Acrobat Reader? | 9-Dec-08 8:20 |
| 561 | Graham | I ocr pdfs all the time .... because my scanner produces PDFs | 9-Dec-08 3:52 |
| 560 | Graham | if it's all grahphic ... eg. a scanned pdf .. then you need to ocr it. | 9-Dec-08 3:51 |
| 559 | Graham | unless the text is embedded in the pdf ... in which case there are utilties to pull it out. | 9-Dec-08 3:51 |
| 558 | Graham | You can't | 9-Dec-08 3:51 |
| 557 | amacleod | How 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 |
| 556 | Alan | . | 14-Sep-08 6:59 |
| 555 | Pavel | Reichart 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 |
| 554 | Reichart | Also, 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 |
| 553 | Reichart | Depends 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 |
| 552 | amacleod | Is a pdf file compressed or encrypted. Is there anyway to parse it? | 19-Apr-08 15:51 |
| 551 | Graham | no | 19-Apr-08 4:17 |
| 550 | amacleod | Is there any way to go from pdf to makedoc format? | 19-Apr-08 2:14 |
| 549 | Anton | There 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 |
| 548 | Rondon | Folks, I'm having a problem. How can I extract just the web links inside a pdf ? | 6-Mar-08 11:02 |
| 547 | Graham | unless it's one of those compressed pdf formats | 26-Jun-07 1:58 |
| 546 | Graham | postscript and pdf are similar formats and store images as either binary or as text. | 26-Jun-07 1:58 |
| 545 | btiffin | Well, I hacked it...and have no clue if what I did would work the next time :) | 26-Jun-07 1:20 |
| 544 | Chris | Ah, you got it... | 26-Jun-07 1:14 |
| 543 | Chris | Depends -- 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 |
| 542 | btiffin | It's a binary, but I've extracted it. Thanks for the hint. | 26-Jun-07 1:12 |
| 541 | Graham | :) | 26-Jun-07 1:02 |
| 540 | Graham | text editor | 26-Jun-07 1:02 |
| 539 | btiffin | Before 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 |
| 538 | DaveC | change = chance. | 7-Jun-07 18:42 |
| 537 | DaveC | Haven't had change to look at V2 yet. | 7-Jun-07 18:42 |
| 536 | DaveC | Busy 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 |
| 535 | Gabriele | i 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 |
| 534 | Joe | Gabriele, it would be nice to have a smaller PDF doc for v2, like you had for v1. Any chance ? | 2-Jun-07 11:54 |
| 533 | DaveC | Thanks, 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 |
| 532 | Gabriele | basically the above will render This is a test out of the visible area. | 31-May-07 19:21 |
| 531 | Gabriele | textbox default size is not dynamic, but static, so if you set a different page size you'll want to set a custom textbox size too | 31-May-07 19:21 |
| 530 | DaveC | The page does flip to landscape though. | 31-May-07 15:22 |
| 529 | DaveC | Umm. 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 |
| 528 | Gabriele | unless you need the advanced features in v2, yes. | 31-May-07 15:18 |
| 527 | DaveC | Got it thanks. Maybe I should stick the V1 for now then. | 31-May-07 15:17 |
| 526 | Gabriele | http://www.colellachiara.com/soft/PDFM2/ | 31-May-07 15:17 |
| 525 | Gabriele | note, 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 |
| 524 | DaveC | Can't see a link on that page to download the code. | 31-May-07 15:16 |
| 523 | DaveC | Let 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 |
| 522 | DaveC | I 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 |
| 521 | Gabriele | still looking for someone volunteering to write the user docs... :) | 31-May-07 15:11 |
| 520 | Gabriele | btw, version 2 is at http://www.colellachiara.com/soft/PDFM2/pdf-maker.html | 31-May-07 15:10 |
| 519 | Gabriele | also, 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 |
| 518 | Gabriele | 5th argument to render-pages is a function that is called to make the scheleton of each page. | 31-May-07 15:08 |
| 517 | DaveC | ok. | 31-May-07 15:06 |
| 516 | Gabriele | should be the latest 1.x version so you're fine. | 31-May-07 15:06 |
| 515 | DaveC | :-) | 31-May-07 15:06 |
| 514 | Gabriele | ah, right, that's the one with a few bugs fixed. | 31-May-07 15:05 |
| 513 | DaveC | pdf-maker: 1.27.1 3-Aug-2006 | 31-May-07 15:05 |
| 512 | DaveC | sorry, checking... | 31-May-07 15:04 |
| 511 | Gabriele | ah, 1.5.0 of pdf-tables. you should have 1.24.0 of pdf-maker | 31-May-07 15:04 |
| 510 | DaveC | in the header | 31-May-07 15:04 |
| 509 | DaveC | Yes, pdf-tables, date 24-Jul-2003 | 31-May-07 15:03 |
| 508 | Gabriele | really? of pdf-maker? | 31-May-07 15:02 |
| 507 | Gabriele | pdf-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 |
| 506 | DaveC | Version 1.5.0 | 31-May-07 15:02 |
| 505 | DaveC | hang on... | 31-May-07 15:02 |
| 504 | Gabriele | also, since you refer to pdf-tables, i assume you dowloaded version 1 | 31-May-07 15:01 |
| 503 | Gabriele | you may want to change the page size instead of rotating it. | 31-May-07 15:00 |
| 502 | DaveC | I'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 |
| 501 | Gabriele | so 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 OO | 4-Mar-07 9:39 |
| 500 | Gabriele | that 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 |
| 499 | Gabriele | openoffice, for example, creates n 256-character fonts instead. | 4-Mar-07 9:37 |
| 498 | Gabriele | to 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 |
| 497 | Gabriele | oldes: 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 |