From users-return-10991-archive-asf-public=cust-asf.ponee.io@pdfbox.apache.org Fri Apr 27 13:59:55 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id 0561D180608 for ; Fri, 27 Apr 2018 13:59:54 +0200 (CEST) Received: (qmail 6103 invoked by uid 500); 27 Apr 2018 11:59:53 -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 6088 invoked by uid 99); 27 Apr 2018 11:59:53 -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; Fri, 27 Apr 2018 11:59:53 +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 BCDACCA9C5 for ; Fri, 27 Apr 2018 11:59:52 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 0.3 X-Spam-Level: X-Spam-Status: No, score=0.3 tagged_above=-999 required=6.31 tests=[KAM_LAZY_DOMAIN_SECURITY=1, RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id PQV1NdOdScEm for ; Fri, 27 Apr 2018 11:59:50 +0000 (UTC) Received: from www168.your-server.de (www168.your-server.de [213.133.104.168]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id 2FF3B5F3CC for ; Fri, 27 Apr 2018 11:59:49 +0000 (UTC) Received: from [78.46.172.3] (helo=sslproxy06.your-server.de) by www168.your-server.de with esmtpsa (TLSv1.2:DHE-RSA-AES256-GCM-SHA384:256) (Exim 4.89_1) (envelope-from ) id 1fC22P-0002U0-Sc for users@pdfbox.apache.org; Fri, 27 Apr 2018 13:59:42 +0200 Received: from [91.43.33.99] (helo=mbp001.fritz.box) by sslproxy06.your-server.de with esmtpsa (TLSv1.2:DHE-RSA-AES256-GCM-SHA384:256) (Exim 4.89) (envelope-from ) id 1fC22M-0003ZR-NI for users@pdfbox.apache.org; Fri, 27 Apr 2018 13:59:38 +0200 From: Maruan Sahyoun Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: Re: About the WinAnsiEncoding error Date: Fri, 27 Apr 2018 13:59:34 +0200 References: <2BA33A41-2D3B-49AB-8A96-1CAA23A73EB6@elanders.com> <3539966F-A717-4D5D-9740-FB01D6F4156B@elanders.com> To: users@pdfbox.apache.org In-Reply-To: Message-Id: <1AF90C80-49E7-478D-8C05-B26190818B1F@fileaffairs.de> X-Mailer: Apple Mail (2.3273) X-Authenticated-Sender: sahyoun@fileaffairs.de X-Virus-Scanned: Clear (ClamAV 0.99.4/24517/Fri Apr 27 06:24:46 2018) > Am 27.04.2018 um 13:44 schrieb Mickael Marrache = : >=20 > This is what I meant by Document Properties, but it only shows you the > fonts used by the document and tells if embedded or subset embedded, = but > nothing more. >=20 > I really don't understand why a PDF can be filled with Acrobat DC or = Reader > but not with PDFBOX. >=20 > Assuming the font is installed on the system (in my case Windows) and = is > not embedded, both Acrobat and PDFBOX should have access to the font = on > this system. PDFBox doesn't look for additional fonts if the font is embedded. It = simply tries to use the font which is part of the PDF. What happens if = the PDF is distributed to someone who doesn't have the font installed? = Could you share the PDF on a public location? As I don't have the font = installed I would be interested to try filling it with Adobe = Reader/Acrobat to see what might be used instead. BR Maruan >=20 > What information is missing to PDFBOX to properly set the value? >=20 > I'm aware of this issue since a year but can't find any information on = it. >=20 > On Fri, Apr 27, 2018 at 2:05 PM, Hartmann To=C3=ABl = > wrote: >=20 >> Hi, >>=20 >> I am not sure, but >>=20 >> https://helpx.adobe.com/acrobat/using/pdf-fonts.html >>=20 >> says >> File > Properties > Font tab >>=20 >> Does this help? >>=20 >>=20 >>=20 >> * m3 developer* >> Elanders Sverige AB >> Phone Switchboard: +46 31 750 00 00 >> Phone direct: +46 31 750 08 86 >> E-mail: toel.hartmann@elanders.com >> Homepage: www.elanders.se >>=20 >> On 27 apr 2018, at 10:56, Mickael Marrache = >> wrote: >>=20 >> Hi, >>=20 >> Do you know a way to cause it to fully embed the font? >>=20 >> Mickael >>=20 >> On Fri, Apr 27, 2018 at 11:46 AM, Hartmann To=C3=ABl < >> Toel.Hartmann@elanders.com> >> wrote: >>=20 >> Hi, >>=20 >> It seems Acrobat is only embedding the glyph used in your text as a >> subset, the complete font is not included. >>=20 >> Could that be the problem? >>=20 >> /To=C3=ABl >>=20 >>=20 >>=20 >>=20 >>=20 >> * m3 developer* >>=20 >> Elanders Sverige AB >> Phone Switchboard: +46 31 750 00 00 >> Phone direct: +46 31 750 08 86 >> E-mail: toel.hartmann@elanders.com >> Homepage: www.elanders.se >>=20 >> On 27 apr 2018, at 10:39, Mickael Marrache = >> wrote: >>=20 >> Hi, >>=20 >> I created a blank PDF with Acrobat Pro DC. I added one text field = with font >> David. I filled the text field using Acrobat so that it displays the = David >> font in the fonts section (in Document Properties window). Then, I = applied >> fixup "Embed missing fonts" via the Preflight menu. >>=20 >> When I look at the fonts list (in Document Properties), I can see the = David >> font with the following properties: >>=20 >> David (Embedded Subset) >> Type: TrueType (CID) >> Encoding: Identity-H >>=20 >> When I try to set a value containing Hebrew characters using PDF box, = I get >> the following error: >>=20 >> java.lang.IllegalArgumentException: U+05D0 is not available in this = font's >> encoding: WinAnsiEncoding >> at >> org.apache.pdfbox.pdmodel.font.PDTrueTypeFont.encode( >> PDTrueTypeFont.java:399) >> at org.apache.pdfbox.pdmodel.font.PDFont.encode(PDFont.java:323) >> at = org.apache.pdfbox.pdmodel.font.PDFont.getStringWidth(PDFont.java:352) >>=20 >> I already know the workaround of embedding a font before setting the = value >> but I'm trying to understand what is going on here. I understand the = Hebrew >> characters are not in the WinAnsiEncoding but why this encoding is = used at >> the first place? >>=20 >> Thanks, >> Mickael >>=20 >>=20 >>=20 >>=20 >>=20 --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org For additional commands, e-mail: users-help@pdfbox.apache.org