World: r3wp
[PDF-Maker] discuss Gabriele's pdf-maker
older newer | first last |
Gabriele 12-May-2009 [613] | ie. solid box 128.128.128 should give you a gray bg (you need the coords like in the example above) |
Janko 12-May-2009 [614x2] | ok thanks! |
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? | |
Gabriele 12-May-2009 [616x3] | yes, that's very likely. |
i don't know how version support is these days, maybe it's worth upgrading to newer versions of the format. | |
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) | |
Janko 12-May-2009 [619] | 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) |
Gabriele 12-May-2009 [620x2] | the trailer needs to be redone |
did you do the change in the pdf maker code or in the file? | |
Janko 12-May-2009 [622x3] | 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) È |
so if that differences would work and exchange 200 with Ccaron it would all work | |
I will try more | |
Gabriele 12-May-2009 [625x3] | 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. |
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. | |
the easiest way would be to change the pdf-maker code to actually produce what you need. | |
Janko 12-May-2009 [628x4] | aha, thanks |
that might have caused the error before then .. | |
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 ? | |
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 | |
Oldes 12-May-2009 [632] | It's not possible to use utf8 encoding with pdf-maker ? |
Janko 12-May-2009 [633x2] | I think not, and it's not a simple problem to solve.. PDF looks very horrible in this regard to me |
I can't even make it support Latin2 | |
Oldes 12-May-2009 [635] | I wish to have more time to play a little bit with the pdf-maker |
Janko 12-May-2009 [636] | 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 |
Oldes 12-May-2009 [637] | Yes... I would need latin2 encoding as well. So I hope you will solve it before I would like to use it:) |
Janko 12-May-2009 [638] | 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 |
Gabriele 13-May-2009 [639x2] | the pdf reference documentation list all the characters in those fonts. you can download it from the adobe website. |
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. | |
Janko 13-May-2009 [641] | 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. |
Gabriele 15-May-2009 [642x2] | 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. |
Not sure when I'll be able to work on it though, so it's a good thing that you did the Haru binding. | |
Janko 15-May-2009 [644] | 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. |
Maxim 15-May-2009 [645] | IIRC adobe is notorious for implementing the worst file formats possible. |
Gabriele 16-May-2009 [646] | 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.) |
Janko 16-May-2009 [647] | A (worldwide) universal document format is really something where you would expect prime support for utf. |
Graham 22-Aug-2010 [648] | Gab, is there going to be any user documentation for pdf-maker 2? |
Gabriele 22-Aug-2010 [649] | 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. |
Graham 22-Aug-2010 [650] | just dictate it ! |
NickA 22-Aug-2010 [651] | I'd be happy to help with that too. |
Graham 22-Aug-2010 [652x4] | Nick, another tutorial! |
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. | |
First question, is the translation function also relative to 0x0 or to the latest 0x0 point? | |
always relative to absolute 0x0, or to the latest 0x0 set by the last translation? | |
Graham 23-Aug-2010 [656] | So, if we ask you questions we can build a manual from that? :) |
Gabriele 23-Aug-2010 [657x3] | transformations of any kind are always relative to the current coordinate system which is determined by "previous" transformations. |
so if you nest translations you get a translation with the sum of the two vectors. | |
(or you can think of all transformations as matrix multiplications, then everything becomes simple :) | |
Graham 23-Aug-2010 [660x3] | ok, like postscript ... |
so how to reset ?? | |
gsave grestore ? | |
older newer | first last |