From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/96518 Path: news.gmane.org!.POSTED!not-for-mail From: Henri Menke Newsgroups: gmane.comp.tex.context Subject: Re: PDF/A generation Date: Thu, 13 Oct 2016 15:40:04 +0200 Message-ID: <3cbb4476-9ac5-0653-4d9c-7c84abbddb84@gmail.com> References: <1a41412f-26a1-1cb4-344a-b519486e9a12@gmail.com> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------D843F511AE6EDC9CC27D34E0" X-Trace: blaine.gmane.org 1476366058 356 195.159.176.226 (13 Oct 2016 13:40:58 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 13 Oct 2016 13:40:58 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0 To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Thu Oct 13 15:40:49 2016 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from zapf.boekplan.nl ([5.39.185.232] helo=zapf.ntg.nl) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bugFU-0006Kz-Hb for gctc-ntg-context-518@m.gmane.org; Thu, 13 Oct 2016 15:40:40 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id C6F931A377; Thu, 13 Oct 2016 15:40:23 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id c1yeBaHqqetC; Thu, 13 Oct 2016 15:40:20 +0200 (CEST) Original-Received: from zapf.ntg.nl (localhost [IPv6:::1]) by zapf.ntg.nl (Postfix) with ESMTP id 672FE1A7E8; Thu, 13 Oct 2016 15:40:20 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 875681A45F for ; Thu, 13 Oct 2016 15:40:19 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id qLw3A9KVpM63 for ; Thu, 13 Oct 2016 15:40:18 +0200 (CEST) Original-Received: from mail-lf0-f48.google.com (mail-lf0-f48.google.com [209.85.215.48]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by zapf.ntg.nl (Postfix) with ESMTPS id 8D8971A377 for ; Thu, 13 Oct 2016 15:40:08 +0200 (CEST) Original-Received: by mail-lf0-f48.google.com with SMTP id b81so134689060lfe.1 for ; Thu, 13 Oct 2016 06:40:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to; bh=VOFC6lZcXGwCDuDUbMUsE3lxVCkl+xbZWLKFTDSKgE0=; b=SiSHUZzfhJdCRvg0ZdcxsOxg/Z+LsmziI/Xyb18OJF+y/JVZXlVoWBB2x5jvpHCoDL vaf8l/mGtcpFNugN2jB4WeO4+0sv8lLaK8Tpq2gKhN88V6q9AiNiMgANCyVlWPt/i1KL hX8AHqapA/tDbHrtzB9BfjRZ1JvT/Bw0/tkOq8kmaABil2vNZ7bhX7gp/luZeCeXEgRQ 7M+rbs8Oc6Cc0TSkU/krYDRxIwiv5vH7LZ/EjwwPpIZczcp5UxUajuUgM8wZT8FDyjki dDuqPTxZaTDM8h/EiZNHfWGUMsTEtPZy0wavt+Vag4fJdYSmrvqfRiRgLaEg214A7P0R nC6g== 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; bh=VOFC6lZcXGwCDuDUbMUsE3lxVCkl+xbZWLKFTDSKgE0=; b=HuSXqopww15O2d0oVI47enjSzYgd5HNyC2hlPRrvoJLzBlfgEYyzOBrgyuhsY9Q6Nk ODR/qd2JeD0TJUR8wYT2+T0cxBEzaRjrZztSH3rgaYbdOLiv3CpLYE8HyXrZIgbhZdcc m+DsadIw+5aJtR1lRU6gC288RbsZKlFlJ8C/7sSeARXEYCb9dmn64mf2L6wkdzI6Ua0o URjHni1ZvoILxkh4cpLJ42lmrS7bDATXLxiOMWt9mSj/aAr9EklOJgIfiTbDMA5Zs3vq NZ115kIubxDeoTDOUTqGEh78E8LGbSZkC7zmvrGPYYShrLKQLtZBsWX9fGiI8c69DF9e 41BA== X-Gm-Message-State: AA6/9RkSYLWtR6m0pLPh45ji+78pg2l+KGupCDMyJeomcTc9uQID8h+/T/r0jCJPNFpK+w== X-Received: by 10.25.23.162 with SMTP id 34mr4421277lfx.20.1476366006373; Thu, 13 Oct 2016 06:40:06 -0700 (PDT) Original-Received: from [134.105.168.33] (th2pc23.fkf.mpg.de. [134.105.168.33]) by smtp.gmail.com with ESMTPSA id p76sm3844172lfd.11.2016.10.13.06.40.05 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 13 Oct 2016 06:40:05 -0700 (PDT) In-Reply-To: X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.16 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ntg-context-bounces@ntg.nl Original-Sender: "ntg-context" Xref: news.gmane.org gmane.comp.tex.context:96518 Archived-At: This is a multi-part message in MIME format. --------------D843F511AE6EDC9CC27D34E0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Dear Luigi, thanks for the link. I tried the validation with a little simplified example, which I show below. VeraPDF reports some errors, see attached `test-result.xml`. Unfortunately, VeraPDF cannot handle my production document and crashes during validation :( (see attached `production-result.xml`). Also, it seems that leaving out `intent` does not make any difference. Cheers, Henri --- \setupinteraction [ title=TITLE, subtitle=SUBTITLE, author=AUTHOR, keyword={KEYWORD1, KEYWORD2, KEYWORD3}, ] \setupbackend [ format={pdf/a-2a}, profile={default_cmyk.icc,default_rgb.icc,default_gray.icc}, ] \setupstructure[state=start,method=auto] \starttext \startchapter[title=Testing] \input knuth \stopchapter \stoptext On 10/13/2016 03:13 PM, luigi scarso wrote: > On Thu, Oct 13, 2016 at 3:03 PM, Henri Menke wrote: >> Dear list, (especially Luigi) >> >> for online publication I need to create a PDF/A compliant output file. Does anyone have any experience with it and can tell me whether my setup will work? So far I'm using >> >> \setupbackend >> [ >> format={pdf/a-2a}, >> profile={default_cmyk.icc,default_rgb.icc,default_gray.icc}, >> ] >> \setupstructure[state=start,method=auto] >> >> I chose PDF/A-2a because there I can have PDF 1.7 which keeps the file size down but I can also switch to PDF/A-1a. I have *no* external pixel graphics, just included PDFs which are also produced by ConTeXt with the same setup. >> >> Online I found Luigi's paper on PDF/A-1a [1]. However, even after reading I'm unsure whether `intent` is optional or required. >> >> Since I don't own Adobe Acrobat (nor am I using Windows) I cannot verify the resulting output. Does anyone know any working free or open-source tools for GNU/Linux to do this task? > Have a look at > http://verapdf.org/software/ > and test the file below with > $> verapdf -v -x -f 1a test.pdf > It should be ok > > The icc files default_cmyk.icc default_gray.icc default_rgb.icc are > from ghostscript, put them in the same directory of the test. > > > \nopdfcompression > \setupinteraction > [title=TITLE, > subtitle=SUBTITLE, > author=AUTHOR, > keyword={{KEYWORD1, KEYWORD2}, KEYWORD3}] > > %% For PDF/A > \setupbackend[ > format={pdf/a-1a:2005}, % or pdf/a-1a:2005 > profile={default_cmyk.icc,default_rgb.icc,default_gray.icc}, > intent=ISO coated v2 300\letterpercent\space (ECI)] > > %% Tagged PDF > %% method=auto ==> default tags by Adobe > \setupbackend[export=yes] > \setupstructure[state=start,method=auto] > > > \startchapter[title=Testing] > \startcolor[red] > \input knuth > \stopcolor > \input tufte > > \input knuth > > \placefigure[middle][fig:foo] > {This is an image} > {\externalfigure[cow.jpg]} > > \input tufte > > \stopchapter > > \stoptext > > I'm in a middle of something else now, I will look into it next days, > but you can play a bit and report problems. > --------------D843F511AE6EDC9CC27D34E0 Content-Type: text/xml; name="production-result.xml" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="production-result.xml" /home/user/document.pdf Could not finish validation. org.verapdf.core.ValidationException: Caught unexpected runtime exception during validation --------------D843F511AE6EDC9CC27D34E0 Content-Type: text/xml; name="test-result.xml" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="test-result.xml" /home/user/test.pdf PDF file is not compliant with Validation Profile requirements.
The document catalog dictionary shall include a MarkInfo dictionary containing an entry, Marked, whose value shall be true. CosDocument Marked == true root All properties specified in XMP form shall use either the predefined schemas defined in the XMP Specification, ISO 19005-1 or this part of ISO 19005, or any extension schemas that comply with 6.6.2.3.2. XMPProperty (isPredefinedInXMP2005 == true || isDefinedInMainPackage == true || isDefinedInCurrentPackage == true) && isValueTypeCorrect == true root/document[0]/metadata[0](20 0 obj PDMetadata)/XMPPackage[0]/Properties[18](http://ns.adobe.com/xap/1.0/mm/ - xmpMM:InstanceID) root/document[0]/metadata[0](20 0 obj PDMetadata)/XMPPackage[0]/Properties[17](http://ns.adobe.com/xap/1.0/mm/ - xmpMM:DocumentID) If the FontDescriptor dictionary of an embedded CID font contains a CIDSet stream, then it shall identify all CIDs which are present in the font program, regardless of whether a CID in the font is referenced or used by the PDF or not. PDCIDFont fontFile_size == 0 || CIDSet_size == 0 || cidSetListsAllGlyphs == true root/document[0]/pages[0](15 0 obj PDPage)/contentStream[0](16 0 obj PDContentStream)/operators[10]/font[0](XZVPND+LMRoman10-Regular)/DescendantFonts[0](XZVPND+LMRoman10-Regular) root/document[0]/pages[0](15 0 obj PDPage)/contentStream[0](16 0 obj PDContentStream)/operators[35]/font[0](HJUCGD+LMRoman12-Regular)/DescendantFonts[0](HJUCGD+LMRoman12-Regular) The logical structure of the conforming file shall be described by a structure hierarchy rooted in the StructTreeRoot entry of the document's Catalog dictionary, as described in ISO 32000-1:2008, 14.7. PDDocument StructTreeRoot_size == 1 root/document[0]
--------------D843F511AE6EDC9CC27D34E0 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX18KSWYgeW91ciBxdWVzdGlvbiBpcyBvZiBpbnRlcmVz dCB0byBvdGhlcnMgYXMgd2VsbCwgcGxlYXNlIGFkZCBhbiBlbnRyeSB0byB0aGUgV2lraSEKCm1h aWxsaXN0IDogbnRnLWNvbnRleHRAbnRnLm5sIC8gaHR0cDovL3d3dy5udGcubmwvbWFpbG1hbi9s aXN0aW5mby9udGctY29udGV4dAp3ZWJwYWdlICA6IGh0dHA6Ly93d3cucHJhZ21hLWFkZS5ubCAv IGh0dHA6Ly9jb250ZXh0LmFhbmhldC5uZXQKYXJjaGl2ZSAgOiBodHRwOi8vZm91bmRyeS5zdXBl bGVjLmZyL3Byb2plY3RzL2NvbnRleHRyZXYvCndpa2kgICAgIDogaHR0cDovL2NvbnRleHRnYXJk ZW4ubmV0Cl9fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f --------------D843F511AE6EDC9CC27D34E0--