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 7F3AA1877A for ; Thu, 10 Mar 2016 18:39:14 +0000 (UTC) Received: (qmail 93070 invoked by uid 500); 10 Mar 2016 18:39:14 -0000 Delivered-To: apmail-pdfbox-users-archive@pdfbox.apache.org Received: (qmail 93050 invoked by uid 500); 10 Mar 2016 18:39:13 -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 93038 invoked by uid 99); 10 Mar 2016 18:39:13 -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; Thu, 10 Mar 2016 18:39:13 +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 B2C81C23BE for ; Thu, 10 Mar 2016 18:39:12 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 0.08 X-Spam-Level: X-Spam-Status: No, score=0.08 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, KAM_ASCII_DIVIDERS=0.8, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01] autolearn=disabled Authentication-Results: spamd1-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=avaintec-com.20150623.gappssmtp.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 jZ593c_y36SN for ; Thu, 10 Mar 2016 18:39:11 +0000 (UTC) Received: from mail-lb0-f182.google.com (mail-lb0-f182.google.com [209.85.217.182]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id 8E80B5F1BE for ; Thu, 10 Mar 2016 18:39:10 +0000 (UTC) Received: by mail-lb0-f182.google.com with SMTP id xr8so119759363lbb.1 for ; Thu, 10 Mar 2016 10:39:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=avaintec-com.20150623.gappssmtp.com; s=20150623; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding; bh=72dJSjxtEES2OX6lHDiOHhLwlXVtFTQUEYthJDqxyxE=; b=S/WfH7O21RjW4Y5qdtiM4hzEEOwxWjCcuYN1ZLApA1syZjoF+t3Jvo7JQgZfuGu/AA ParXBbRvrCFhauiHZz5vqtJxp8vReREsxnQkBQZ9J2SVUVVnhKmJ/sOJFGKfVWMZaBrl d3OAuQ72+Kf0VZcDL3dYs2+UP/K0GtFnfJr7b6yCHFmKVrOteRHI1Iv7r1e/h3j3z6Li VuwoiHzch84mwREurB3EOjw/7fYqmzaU/4Byw93uWg1rMiVw+fPm6cvF5Zc4GJxI2aN0 tkhEWJ1mnBFl3uRx0rSODZtYCokrE/DwivvvWKgoqo1KUtzfEFw2xEGe9Iuv6/sMhwrH Nl/w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=72dJSjxtEES2OX6lHDiOHhLwlXVtFTQUEYthJDqxyxE=; b=fjfThs1Q4Xk/QZD4a+48LVNtub0kigIZiQU3M7yXNB6i+E1WxUqwyix4OGppkGyxCf 73R6CcvmddzoBF3faEedlFzOGRa0zyJ75sclmSBIlOqQQyD1troBQJbWrU9ei5/gcHXG 1OdJkPW5BIuc45EpQVE3fjhw/W13iPAW6wcWy/n85Fbq8BoiHCG7IFOK7m1OsEupeQRh t4UTFXOi7jm4ZqKVl0a2YTIEp/VPrs6Er44b0eXPTNMFGjh5RRjrZNwLsqbs5pHMefeU S89iIKsv0xBuFFD77XLYvDkWiW3bRqpo2Wm3siC9rzRZuMRkaCofAUVtNTGGapgM9HKr IEZA== X-Gm-Message-State: AD7BkJJn0YNxqxBnHK+ZoU1cmffDem2CNAYajAWwhNkzG8TwGzFGh6CeFlt5nS/OyNo0t/Fs X-Received: by 10.25.42.72 with SMTP id q69mr1827053lfq.101.1457635149532; Thu, 10 Mar 2016 10:39:09 -0800 (PST) Received: from [10.1.17.100] (94-199-115-14.metro.internet.fi. [94.199.115.14]) by smtp.gmail.com with ESMTPSA id d131sm716006lfg.27.2016.03.10.10.39.08 for (version=TLSv1/SSLv3 cipher=OTHER); Thu, 10 Mar 2016 10:39:08 -0800 (PST) Subject: Re: Overlaying PDFs > 1.4 fails & Hyperlinks are not clickable in overlays To: users@pdfbox.apache.org References: <56DD9E8A.3040207@avaintec.com> <56DDB823.9000209@t-online.de> <56E04594.8030200@avaintec.com> <56E0861E.2050309@t-online.de> From: Anna Taracha Message-ID: <56E1BF4D.7000608@avaintec.com> Date: Thu, 10 Mar 2016 20:39:09 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-Version: 1.0 In-Reply-To: <56E0861E.2050309@t-online.de> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable Hello! You can find the original PDF file and the overlay PDF file here: http://www.elisanet.fi/jakorasia/ANNA/doc.pdf (original PDF) http://www.elisanet.fi/jakorasia/ANNA/wm.pdf (overlay file) They both have XRef streams and do not have parameter errors (according=20 to 3-Heights=E2=84=A2 PDF Validator Online Tool). They are based on versi= on 1.5.=20 The result file has parameter error so something strange happens during=20 overlaying. As all the files are based on version 1.5, they should be=20 allowed to have XRef streams which was introduced in version 1.5.=20 Preflight can validate only PDF/A-1b which is based on version 1.4 so I=20 can't use it to validate PDFs 1.5 fully. However, your suggested code did the trick and now my PDF files are=20 valid. I guess there is something wrong with XRef stream after=20 overlaying. I will use your code as a workaround for now, so thank you=20 for it :) Yes, I was asking, if clickable hyperlinks in overlays will be possible=20 in a future release (you would create a similar feature that I did)? I=20 am just curious, if it is something that will/could be considered. -anna- On 09.03.2016 22:22, Tilman Hausherr wrote: > Am 09.03.2016 um 16:47 schrieb Anna Taracha: >> Result of PDFBox 2.0.0-RC3: >> >> http://www.elisanet.fi/jakorasia/ANNA/result-PDFBox2.pdf >> >> Result of PDFBox 1.8.11: >> >> http://www.elisanet.fi/jakorasia/ANNA/result-PDFBox18.pdf > > Here's what I get with PDF-Tools: > > 1.8: > Validating file "result-PDFBox18.pdf" for conformance level pdfa-1b > dc:language :: Wrong value type. Expected type 'bag'. > dc:date :: Wrong value type. Expected type 'seq'. > The required XMP property 'pdfaid:part' is missing. > The required XMP property 'pdfaid:conformance' is missing. > A device-specific color space (DeviceGray) without an appropriate=20 > output intent is used. > The document does not conform to the requested standard. > The document contains device-specific color spaces. > The document's meta data is either missing or inconsistent or corrupt. > Done. > > 2: > Validating file "result-PDFBox2.pdf" for conformance level pdfa-1b > The file contains cross reference streams. <=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > The file trailer dictionary is missing or invalid. <=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > dc:language :: Wrong value type. Expected type 'bag'. > dc:date :: Wrong value type. Expected type 'seq'. > The required XMP property 'pdfaid:part' is missing. > The required XMP property 'pdfaid:conformance' is missing. > A device-specific color space (DeviceGray) without an appropriate=20 > output intent is used. > The document does not conform to the requested standard. > The file format (header, trailer, objects, xref, streams) is corrupted.= > The document contains device-specific color spaces. > The document's meta data is either missing or inconsistent or corrupt. > Done. > > > > preflight has a similar error for 2.0 only: > 1.4 : Trailer Syntax error, /XRef cross reference streams are not allow= ed > > > Please try this before saving: > > doc.getDocument().setIsXRefStream(false); > COSDictionary trailer =3D doc.getDocument().getTrailer(); > trailer.removeItem(COSName.W); > trailer.removeItem(COSName.DECODE_PARMS); > trailer.removeItem(COSName.FILTER); > trailer.removeItem(COSName.TYPE); > trailer.removeItem(COSName.INDEX); > trailer.removeItem(COSName.LENGTH); > > > About your other question - it is unclear. Are you asking whether=20 > Overlay will be available in the future? Or do you want us to create a = > feature like the one you did on your own? > > Tilman >> >> -anna- >> >> On 07.03.2016 19:19, Tilman Hausherr wrote: >>> Could you upload two documents, one good and one bad? I'll have a=20 >>> look with PDFDebugger to find out what's wrong. >>> >>> Tilman >>> >>> Am 07.03.2016 um 16:30 schrieb Anna Taracha: >>>> Hi, >>>> >>>> I am having trouble overlaying PDFs of version 1.5 (or higher) when = >>>> using PDFBox 2.0.0-RC3. The result PDF has parameter error in it=20 >>>> according to 3-Heights=E2=84=A2 PDF Validator Online Tool. Overlayin= g PDFs=20 >>>> of version 1.4 (PDF 1.4, PDF/A-1a and PDF/A-1b) works fine. >>>> >>>> To reproduce: >>>> 1. Download pdfbox-app-2.0.0-RC3.jar >>>> 2. Overlay two PDF(/A) documents of version 1.5 (or higher) >>>> /- java -jar pdfbox-app-2.0.0-RC3.jar OverlayPDF doc.pdf wm.pdf=20 >>>> -position foreground result.pdf/ >>>> 3. Validate result.pdf with a PDF validator (I used 3-Heights=E2=84=A2= PDF=20 >>>> Validator Online Tool) >>>> >>>> The result of the validation is 'parameter error'. However,=20 >>>> overlaying the exact same PDFs using pdfbox-app-1.8.11.jar works=20 >>>> fine. Is there some regression in PDFBox 2.0.0-RC3 regarding=20 >>>> overlaying PDFs of version > 1.4? I tested OverlayPDF//with many=20 >>>> simple PDFs (version > 1.4) and all of them resulted in parameter=20 >>>> error when using PDFBox 2.0.0-RC3. >>>> >>>> I have also a question about making hyperlinks clickable in=20 >>>> overlays. I am able to do it by modifying Overlay.java but I was=20 >>>> wondering, if this feature will be available in some later release? >>>> >>>> Best regards, >>>> Anna >>>> >>> >>> >>> ---------------------------------------------------------------------= >>> 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 > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org For additional commands, e-mail: users-help@pdfbox.apache.org