# | User | Message | Date |
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 |
496 | Oldes | and which windows encoding? Maybe can janeks just set some flag or something which specifies his encoding in the file. | 3-Mar-07 10:35 |
495 | Oldes | really? I cannot believe that PDF is not able to be in unicode. What is adobe encoding? | 3-Mar-07 10:27 |
494 | Gabriele | the 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 |
493 | Janeks | Can 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 |
492 | Anton | Those 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 |
491 | Gabriele | there'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 |
490 | Anton | On 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 |
489 | Anton | You 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 |
488 | Gabriele | well, 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 |
487 | Anton | Hmm... | 25-Nov-06 4:45 |
486 | Anton | I was thnking of having pdf-maker as an output format for bubble-doc. | 25-Nov-06 4:44 |
485 | Anton | Ah, but I don't want to do it if you don't think it's a good idea. | 25-Nov-06 4:42 |
484 | Gabriele | note, 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 |
483 | Anton | I 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 |
482 | Gabriele | there'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 |
481 | Gabriele | still, 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 |
480 | Anton | With 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 |
479 | Anton | I 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 |
478 | Gabriele | the 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 |
477 | Gabriele | image 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 |
476 | Anton | Sorry, 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 |
475 | Gabriele | so 0 0 1 1 are reasonable defaults? hmm. | 23-Nov-06 9:52 |
474 | Anton | Aha... images are not compressed. Two images of 1.34 MB made a 67MB pdf ... Onward pdf-maker-2 ... :) | 23-Nov-06 8:37 |
473 | Anton | (5 changed lines.) | 23-Nov-06 8:25 |
472 | Anton | | '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 |
471 | Anton | Gabriele, 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 |
470 | Henrik | some 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 |
469 | Oldes | But maybe you are right. | 8-Oct-06 11:31 |
468 | Oldes | I 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 |
467 | Henrik | so you shouldn't hate PDF, but the viewer :-) | 8-Oct-06 11:30 |
466 | Oldes | Of course, PDF is the main format for everything on Mac:-) | 8-Oct-06 11:30 |
465 | Henrik | oldes, depends on the viewer. I use PDF's under OSX all the time. :-) | 8-Oct-06 11:28 |
464 | Oldes | It 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 all | 8-Oct-06 11:25 |
463 | james_nak | Maybe the acrobat driver wasn't running. In any case, nice work Gabriele. | 6-Oct-06 18:05 |
462 | Oldes | But it's working now, strange | 6-Oct-06 8:53 |
461 | Oldes | The link above just crashed my Firefox | 6-Oct-06 8:49 |
460 | Anton | Looks great. Good work. http://www.colellachiara.com/soft/PDFM2/test.pdf | 6-Oct-06 5:18 |
459 | Gabriele | ...done. last page of test.pdf. | 5-Oct-06 16:33 |
458 | Gabriele | :) it's uploading... | 5-Oct-06 16:32 |
457 | Anton | You want to show off your technology don't you ? :) | 5-Oct-06 16:24 |
456 | Gabriele | let me add one for you... | 5-Oct-06 16:23 |
455 | Anton | Ok. | 5-Oct-06 16:23 |
454 | Anton | .. but doesn't appear to be one. Maybe you could add it ? | 5-Oct-06 16:23 |
453 | Gabriele | it's not there, but the pdf-emitter for qml creates them :) | 5-Oct-06 16:22 |
452 | Anton | I'm looking for a definition-list example in the test document ... | 5-Oct-06 16:20 |
451 | Anton | Ah.. I have experienced this problem. That is a good improvement. | 5-Oct-06 16:19 |
450 | Gabriele | in 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 |
449 | Gabriele | i.e. the first column is forced to be very small by the second column having long text | 5-Oct-06 16:16 |
448 | Gabriele | what 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 lines | 5-Oct-06 16:16 |
447 | Gabriele | this means that the description is usually long, while the first column only has a word or two. | 5-Oct-06 16:15 |
446 | Gabriele | classic 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 |
445 | Anton | I see your embedded image. Very nice. Can you explain briefly how the column width calculation is better ? | 5-Oct-06 15:04 |
444 | Gabriele | update: changes to tables, now can calculate the column widths automatically. (it does so *much* better than web browsers.) | 4-Oct-06 17:09 |
443 | Gabriele | hmm, rereading the spec, it may work just putting the jpg file there. i will try that, eventually. :) | 29-Sep-06 17:50 |
442 | Gabriele | pdf 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 |
441 | Oldes | (I mean embedding images into the PDF, to make it clear, the format is different of course) | 29-Sep-06 15:46 |
440 | Oldes | Is the PDF format so different? SWF and PDF are now in the same stable = Adobe | 29-Sep-06 15:43 |
439 | Oldes | I'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 |
438 | Gabriele | thanks oldes, i'll probably ask you more when i get to this :) | 27-Sep-06 17:19 |
437 | Oldes | And 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 |
436 | Oldes | But it's Rebol?pro version (using a dll) http://oldes.multimedia.cz/rebol/zlib_latest.rip | 27-Sep-06 14:00 |
435 | Anton | Oldes 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 |
434 | Gabriele | i think compress is from zlib | 26-Sep-06 16:21 |
433 | Henrik | maybe a compression group would be in order... | 26-Sep-06 16:16 |
432 | Maxim | I 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 |
431 | Henrik | isn't the current compress, a gz compression lacking some headers? | 26-Sep-06 16:14 |
430 | Maxim | (and compress/TAR) | 26-Sep-06 16:12 |
429 | Maxim | yes! compress/RLA compress/ZIP compress/GZIP compress/JPEG compress/MP3 | 26-Sep-06 16:11 |
428 | Gabriele | i will eventually have a look at this... for now, i'm happy with them being uncompressed :) | 26-Sep-06 16:11 |
427 | Gabriele | also 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 |
426 | Henrik | it 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 |
425 | Maxim | (embed jpg file saved from rebol and converted to jpeg with image-magic) | 26-Sep-06 16:10 |
424 | Gabriele | max: sure but you still have to parse the resulting jpeg data | 26-Sep-06 16:10 |
423 | Maxim | you 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 |
422 | Gabriele | but i guess i'm not so lucky that compress is compatible... | 26-Sep-06 16:09 |
421 | Gabriele | if compress does work, that could be applied to everything else too, so the resulting file would be surely smaller. | 26-Sep-06 16:09 |
420 | Gabriele | one possibilty would be: pass jpg file name, not image!; parse jpeg file for jpeg data; embed jpeg data in the pdf | 26-Sep-06 16:08 |
419 | Henrik | would take minutes to compress anyway... | 26-Sep-06 16:07 |
418 | Gabriele | but jpg is nothing i want to write in rebol ;) | 26-Sep-06 16:07 |
417 | Gabriele | well... 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 |
416 | Henrik | I guess compression is hard to do? | 26-Sep-06 16:06 |
415 | Gabriele | nope. that's why it's big | 26-Sep-06 16:06 |
414 | Henrik | is the image of you compressed in some way? | 26-Sep-06 16:05 |
413 | Gabriele | i should add something instead of that box... maybe i should convert something from draw. | 26-Sep-06 16:05 |
412 | Gabriele | yes. not great gfx i know, but shows that it works ;) | 26-Sep-06 16:04 |
411 | Henrik | "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 |
410 | Gabriele | update: images; embedding gfx into text. (see last page of test.pdf) | 26-Sep-06 16:00 |
409 | Anton | Ah :) | 26-Sep-06 8:00 |
408 | Gabriele | circle: 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 |
407 | Gabriele | the 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 |
406 | Anton | I 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 |
405 | Gabriele | update: many bugfixes | 25-Sep-06 15:08 |
404 | Graham | Yes ... it is. But documentation seems lacking, and it appears to be deprecated by Adobe. | 24-Sep-06 23:33 |
403 | MichaelB | Isn'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 |
402 | Graham | Anyone know anything much about the FDF format? | 24-Sep-06 18:41 |
401 | Graham | Needs 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 |
399 | eFishAnt | Graham, thanks. | 21-Sep-06 20:28 |
398 | Graham | pdf2ps | 21-Sep-06 19:17 |
397 | eFishAnt | found 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 |
396 | eFishAnt | so I can load a .pdf and make a high res bitmap? | 21-Sep-06 16:58 |
395 | Alan | photoshop will strip out graphics files if thats what you need | 21-Sep-06 16:22 |
394 | eFishAnt | A way to convert content, especially graphic from .pdf to something useful. | 21-Sep-06 15:00 |
393 | eFishAnt | a 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 |
392 | Gabriele | you can just use any graphics for cells. for example QML can produce boxes with rounded corners and shadows. | 20-Sep-06 20:13 |
391 | Anton | Funny looking table borders ! :) | 20-Sep-06 15:33 |
390 | Anton | http://www.colellachiara.com/soft/PDFM2/test.pdf | 20-Sep-06 15:30 |
389 | Gabriele | see test.pdf | 19-Sep-06 16:07 |
388 | Gabriele | (cell decorations is a superset of table borders, cell background etc) | 19-Sep-06 16:07 |
387 | Gabriele | update: graphic commands, cell decorations | 19-Sep-06 16:05 |
386 | Gabriele | update: table options | 18-Sep-06 15:26 |
385 | Anton | Cool. Getting better. | 18-Sep-06 14:41 |
384 | Gabriele | i have tested table inside table cell, it works fine. (see test.pdf) | 18-Sep-06 11:39 |
383 | Gabriele | update: text colors, fixed table parsing bug | 18-Sep-06 11:38 |
382 | Gabriele | it'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 Maker | 18-Sep-06 3:56 |
380 | Gabriele | reichart, 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 |
378 | Anton | I like the cautious optimism :) Looking good. | 16-Sep-06 16:21 |
377 | Gabriele | this also means that you can have a table inside a table cell - not tested yet, but maybe it works. ;) | 16-Sep-06 13:53 |
376 | Gabriele | update: added embedded tables (i.e. tables between paragraphs) | 16-Sep-06 13:52 |
375 | Gabriele | http://www.colellachiara.com/soft/PDFM2 | 16-Sep-06 8:17 |
374 | Louis | Currently 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 |
372 | Louis | For 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 |
371 | Louis | Somehow I lost the link to the PDF-Maker test site. Would someone please post it. | 16-Sep-06 5:53 |
370 | Gabriele | (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 |
369 | Gabriele | update: added preliminary table support. | 15-Sep-06 15:40 |
368 | ? | That was what I figured. | 11-Sep-06 21:40 |
367 | Gabriele | (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 |
366 | Gabriele | About tables? TeX only handles very simple tables. Absolutely not enough to get QML tables there. | 11-Sep-06 20:33 |
365 | Geomol | Reichart, 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 |
363 | Anton | Cool, good luck. | 11-Sep-06 14:42 |
362 | Gabriele | ok, 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 |
361 | Anton | (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 |
360 | Gabriele | (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 |
359 | Anton | Yes, I think it will be the easiest and simplest solution. | 11-Sep-06 14:39 |
358 | Gabriele | the algorithm produces the layout with the least total demerits. | 11-Sep-06 14:39 |
357 | Anton | (Ok, so the algorithm looks for the lowest penalties first.) | 11-Sep-06 14:38 |
356 | Gabriele | which is one possible solution. | 11-Sep-06 14:38 |
355 | Gabriele | basically you're saying: either you allow vertical alignment, or cell splitting. | 11-Sep-06 14:38 |
354 | Gabriele | a paragraph of two lines already has a big penalty for being split. so generally it is kept together. | 11-Sep-06 14:37 |
353 | Anton | I 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 |
352 | Gabriele | that is possible using penalties. | 11-Sep-06 14:37 |
351 | Anton | (or certain rows) | 11-Sep-06 14:35 |
350 | Anton | Perhaps certain cells can be set to "never split" ? | 11-Sep-06 14:35 |
349 | Anton | That'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 |
348 | Anton | As 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 |