Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 0354B200B48 for ; Mon, 18 Jul 2016 13:36:36 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 01E02160A87; Mon, 18 Jul 2016 11:36:36 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 23DF0160A6D for ; Mon, 18 Jul 2016 13:36:34 +0200 (CEST) Received: (qmail 82392 invoked by uid 500); 18 Jul 2016 11:36:34 -0000 Mailing-List: contact users-help@pdfbox.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@pdfbox.apache.org Delivered-To: mailing list users@pdfbox.apache.org Received: (qmail 82374 invoked by uid 99); 18 Jul 2016 11:36:33 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 18 Jul 2016 11:36:33 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 725E1CE14A for ; Mon, 18 Jul 2016 11:36:33 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.179 X-Spam-Level: * X-Spam-Status: No, score=1.179 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd1-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id 3ivMfs9AL3r1 for ; Mon, 18 Jul 2016 11:36:31 +0000 (UTC) Received: from mail-qk0-f169.google.com (mail-qk0-f169.google.com [209.85.220.169]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id 9D1AA5FBB9 for ; Mon, 18 Jul 2016 11:36:30 +0000 (UTC) Received: by mail-qk0-f169.google.com with SMTP id o67so153976813qke.1 for ; Mon, 18 Jul 2016 04:36:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=h08RXeY0bwRh3OAxKSIm28bJaQScPvfE2F6oXf0B5OI=; b=yeWOvOsorgTr0k5dekDoNTibrFoCSGilcNl7yW/rem7FFGQgeXXTkkapwP3gYL9qdM m09n4y4rlxjda1pzgsmBMRfIJM458cC+YpEaHdk0VIWxjXb9wy+4xqjwTJgjL3c2nHbT KbQhnOqjVqY7KI4pAL0W6fYUrxXWLUndeBCFaVV6f2zjbJQp+rdppTXoRuka2RNr9XI8 0nr3XAEO/oX1prpjSW1uADgWpCVqfIcdy0H4uBkiYMCzBjfuqh1lTA6QNkt0G0GLRIyp s9mfNLeAjTFFHh+GXGmZ8MAbLws5CAXqvR6+Qbsl8z7V4oyUDWESE3gP1jaYcldFUEZa u2fw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=h08RXeY0bwRh3OAxKSIm28bJaQScPvfE2F6oXf0B5OI=; b=bw0sD4BIhEJNHD2hRNF6SIoZ52D8HCT5zOpo5HeE78DIuMJF7g/kfTeS+kEAxh79gY R9pUX/esRuFrKaQDxYMYfVAePwrn4rmsj54KbarcrPLsOh9dFF4L/U0fcQNIMQEEsTfQ XuyhIZpxGESvBZZghq35dJMiFIzdJiS9Z5ZyG7th3FWqZiyejojTDToUBvT0k0hZjzRY QMNxhmtHvuc1bq01fdvZ6NXqWGvr5A3IB3yq2y7sN//cILG46yhyQlcG1s6boeY3urob 14esLilnSd5D79w9ftNFPGrMa8082I4q2C7I3V9FxzpOGrezZckAxlwsTs09faDqOH/2 wXWg== X-Gm-Message-State: ALyK8tKV97wruxgU+ZlBW1RmUxCIMunmR9wuTB7U7RM1GAgASh9WGIbL2np/Q5bqF/VUHDgVLGG6PxGD0DXvag== X-Received: by 10.55.4.133 with SMTP id 127mr44225066qke.207.1468841789444; Mon, 18 Jul 2016 04:36:29 -0700 (PDT) MIME-Version: 1.0 Received: by 10.55.84.7 with HTTP; Mon, 18 Jul 2016 04:36:28 -0700 (PDT) In-Reply-To: References: <7467cdd1-2834-5cfa-82da-e5f3eaaabc62@t-online.de> From: Lachezar Dobrev Date: Mon, 18 Jul 2016 14:36:28 +0300 Message-ID: Subject: Re: Bolding, enhancing fonts when converting to image. To: users@pdfbox.apache.org Content-Type: multipart/alternative; boundary=001a114c950c1755940537e7619e archived-at: Mon, 18 Jul 2016 11:36:36 -0000 --001a114c950c1755940537e7619e Content-Type: text/plain; charset=UTF-8 Sorry for the late response. The idea to try the bold font variants arose due to the fact that the parts of the label that had bold fonts looked fine as opposed to the regular variants. Anyway, the solution I went with was rendering the image at 1-to-1 (not up-scaled), but move the black-point for the grey pixels up to about 5/1, so that more pixels became black, which looks acceptable. I was unable to persuade our partners to return larger or bold fonts. 2016-06-30 18:29 GMT+03:00 John Hewson : > > > On 28 Jun 2016, at 08:36, Tilman Hausherr wrote: > > > > 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. > > You could but I suspect that bold fonts too are going to still suffer from > rendering problems at low DPI. > > -- John > > > 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 : > >> > >>>> 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 > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org > For additional commands, e-mail: users-help@pdfbox.apache.org > > --001a114c950c1755940537e7619e--