From dev-return-61515-archive-asf-public=cust-asf.ponee.io@pdfbox.apache.org Fri Mar 1 09:58:06 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 B6D3A180647 for ; Fri, 1 Mar 2019 10:58:05 +0100 (CET) Received: (qmail 13956 invoked by uid 500); 1 Mar 2019 09:58:04 -0000 Mailing-List: contact dev-help@pdfbox.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@pdfbox.apache.org Delivered-To: mailing list dev@pdfbox.apache.org Received: (qmail 13945 invoked by uid 99); 1 Mar 2019 09:58:04 -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, 01 Mar 2019 09:58:04 +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 602E1C7B07 for ; Fri, 1 Mar 2019 09:58:03 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -110.301 X-Spam-Level: X-Spam-Status: No, score=-110.301 tagged_above=-999 required=6.31 tests=[ENV_AND_HDR_SPF_MATCH=-0.5, RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001, USER_IN_DEF_SPF_WL=-7.5, USER_IN_WHITELIST=-100] autolearn=disabled 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 wLzEVAFSTPdu for ; Fri, 1 Mar 2019 09:58:02 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id 01E5460E68 for ; Fri, 1 Mar 2019 09:58:02 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id BA251E2804 for ; Fri, 1 Mar 2019 09:58:00 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 28038256F1 for ; Fri, 1 Mar 2019 09:58:00 +0000 (UTC) Date: Fri, 1 Mar 2019 09:58:00 +0000 (UTC) From: "Tilman Hausherr (JIRA)" To: dev@pdfbox.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (PDFBOX-4478) Import XFDF stamp annotation has malformed appearance MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 Tilman Hausherr created PDFBOX-4478: --------------------------------------- Summary: Import XFDF stamp annotation has malformed appearance Key: PDFBOX-4478 URL: https://issues.apache.org/jira/browse/PDFBOX-4478 Project: PDFBox Issue Type: Bug Components: PDModel Affects Versions: 2.0.14 Reporter: Tilman Hausherr Attachments: lorem.xfdf, lorem_1.pdf, lorem_3_merged.pdf {code} File pdfFile = new File("lorem_1.pdf"); System.out.println("Load pdf into PDDocument: " + pdfFile); doc = PDDocument.load(pdfFile); System.out.println("Loaded pdf\n"); File xfdfFile = new File("lorem.xfdf"); System.out.println("\tLoad xfdf into FDFDocument: " + xfdfFile); fdf = FDFDocument.loadXFDF(xfdfFile); // Lookup with annotations exists List fdfAnnots = fdf.getCatalog().getFDF().getAnnotations(); // add each annotation in the xfdf into the document for (FDFAnnotation fdfAnnot : fdfAnnots) { PDPage page = doc.getPage(fdfAnnot.getPage()); List pageAnnots = page.getAnnotations(); annot = PDAnnotation.createAnnotation(fdfAnnot.getCOSObject()); annot.setLocked(true); pageAnnots.add(annot); } System.out.println("\tAdded into PDF"); fdf.close(); doc.save("C:\\Users\\Tilman\\Downloads\\lorem_stamp_markup.pdf"); {code} The result file doesn't open properly on Adobe Reader. The shading dictionary in the annotation is incomplete, and there are many warnings. The code in FDFAnnotationStamp.parseDictElement() is incomplete, possibly also the code in parseArrayElement. -- This message was sent by Atlassian JIRA (v7.6.3#76005) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org For additional commands, e-mail: dev-help@pdfbox.apache.org