You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@pdfbox.apache.org by Jesse Kuhnert <je...@everyonecounts.com> on 2016/03/16 22:23:01 UTC

pdfrenderer unicode characters in latest 2.1.0-SNAPSHOT ?

It appears as if the java2d font rendering logic in new 2.x versions missed
something with unicode support. I have pdfs being output wonderfully with
my sample unicode text (bengali in this case) but when we try to produce
images any glyphs we have which aren't english appear to just be rendered
as "blank" somehow. (meaning the spacing and line heights look like there
is ghost text taking up space there but maybe that's just our logic for
laying out pdf)

Has anyone else tried to produce unicode based pdf images yet ?

Re: pdfrenderer unicode characters in latest 2.1.0-SNAPSHOT ?

Posted by Jesse Kuhnert <je...@everyonecounts.com>.
I already un-subscribed so not sure this will get through but I resolved my
problem finally by first calling PDDocument.save() and then
PDDocument.load() on the saved pdf before attempting to render images.

Previously as last step before saving pdf we would render the images out.
I'm not sure if the image render would work if I just called .save() first
or not but I'm just happy it's working again.

On Wed, Mar 16, 2016 at 2:29 PM, Tilman Hausherr <TH...@t-online.de>
wrote:

> Am 16.03.2016 um 22:23 schrieb Jesse Kuhnert:
>
>> It appears as if the java2d font rendering logic in new 2.x versions
>> missed
>> something with unicode support. I have pdfs being output wonderfully with
>> my sample unicode text (bengali in this case) but when we try to produce
>> images any glyphs we have which aren't english appear to just be rendered
>> as "blank" somehow. (meaning the spacing and line heights look like there
>> is ghost text taking up space there but maybe that's just our logic for
>> laying out pdf)
>>
>> Has anyone else tried to produce unicode based pdf images yet ?
>>
>>
>
> I just tried to render the file created with the EmbeddedFonts example and
> it works fine.
>
> Tilman
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
> For additional commands, e-mail: users-help@pdfbox.apache.org
>
>

Re: pdfrenderer unicode characters in latest 2.1.0-SNAPSHOT ?

Posted by Tilman Hausherr <TH...@t-online.de>.
Am 16.03.2016 um 22:39 schrieb Jesse Kuhnert:
> Yeah that one worked fine for me too it just doesn't in the slightly more
> elaborate situation we are rendering stuff in . Though the actual pdf is
> rendered perfectly. Meh ok sorry I don't have a more definitive idea why it
> isn't working in our real product code vs smaller debug examples where it
> works fine. I'll file a bug report if I ever find anything .

Maybe the font is missing on the target server?

Tilman


>
> On Wednesday, March 16, 2016, Tilman Hausherr <TH...@t-online.de> wrote:
>
>> Am 16.03.2016 um 22:23 schrieb Jesse Kuhnert:
>>
>>> It appears as if the java2d font rendering logic in new 2.x versions
>>> missed
>>> something with unicode support. I have pdfs being output wonderfully with
>>> my sample unicode text (bengali in this case) but when we try to produce
>>> images any glyphs we have which aren't english appear to just be rendered
>>> as "blank" somehow. (meaning the spacing and line heights look like there
>>> is ghost text taking up space there but maybe that's just our logic for
>>> laying out pdf)
>>>
>>> Has anyone else tried to produce unicode based pdf images yet ?
>>>
>>>
>> I just tried to render the file created with the EmbeddedFonts example and
>> it works fine.
>>
>> Tilman
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
>> For additional commands, e-mail: users-help@pdfbox.apache.org
>>
>>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: users-help@pdfbox.apache.org


Re: pdfrenderer unicode characters in latest 2.1.0-SNAPSHOT ?

Posted by Jesse Kuhnert <je...@everyonecounts.com>.
Yeah that one worked fine for me too it just doesn't in the slightly more
elaborate situation we are rendering stuff in . Though the actual pdf is
rendered perfectly. Meh ok sorry I don't have a more definitive idea why it
isn't working in our real product code vs smaller debug examples where it
works fine. I'll file a bug report if I ever find anything .

On Wednesday, March 16, 2016, Tilman Hausherr <TH...@t-online.de> wrote:

> Am 16.03.2016 um 22:23 schrieb Jesse Kuhnert:
>
>> It appears as if the java2d font rendering logic in new 2.x versions
>> missed
>> something with unicode support. I have pdfs being output wonderfully with
>> my sample unicode text (bengali in this case) but when we try to produce
>> images any glyphs we have which aren't english appear to just be rendered
>> as "blank" somehow. (meaning the spacing and line heights look like there
>> is ghost text taking up space there but maybe that's just our logic for
>> laying out pdf)
>>
>> Has anyone else tried to produce unicode based pdf images yet ?
>>
>>
>
> I just tried to render the file created with the EmbeddedFonts example and
> it works fine.
>
> Tilman
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
> For additional commands, e-mail: users-help@pdfbox.apache.org
>
>

Re: pdfrenderer unicode characters in latest 2.1.0-SNAPSHOT ?

Posted by Tilman Hausherr <TH...@t-online.de>.
Am 16.03.2016 um 22:23 schrieb Jesse Kuhnert:
> It appears as if the java2d font rendering logic in new 2.x versions missed
> something with unicode support. I have pdfs being output wonderfully with
> my sample unicode text (bengali in this case) but when we try to produce
> images any glyphs we have which aren't english appear to just be rendered
> as "blank" somehow. (meaning the spacing and line heights look like there
> is ghost text taking up space there but maybe that's just our logic for
> laying out pdf)
>
> Has anyone else tried to produce unicode based pdf images yet ?
>


I just tried to render the file created with the EmbeddedFonts example 
and it works fine.

Tilman

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: users-help@pdfbox.apache.org


Re: pdfrenderer unicode characters in latest 2.1.0-SNAPSHOT ?

Posted by John Hewson <jo...@jahewson.com>.
> On 16 Mar 2016, at 14:23, Jesse Kuhnert <je...@everyonecounts.com> wrote:
> 
> It appears as if the java2d font rendering logic in new 2.x versions missed
> something with unicode support. I have pdfs being output wonderfully with
> my sample unicode text (bengali in this case) but when we try to produce
> images any glyphs we have which aren't english appear to just be rendered
> as "blank" somehow. (meaning the spacing and line heights look like there
> is ghost text taking up space there but maybe that's just our logic for
> laying out pdf)
> 
> Has anyone else tried to produce unicode based pdf images yet ?

We’ve not had any notable text rendering bugs in a while, can you send a
sample problem PDF?

— John
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: users-help@pdfbox.apache.org