Return-Path: X-Original-To: apmail-pdfbox-users-archive@www.apache.org Delivered-To: apmail-pdfbox-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 1021A18578 for ; Thu, 8 Oct 2015 14:36:09 +0000 (UTC) Received: (qmail 61732 invoked by uid 500); 8 Oct 2015 14:36:03 -0000 Delivered-To: apmail-pdfbox-users-archive@pdfbox.apache.org Received: (qmail 61710 invoked by uid 500); 8 Oct 2015 14:36:03 -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 61699 invoked by uid 99); 8 Oct 2015 14:36:03 -0000 Received: from Unknown (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 08 Oct 2015 14:36:03 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 2545F180E2B for ; Thu, 8 Oct 2015 14:36:03 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.801 X-Spam-Level: * X-Spam-Status: No, score=1.801 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, KAM_LAZY_DOMAIN_SECURITY=1, URIBL_BLOCKED=0.001] autolearn=disabled Received: from mx1-eu-west.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id qvjtcS3_s3OG for ; Thu, 8 Oct 2015 14:35:51 +0000 (UTC) Received: from www168.your-server.de (www168.your-server.de [213.133.104.168]) by mx1-eu-west.apache.org (ASF Mail Server at mx1-eu-west.apache.org) with ESMTPS id 34EAF28289 for ; Thu, 8 Oct 2015 14:35:50 +0000 (UTC) Received: from [88.198.220.132] (helo=sslproxy03.your-server.de) by www168.your-server.de with esmtpsa (TLSv1.2:DHE-RSA-AES256-GCM-SHA384:256) (Exim 4.80.1) (envelope-from ) id 1ZkCIP-00065j-Tl for users@pdfbox.apache.org; Thu, 08 Oct 2015 16:35:49 +0200 Received: from [80.187.99.107] (helo=[10.20.77.151]) by sslproxy03.your-server.de with esmtpsa (TLSv1:DHE-RSA-AES256-SHA:256) (Exim 4.84) (envelope-from ) id 1ZkCIH-0002Ws-2n for users@pdfbox.apache.org; Thu, 08 Oct 2015 16:35:46 +0200 Subject: Re: Weird issue with fonts in input fields after merging References: <982F8B5A-112E-4C13-85DD-4BE8028645D3@fileaffairs.de> From: Maruan Sahyoun Content-Type: text/plain; charset=utf-8 X-Mailer: iPhone Mail (13A452) In-Reply-To: Message-Id: <6BD41938-7782-4549-957D-B2737E29C35D@fileaffairs.de> Date: Thu, 8 Oct 2015 16:35:31 +0200 To: users@pdfbox.apache.org Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (1.0) X-Authenticated-Sender: sahyoun@fileaffairs.de X-Virus-Scanned: Clear (ClamAV 0.98.7/20956/Wed Oct 7 18:05:39 2015) Hi, > Am 08.10.2015 um 16:31 schrieb Johannes Barre : >=20 > Hello! >=20 > I just tried the 2.0 snapshot from yesterday and get this error: >=20 > org/apache/pdfbox/pdmodel/font/PDType1CFont.java:283:in `encode': > java.lang.UnsupportedOperationException: Not implemented: Type1C there is already a ticket for that. BR Maruan >=20 > Is that also true for 1.8.10 (just without the error) and could it be > related to the problem? >=20 > Greets, Johannes >=20 > PS: I've also pushed a Java version of my code to the gist. It's probably > as messy as my JRuby version, they're just experiments. >=20 > On Thu, Oct 8, 2015 at 3:41 PM, Johannes Barre > wrote: >=20 >> Hello Maruan! >>=20 >> Thank again. I hope my last answer didn't sounded too aggressive (written= >> communication is difficult). I'm grateful for any help! >>=20 >> You brought up a good point, as a Linux user I've only checked with Googl= e >> Chrome & xpdf (and I was referring to the xpdf). In the Acrobat Reader 9 >> (Linux) and XI (Win XP), the field values are not shown. So I got a new >> problem :'( >>=20 >> Greets, Johannes >>=20 >> On Thu, Oct 8, 2015 at 3:00 PM, Maruan Sahyoun >> wrote: >>=20 >>> Hi, >>>=20 >>>>> Am 08.10.2015 um 14:53 schrieb Johannes Barre < >>>> johannes.barre@billfront.com>: >>>>=20 >>>> Hello Maruan! >>>>=20 >>>> Thank you for your reply. >>>>=20 >>>> So, basically you say, the source PDFs aren't valid already? I've asked= >>> and >>>> they were created with Adobe InDesign, I would hope that Adobe knows >>> how to >>>> generate valid PDFs. :-/ >>>=20 >>> the PDFs are not invalid - that's not what I wanted to say. >>>=20 >>>> But even so, why is everything looking good when I just fill in the >>> fields >>>> without merging it? It has the same issue with the fonts name and I >>> filled >>>> the field with the same method. >>>=20 >>> when you say looking good - are you looking at it with Adobe Reader or >>> XPDF or =E2=80=A6. >>>=20 >>> I can have a more in-depth look tonight - my comments were about the >>> quick observations I made. >>>=20 >>> BR >>> Maruan >>>=20 >>>> Greets, Johannes >>>>=20 >>>> On Thu, Oct 8, 2015 at 2:35 PM, Maruan Sahyoun = >>>> wrote: >>>>=20 >>>>> Hi, >>>>>=20 >>>>>>> Am 08.10.2015 um 13:30 schrieb Johannes Barre < >>>>>> johannes.barre@billfront.com>: >>>>>>=20 >>>>>> Hello! >>>>>>=20 >>>>>> I have a weird issue. So, I have to PDFs. When I fill form fields in >>> one >>>>> of >>>>>> them and save, everything looks fine. However, when I append this >>> filled >>>>>> PDF to another one, xpdf doesn't display the values anymore and >>> complains >>>>>> about missing fonts: >>>>>>=20 >>>>>> Syntax Error: Unknown font tag 'ProximaNova-Regular' >>>>>> Syntax Error: Unknown font in field's DA string >>>>>> Syntax Error: Unknown font tag 'ProximaNova-Regular' >>>>>> Syntax Error: Unknown font in field's DA string >>>>>>=20 >>>>>> I'm using JRuby (9k), but I hope it's understandable for you. I put >>> the >>>>>> source & PDFs in this gist: >>>>>> https://gist.github.com/iGEL/a8484f0bc44b03fa9de1 (Will delete it >>> later, >>>>>> once the issue is solved) >>>>>>=20 >>>>>> Other specs: pdfbox-app-1.8.10, openjdk 1.8.0_66, Debian Jessy inside= >>> of >>>>>> Docker >>>>>>=20 >>>>>> As you can see, I use a special way to set the values. I had problems= >>>>> with >>>>>> German umlauts using setValue and it also sometimes fails (Possibly >>>>> related >>>>>> to https://issues.apache.org/jira/browse/PDFBOX-1550, the message is >>> the >>>>>> same as in that bug) >>>>>=20 >>>>> setting the field value directly using >>>>>=20 >>>>> form.getField(name).getDictionary.setItem( >>>>> Java::OrgApachePdfboxCos::COSName::V, >>>>> Java::OrgApachePdfboxCos::COSString.new(value) >>>>> ) >>>>>=20 >>>>> will not update the visual appearance of the filed and as a result the= >>>>> newly set value is not visible >>>>>=20 >>>>>=20 >>>>>> The COVER_PAGE.pdf and BIW_FORM.pdf are the templates I'm using, >>>>>> form_filled.pdf is just the BIW_FORM.pdf with 2 fields filled and >>> merged >>>>> is >>>>>> COVER_PAGE.pdf and form_filled.pdf merged together. >>>>>>=20 >>>>>> The p in line 15 and 22 print out the DA value of the field and it's >>> the >>>>>> same for both files: >>>>>>=20 >>>>>> "/ProximaNova-Regular 9 Tf 0.019 0.305 0.627 rg" # form_filled.pdf >>>>>> "/ProximaNova-Regular 9 Tf 0.019 0.305 0.627 rg" # merged.pdf >>>>>=20 >>>>> the font resource is called /ProximaNova-Regular but that's not in you= r >>>>> PDF as the font which is in your PDF is called >>> /MHGLSX+ProximaNova-Regular. >>>>> In addition the issue with a font subset is that only certain >>> characters >>>>> are part of that subset. As a result some of the characters you need t= o >>>>> display your field value might not be within the subset. >>>>>=20 >>>>> BR >>>>> Maruan >>>>>=20 >>>>>=20 >>>>>>=20 >>>>>> This font is according to pdffonts in both files: >>>>>>=20 >>>>>> $ pdffonts form_filled.pdf >>>>>> name type encoding >>>>> emb >>>>>> sub uni object ID >>>>>> ------------------------------------ ----------------- >>> ---------------- >>>>> --- >>>>>> --- --- --------- >>>>>> NPQRGV+ProximaNova-Light Type 1C Custom >>>>> yes >>>>>> yes yes 124 0 >>>>>> *MHGLSX+ProximaNova-Regular Type 1C WinAnsi >>>>>> yes yes yes 125 0* >>>>>> NPQRGV+ProximaNova-Bold Type 1C Custom >>>>> yes >>>>>> yes yes 126 0 >>>>>> MHGLSX+Facit-Bold Type 1C Custom >>>>> yes >>>>>> yes yes 127 0 >>>>>> NPQRGV+ProximaNova-Bold Type 1C WinAnsi >>>>> yes >>>>>> yes yes 218 0 >>>>>> NPQRGV+ProximaNova-Light Type 1C WinAnsi >>>>> yes >>>>>> yes yes 219 0 >>>>>> ProximaNova-Bold Type 1C (OT) Custom >>>>> yes >>>>>> no no 8 0 >>>>>> ProximaNova-Light Type 1C (OT) Custom >>>>> yes >>>>>> no no 9 0 >>>>>> NPQRGV+ProximaNova-Bold Type 1C WinAnsi >>>>> yes >>>>>> yes yes 251 0 >>>>>> NPQRGV+ProximaNova-Light Type 1C WinAnsi >>>>> yes >>>>>> yes yes 252 0 >>>>>> NPQRGV+ProximaNova-Bold Type 1C WinAnsi >>>>> yes >>>>>> yes yes 254 0 >>>>>> NPQRGV+ProximaNova-Light Type 1C WinAnsi >>>>> yes >>>>>> yes yes 255 0 >>>>>> FJORTL+ProximaNova-Light CID Type 0C Identity-H >>>>> yes >>>>>> yes yes 165 0 >>>>>> NPQRGV+ProximaNova-Bold Type 1C WinAnsi >>>>> yes >>>>>> yes yes 259 0 >>>>>> NPQRGV+ProximaNova-Light Type 1C WinAnsi >>>>> yes >>>>>> yes yes 260 0 >>>>>>=20 >>>>>> $pdffonts merged.pdf >>>>>> name type encoding >>>>> emb >>>>>> sub uni object ID >>>>>> ------------------------------------ ----------------- >>> ---------------- >>>>> --- >>>>>> --- --- --------- >>>>>> AYOVHV+Facit-Bold Type 1C Custom >>>>> yes >>>>>> yes yes 131 0 >>>>>> AYOVHV+ProximaNova-Bold Type 1C Custom >>>>> yes >>>>>> yes yes 132 0 >>>>>> AYOVHV+ProximaNova-Light Type 1C Custom >>>>> yes >>>>>> yes yes 133 0 >>>>>> AYOVHV+ProximaNova-Semibold Type 1C WinAnsi >>>>> yes >>>>>> yes yes 134 0 >>>>>> ProximaNova-Light Type 1C (OT) Custom >>>>> yes >>>>>> no no 9 0 >>>>>> AYOVHV+ProximaNova-Light Type 1C WinAnsi >>>>> yes >>>>>> yes no 192 0 >>>>>> AYOVHV+ProximaNova-Light Type 1C WinAnsi >>>>> yes >>>>>> yes no 193 0 >>>>>> NPQRGV+ProximaNova-Light Type 1C Custom >>>>> yes >>>>>> yes yes 275 0 >>>>>> *MHGLSX+ProximaNova-Regular Type 1C WinAnsi >>>>>> yes yes yes 276 0* >>>>>> NPQRGV+ProximaNova-Bold Type 1C Custom >>>>> yes >>>>>> yes yes 277 0 >>>>>> MHGLSX+Facit-Bold Type 1C Custom >>>>> yes >>>>>> yes yes 278 0 >>>>>> NPQRGV+ProximaNova-Bold Type 1C WinAnsi >>>>> yes >>>>>> yes yes 437 0 >>>>>> NPQRGV+ProximaNova-Light Type 1C WinAnsi >>>>> yes >>>>>> yes yes 438 0 >>>>>> ProximaNova-Bold Type 1C (OT) Custom >>>>> yes >>>>>> no no 462 0 >>>>>> ProximaNova-Light Type 1C (OT) Custom >>>>> yes >>>>>> no no 512 0 >>>>>> NPQRGV+ProximaNova-Bold Type 1C WinAnsi >>>>> yes >>>>>> yes yes 500 0 >>>>>> NPQRGV+ProximaNova-Light Type 1C WinAnsi >>>>> yes >>>>>> yes yes 501 0 >>>>>> NPQRGV+ProximaNova-Bold Type 1C WinAnsi >>>>> yes >>>>>> yes yes 503 0 >>>>>> NPQRGV+ProximaNova-Light Type 1C WinAnsi >>>>> yes >>>>>> yes yes 504 0 >>>>>> FJORTL+ProximaNova-Light CID Type 0C Identity-H >>>>> yes >>>>>> yes yes 377 0 >>>>>> NPQRGV+ProximaNova-Bold Type 1C WinAnsi >>>>> yes >>>>>> yes yes 451 0 >>>>>> NPQRGV+ProximaNova-Light Type 1C WinAnsi >>>>> yes >>>>>> yes yes 452 0 >>>>>>=20 >>>>>> Why are the field values not showing up and how can I fix that? >>>>>>=20 >>>>>> Thanks for your help! >>>>>>=20 >>>>>> Johannes >>>>>=20 >>>>>=20 >>>>> --------------------------------------------------------------------- >>>>> To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org >>>>> For additional commands, e-mail: users-help@pdfbox.apache.org >>>=20 >>>=20 >>> --------------------------------------------------------------------- >>> To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org >>> For additional commands, e-mail: users-help@pdfbox.apache.org >>=20 --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org For additional commands, e-mail: users-help@pdfbox.apache.org