From users-return-11510-archive-asf-public=cust-asf.ponee.io@pdfbox.apache.org Fri Mar 1 09:26:42 2019 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 4D54718076D for ; Fri, 1 Mar 2019 10:26:42 +0100 (CET) Received: (qmail 36478 invoked by uid 500); 1 Mar 2019 09:26:41 -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 36378 invoked by uid 99); 1 Mar 2019 09:26:40 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 01 Mar 2019 09:26:40 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id E2AEDC212C for ; Fri, 1 Mar 2019 09:26:39 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1 X-Spam-Level: * X-Spam-Status: No, score=1 tagged_above=-999 required=6.31 tests=[KAM_LAZY_DOMAIN_SECURITY=1, RCVD_IN_DNSWL_NONE=-0.0001] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id gxwvC_LWVOV7 for ; Fri, 1 Mar 2019 09:26:37 +0000 (UTC) Received: from mailout08.t-online.de (mailout08.t-online.de [194.25.134.20]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id 1001A5FB94 for ; Fri, 1 Mar 2019 09:26:37 +0000 (UTC) Received: from fwd37.aul.t-online.de (fwd37.aul.t-online.de [172.20.27.137]) by mailout08.t-online.de (Postfix) with SMTP id 0192441B6064 for ; Fri, 1 Mar 2019 10:26:35 +0100 (CET) Received: from [192.168.2.108] (r9UcyOZeohMQa3c6gRtYCd-neKO+y8jXQvjCEb1meCQHPWXB0mU3qwbhJmchqkLQ6o@[84.151.182.1]) by fwd37.t-online.de with (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384 encrypted) esmtp id 1gzeQy-1gsVVo0; Fri, 1 Mar 2019 10:26:24 +0100 Subject: Re: PDFBox 2.0.14 and JIRA-4437 - import stamp annotations from XFDF To: users@pdfbox.apache.org References: <1ab6958a898b406f8a0446e9e1d8e524@conclude.com> From: Tilman Hausherr Message-ID: <450dcf60-c8c6-9f95-aea6-494036679c0f@t-online.de> Date: Fri, 1 Mar 2019 10:26:23 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.5.2 MIME-Version: 1.0 In-Reply-To: <1ab6958a898b406f8a0446e9e1d8e524@conclude.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-ID: r9UcyOZeohMQa3c6gRtYCd-neKO+y8jXQvjCEb1meCQHPWXB0mU3qwbhJmchqkLQ6o X-TOI-MSGID: 7c0ae5f9-f2f8-4cdf-880b-1ee8edea2c9f Hi, Sorry about the problem. I'll investigate. I was able to reproduce it. From a first look, I suspect that the code doesn't consider all items in a COSDictionary, only all items in a COSStream, and so the shading dictionary is empty. We'll see what happens when these are added. I'll create an issue later and let you know. Tilman Am 01.03.2019 um 09:48 schrieb Kai Keggenhoff: > Hello, > > this morning I read about the release of 2.0.14 and when I noticed the entry for PDFBOX-4437, I was rather happy, because this was an issue for some of our users. > However, after putting 2.0.14 to the test, my enthusiam was curbed, because by all appearances, the situation became worse. > > https://www.dropbox.com/s/wzbyqjzua5zlk7k/lorem.zip?dl=0 > > Here I have provided four files with which I would like to demonstrate the problem. > > lorem_1.pdf : > > this is the original, unmodified PDF. > > lorem_2_with_upload_button_and_stamp.pdf : > > this is the PDF we deliver to the user. In the upper left corner is a button which will upload the annotations made by the user to our server. > In this case, it will upload the XFDF to a local address, which is not available outside my test scenario (and in the live enviroment, the button is more serious). > > I already added a stamp annotation with the picture of the word "Genehmigt" (German for "approved") > > lorem.xfdf : > > this is the XFDF uploaded to the server > > lorem_3_merged.pdf : > > this is the original PDF with the XFDF merged into it. > Opening this PDF with Adobe Acrobat Read DC produces the error message > > "There was an error processing an annotation or link. There was a problem reading this document (16)." > > The regular content is displayed normally though and the outline of the stamp can be seen if it's manually selected via the annotation list. > Merging the annotation with 2.0.13 produces no error message and a visible, but crossed out box for the stamp. > > Merging the annotation is done by : > > > 1. parsing the XFDF to a Document > 2. creating a FDFDocument object with the Document > 3. iterating over the list of FDFAnnotations obtained by FDFDocument.getCatalog().getFDF().getAnnotations() and adding each FDFAnnotation via PDPage.getAnnotations().add(FDFAnnotation) > > During this, 2.0.14 produces this console output : > > M�r 01, 2019 9:35:12 AM org.apache.pdfbox.pdmodel.fdf.FDFAnnotationStamp parseDictElement > WARNUNG: Group => NOT handling child element: BOOL > M�r 01, 2019 9:35:12 AM org.apache.pdfbox.pdmodel.fdf.FDFAnnotationStamp parseDictElement > WARNUNG: Group => NOT handling child element: BOOL > M�r 01, 2019 9:35:12 AM org.apache.pdfbox.pdmodel.fdf.FDFAnnotationStamp parseDictElement > WARNUNG: GS0 => NOT handling child element: BOOL > M�r 01, 2019 9:35:12 AM org.apache.pdfbox.pdmodel.fdf.FDFAnnotationStamp parseDictElement > WARNUNG: GS0 => NOT handling child element: FIXED > M�r 01, 2019 9:35:12 AM org.apache.pdfbox.pdmodel.fdf.FDFAnnotationStamp parseDictElement > WARNUNG: GS0 => NOT handling child element: FIXED > M�r 01, 2019 9:35:12 AM org.apache.pdfbox.pdmodel.fdf.FDFAnnotationStamp parseDictElement > WARNUNG: GS1 => NOT handling child element: BOOL > M�r 01, 2019 9:35:12 AM org.apache.pdfbox.pdmodel.fdf.FDFAnnotationStamp parseDictElement > WARNUNG: GS1 => NOT handling child element: INT > M�r 01, 2019 9:35:12 AM org.apache.pdfbox.pdmodel.fdf.FDFAnnotationStamp parseDictElement > WARNUNG: GS1 => NOT handling child element: INT > M�r 01, 2019 9:35:12 AM org.apache.pdfbox.pdmodel.fdf.FDFAnnotationStamp parseDictElement > WARNUNG: P0 => NOT handling child element: ARRAY > M�r 01, 2019 9:35:12 AM org.apache.pdfbox.pdmodel.fdf.FDFAnnotationStamp parseDictElement > WARNUNG: P0 => NOT handling child element: INT > M�r 01, 2019 9:35:12 AM org.apache.pdfbox.pdmodel.fdf.FDFAnnotationStamp parseDictElement > WARNUNG: Shading => NOT handling child element: ARRAY > M�r 01, 2019 9:35:12 AM org.apache.pdfbox.pdmodel.fdf.FDFAnnotationStamp parseDictElement > WARNUNG: Shading => NOT handling child element: ARRAY > M�r 01, 2019 9:35:12 AM org.apache.pdfbox.pdmodel.fdf.FDFAnnotationStamp parseDictElement > WARNUNG: Function => NOT handling child element: ARRAY > M�r 01, 2019 9:35:12 AM org.apache.pdfbox.pdmodel.fdf.FDFAnnotationStamp parseDictElement > WARNUNG: Function => NOT handling child element: ARRAY > M�r 01, 2019 9:35:12 AM org.apache.pdfbox.pdmodel.fdf.FDFAnnotationStamp parseDictElement > WARNUNG: Function => NOT handling child element: ARRAY > M�r 01, 2019 9:35:12 AM org.apache.pdfbox.pdmodel.fdf.FDFAnnotationStamp parseDictElement > WARNUNG: Function => NOT handling child element: INT > M�r 01, 2019 9:35:12 AM org.apache.pdfbox.pdmodel.fdf.FDFAnnotationStamp parseDictElement > WARNUNG: Function => NOT handling child element: ARRAY > M�r 01, 2019 9:35:12 AM org.apache.pdfbox.pdmodel.fdf.FDFAnnotationStamp parseDictElement > WARNUNG: Shading => NOT handling child element: INT > M�r 01, 2019 9:35:12 AM org.apache.pdfbox.pdmodel.fdf.FDFAnnotationStamp parseStreamElement > WARNUNG: N => Not handling element DATA encoding: ASCII > > Best regards, > > Kai Keggenhoff > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org For additional commands, e-mail: users-help@pdfbox.apache.org