r3wp [groups: 83 posts: 189283]
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

World: r3wp

[PDF-Maker] discuss Gabriele's pdf-maker

Gabriele
12-May-2009
[626x2]
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 ?
Gabriele
23-Aug-2010
[663x2]
(re: demo pdf, it was mostly meant as a "test suite" so it uses most 
of the features)
i use nested blocks, so normally you don't need to reset
Graham
23-Aug-2010
[665]
no reset?
Gabriele
23-Aug-2010
[666]
can you make an example where you need "reset"?
Graham
23-Aug-2010
[667x2]
well, I have 4 blocks of text I want to move around...
or a graphic ( how do you include jpgs? )
Gabriele
23-Aug-2010
[669]
apply translation 10 10 [ ... translated stuff here ...]  ... no 
more translated outside block...
Graham
23-Aug-2010
[670]
if I always use 0x0 .. then I can just translate to where I want
Gabriele
23-Aug-2010
[671]
you can think of the ] as a "reset" if you wish
Graham
23-Aug-2010
[672]
so outside the [ ] .. you're back at 0x0 ?
Gabriele
23-Aug-2010
[673x2]
exactly. the transformations are only in effect inside the block.
they are "local"
Graham
23-Aug-2010
[675]
ahh... well, I just assumed it was like PS and View