[SOLVED] problem with pdf plugin
-
soylentgreen
- Regular
- Posts: 28
- Joined: Sun Aug 20, 2006 2:54 pm
[SOLVED] problem with pdf plugin
hi,
i installed s9y with utf-8 charset. i would like to use the pdf-plugin from spartacus. but there seems to be a problem with the fonts whenever i choose updf / unicode support. the margin between the letters is quite big, so it would not fit on the page
if i disable unicode support, the text fits right, but some special characters seem to be broken...
is there an easy way to use smaller gabs between the letters in the updf plugin or to fix the broken chars?
i installed s9y with utf-8 charset. i would like to use the pdf-plugin from spartacus. but there seems to be a problem with the fonts whenever i choose updf / unicode support. the margin between the letters is quite big, so it would not fit on the page
if i disable unicode support, the text fits right, but some special characters seem to be broken...
is there an easy way to use smaller gabs between the letters in the updf plugin or to fix the broken chars?
Last edited by soylentgreen on Wed Sep 06, 2006 1:03 am, edited 1 time in total.
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Re: problem with pdf plugin
Hi!
Could you give us a URL to such a PDF that seems broken? Maybe one PDF with Unicode-support enabled, and one without, so that we can see both problems?
Regards,
Garvin
Could you give us a URL to such a PDF that seems broken? Maybe one PDF with Unicode-support enabled, and one without, so that we can see both problems?
Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
-
soylentgreen
- Regular
- Posts: 28
- Joined: Sun Aug 20, 2006 2:54 pm
-
soylentgreen
- Regular
- Posts: 28
- Joined: Sun Aug 20, 2006 2:54 pm
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Hi!
Hm. This seems to be a problem of the UFPDF library that we bundle; it uses special calcuations for string widths.
Since I only used the library and don't really know how it works itself, I'm left clueless. Maybe you could ask the authors of UFPDF if they know of to fix it? The file tells me that 'steven at acko dot net' is/was responsible for the file.
Without unicode the strings are not displayed properly, because FPDF does not support unicode. So this was the reason why UFPDF was used.
Best regards,
Garvin
Hm. This seems to be a problem of the UFPDF library that we bundle; it uses special calcuations for string widths.
Since I only used the library and don't really know how it works itself, I'm left clueless. Maybe you could ask the authors of UFPDF if they know of to fix it? The file tells me that 'steven at acko dot net' is/was responsible for the file.
Without unicode the strings are not displayed properly, because FPDF does not support unicode. So this was the reason why UFPDF was used.
Best regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
-
soylentgreen
- Regular
- Posts: 28
- Joined: Sun Aug 20, 2006 2:54 pm
akko.net says this:
could it be possible to convert the data from utf-8 to work in fpdf?
the problem seems to be well known but the workaround suggested there doesn't seem to work for me. neither is there a newer version than 0.1...Note: I wrote UFPDF as an experiment, not as a finished product. If you have problems using it, don't bug me for support. Patches are welcome though, but I don't have much time to maintain this.
could it be possible to convert the data from utf-8 to work in fpdf?
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Hi!
I suppose you could use "utf8_decode" everywhere in the blogpdf plugin where output is made to maintain your PDF in ISO-8859-1 charset. You could try that of course!
Best regards,
Garvin
I suppose you could use "utf8_decode" everywhere in the blogpdf plugin where output is made to maintain your PDF in ISO-8859-1 charset. You could try that of course!
Best regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
-
soylentgreen
- Regular
- Posts: 28
- Joined: Sun Aug 20, 2006 2:54 pm
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Hi!
Not really; utf8_decode only works with latin1 languages like german.
If ut8_decode were used on a russian charset, it would throw away half of the carhacters
Regards,
Garvin
Not really; utf8_decode only works with latin1 languages like german.
If ut8_decode were used on a russian charset, it would throw away half of the carhacters
Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
-
soylentgreen
- Regular
- Posts: 28
- Joined: Sun Aug 20, 2006 2:54 pm
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Hi!
But how would you detect if you are using a compatible or non-compatible language? All UTF-8 languages say they're UTF-8. We can't know if somebody only has latin characters, unless he explicitly tells us so.
So only another config option "use utf8_decode" would make sense. But then again, I'd prefer if someone could fixup ufpdf so that UTF-8 really works.
Best regards,
Garvin
But how would you detect if you are using a compatible or non-compatible language? All UTF-8 languages say they're UTF-8. We can't know if somebody only has latin characters, unless he explicitly tells us so.
So only another config option "use utf8_decode" would make sense. But then again, I'd prefer if someone could fixup ufpdf so that UTF-8 really works.
Best regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
-
soylentgreen
- Regular
- Posts: 28
- Joined: Sun Aug 20, 2006 2:54 pm
i have updated the plugin, if anyone is interested in the patch, message me and i will upload it to the public.
and i agree to you that a clean UTF-8 support would be much better, but the development of UFPDF didn't progress for almost two years now.
so this might be useful for all user that have a latin charset for the time being
and i agree to you that a clean UTF-8 support would be much better, but the development of UFPDF didn't progress for almost two years now.
so this might be useful for all user that have a latin charset for the time being
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Hi!
Soylentgreen: Your patch would be VERY appreciated, then I could officiall ypatch the plugin with it?
Deurk: Transforming HTML markup into PDF markup is a completely different world. It is next to impossible to convert an image with all its alignment options et al into the PDF.
Best regards,
Garvin
Soylentgreen: Your patch would be VERY appreciated, then I could officiall ypatch the plugin with it?
Deurk: Transforming HTML markup into PDF markup is a completely different world. It is next to impossible to convert an image with all its alignment options et al into the PDF.
Best regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/