pdfbox-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tilman Hausherr <THaush...@t-online.de>
Subject Re: Bolding, enhancing fonts when converting to image.
Date Tue, 28 Jun 2016 15:36:55 GMT
I realize my answer from yesterday was possibly wrong, because a bold 
font may have different metrics (glyph sizes) than his non-bold 
counterpart. That would have to be checked first.

Now if all files come from the same sources and have the same structure, 
you could go through the font resources and change names like 
AAAAAD+DejaVuSans to AAAAAD+DejaVuSans-Bold.  Very dirty.

Tilman


Am 28.06.2016 um 14:06 schrieb Lachezar Dobrev:
>    I am not expecting anything to do with the library code changing.
>    I was hoping there is some bulk-font-change technique that I can do with
> the PDF after loading, so that text with normal font starts using the bold
> one. Like iterating the document tree and doing something with it before
> rendering the pages.
>
> 2016-06-27 19:39 GMT+03:00 Tilman Hausherr <THausherr@t-online.de>:
>
>> Am 27.06.2016 um 18:10 schrieb Lachezar Dobrev:
>>
>>>     Hey all,
>>>
>>>     I need to print PDFs to images to be forwarded to a low-resolution
>>> printer (200 dpi).
>>>     Printing works (Yay!), and the ability to specify colour space and
>>> resolution helps immensely.
>>>
>>>     When reading the PDFs I get these error messages:
>>>
>>> VI 27, 2016 5:53:39 PM org.apache.pdfbox.pdmodel.font.PDCIDFontType2Font
>>> getawtFont
>>> INFO: Can't read the embedded font AAAAAC+DejaVuSans-Bold
>>> VI 27, 2016 5:53:39 PM org.apache.pdfbox.pdmodel.font.PDCIDFontType2Font
>>> getawtFont
>>> INFO: Using font DejaVu Sans Bold instead
>>> VI 27, 2016 5:53:39 PM org.apache.pdfbox.pdmodel.font.PDCIDFontType2Font
>>> getawtFont
>>> INFO: Can't read the embedded font AAAAAD+DejaVuSans
>>> VI 27, 2016 5:53:39 PM org.apache.pdfbox.pdmodel.font.PDCIDFontType2Font
>>> getawtFont
>>> INFO: Using font DejaVu Sans instead
>>>
>>>     This looks like something I can live with (fonts being substituted),
>>> but
>>> I'm willing to work on that, since text is not Latin, and missing glyphs
>>> in
>>> system available fonts is a thing.
>>>
>>>
>>>     However due to the low resolution, the fact that the printer is
>>> Black-And-White (not Gray-Scale!) much of the text becomes grainy and
>>> disconnected (thin parts of the letters missing), making the text
>>> extremely
>>> hard to read.
>>>
>>>     Is there any way to make all fonts bold (or bold-er), so that the text
>>> (after being converted to black-and-white) would be easier to read when
>>> printed in low-resolution? I can not perform any post-rendering
>>> enhancements, because there are bar-codes in the printed content that
>>> become unreadable if smeared or thickened.
>>>
>>>     I'm fixed to using PDFBox 1.8.1 (that's what's available in the
>>> project).
>>>
>>> There's nothing that can be done in PDFBox, as you are bound to a version
>> (and I assume you can't modify it) and there is no feature like you
>> describe. You could replace the font in the font directory but this would
>> likely have sideeffects on other applications.
>>
>>
>> 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


Mime
View raw message