Ken Sharp | 27 Jan 15:54 2016

Re: Converting to PDF/A using -dPDFACompatibilityPolicy=2 returns without error but produces invalid PDF/A files

At 14:36 27/01/2016 +0000, Simon Stratmann wrote:

>Of the 203 test files (I left out one with 10000 pages) all were processed 
>without Ghostscript aborting, although two gave out warnings during conversion.
>
>But 19 of the resulting files are not valid PDF/A (tested with PDFBox 
>Preflight 2.00 RC3 and veraPDF)

If you think you have found problems, please open bug report(s) but note 
that PDF/A validators are not without their own problems. Also if you start 
from a PDF it may not be possible to create a fully compliant PDF/A file, 
and it may not even be possible to tell that it isn't possible.

gs-devel is not an appropriate place to report bugs.

NB if you are going to open bugs then please *attach* the relevant file to 
the bug report, don't just put a URL in the report.

                     Ken
Simon Stratmann | 27 Jan 15:36 2016

Converting to PDF/A using -dPDFACompatibilityPolicy=2 returns without error but produces invalid PDF/A files

Hi,

 

it’s me again… To test the Ghostscript PDF/A conversion I downloaded the Isartor Test Suite from here: http://www.pdfa.org/2011/08/isartor-test-suite/

I converted all PDF files using the following command line:

 

gswin64c.exe -dPDFA=1 -dBATCH -dNOPAUSE -sProcessColorModel=DeviceRGB -dColorConversionStrategy=/DeviceRGB -dCompatibilityLevel=1.7 -sDEVICE=pdfwrite -dNOOUTERSAVE -dNumRenderingThreads=8 -dPDFACompatibilityPolicy=2 -sOutputFile=“%{outputfilepath}“ „%{inputfilepath}“ PDFA_def.ps

 

Of the 203 test files (I left out one with 10000 pages) all were processed without Ghostscript aborting, although two gave out warnings during conversion.

But 19 of the resulting files are not valid PDF/A (tested with PDFBox Preflight 2.00 RC3 and veraPDF)

 

Here are the names of the files and the reported PDF/A violations:

 

isartor-6-2-3-3-t01-fail-a.pdf

Invalid Color space, The operator "k" can't be used with RGB Profile

 

isartor-6-2-3-3-t03-fail-a.pdf

Invalid Color space, The operator "k" can't be used with RGB Profile

 

isartor-6-2-3-3-t03-fail-b.pdf

Invalid Color space, The operator "k" can't be used with RGB Profile

 

isartor-6-2-3-3-t03-fail-c.pdf

Invalid Color space, DestOutputProfile isn't CMYK ColorSpace

 

isartor-6-2-3-3-t03-fail-d.pdf

Invalid Color space, DestOutputProfile isn't CMYK ColorSpace

 

isartor-6-2-3-3-t03-fail-e.pdf

Invalid Color space, DestOutputProfile isn't CMYK ColorSpace

 

isartor-6-3-3-1-t01-fail-a.pdf

Invalid Font definition, TOQKJT+KozMinProVI-Regular: The CMap is a string but it isn't an Identity-H/V

 

isartor-6-3-3-1-t01-fail-b.pdf

Invalid Font definition, TOQKJT+KozMinProVI-Regular: The CMap is a string but it isn't an Identity-H/V

 

isartor-6-3-3-3-t01-fail-a.pdf

Invalid Font definition, TOQKJT+KozMinProVI-Regular: The CMap is a string but it isn't an Identity-H/V

 

isartor-6-3-3-3-t02-fail-a.pdf

Invalid Font definition, TOQKJT+KozMinProVI-Regular: The CMap is a string but it isn't an Identity-H/V

 

isartor-6-3-4-t01-fail-c.pdf

Invalid Font definition, EHBDGX+DroidSansFallback: The CMap is a string but it isn't an Identity-H/V

 

isartor-6-3-4-t01-fail-g.pdf

Font damaged, The encoding 'null' doesn't exist

 

isartor-6-3-5-t01-fail-a.pdf

Glyph error, The character code 5 in the font program "ASEWMI+AdobeMingStd-Light" is missing from the Character Encoding

 

isartor-6-3-5-t01-fail-b.pdf

Glyph error, The character code 1674 in the font program "DZRERX+ArialMT" is missing from the Character Encoding

 

isartor-6-3-5-t01-fail-d.pdf

Glyph error, The character code 36 in the font program "DWDNFL+ArialMT" is missing from the Character Encoding

 

isartor-6-5-3-t03-fail-b.pdf

Invalid Color space, The operator "K" can't be used with RGB Profile

 

isartor-6-5-3-t03-fail-d.pdf

Invalid Color space, The operator "K" can't be used with RGB Profile

 

isartor-6-6-1-t01-fail-a.pdf

Action is forbidden, The action Launch is forbidden

 

isartor-6-6-1-t02-fail-a.pdf

Action is forbidden, The action Launch is forbidden

 

That seem  to be seven different problems, probably in different versions.

 

I use the AdobeRGB1998 compatible ICC profile from http://www.freedesktop.org/wiki/OpenIcc/ and the „default“ PDFA_def.ps with output intent AdobeRGB1998.

 

I realize that some of the test files use somewhat obscure corner cases, but some like the „Launch“ action are a bit more common, I think. Even so, I’d expect Ghostscript to produce valid PDF/A (best case) or abort (worst case).

 

Thanks.

 

 

Kind Regards
--
Simon Stratmann
Manufacturing Execution Systems
Werum IT Solutions GmbH

Wulf-Werum-Strasse 3 | 21337 Lueneburg | Germany

Tel. +49 4131 8900-443 | Fax +49 4131 8900-20

simon.stratmann <at> werum.com | www.werum.com

Geschäftsführer / Managing Directors: Rüdiger Schlierenkämper, Richard Nagorny, Hans-Peter Subel
RG Lüneburg / Court of Jurisdiction: Lüneburg, Germany
Handelsregisternummer / Commercial Register: HRB 204984
USt.-IdNr. / VAT No.: DE 118 589 979

 

 

_______________________________________________
gs-devel mailing list
gs-devel <at> ghostscript.com
http://ghostscript.com/cgi-bin/mailman/listinfo/gs-devel
Ken Sharp | 27 Jan 09:44 2016

Fwd: AW: Possible (side) effects of using dPDFACompatibilityPolicy=1

Mail was sent privately, restoting to list archive.

>Hi Ken,
>
>yeah I get that, but for example there is this PDF I converted with links 
>and images.
>Ghostscript would say that links set to non-printing aren't allowed, so it 
>says this:
>
>GPL Ghostscript 9.18: Annotation set to non-printing,
>  not permitted in PDF/A, annotation will not be present in output file
>GPL Ghostscript 9.18: PDFA doesn't allow images with Interpolate true.
>
>The link text is kept but the links don't work. The images seem to be 
>still there, so I don't know what Ghostscript could've left out?
>
>For comparison I converted the same PDF with 3-Heights PDF/A converter and 
>it would keep the links intact - so the links itself aren't the problem 
>and could be left in.
>
>The point is, with PDFs which usually only contain text and images, could 
>I lose actual content or just metadata and stuff like links (if they were 
>in the PDF).
>
>Thanks,
>
>Simon
>
>-----Ursprüngliche Nachricht-----
>Von: Ken Sharp [mailto:ken.sharp <at> artifex.com]
>Gesendet: Mittwoch, 27. Januar 2016 09:28
>An: Simon Stratmann
>Cc: gs-devel <at> ghostscript.com
>Betreff: Re: [gs-devel] Possible (side) effects of using 
>dPDFACompatibilityPolicy=1
>
>At 06:51 27/01/2016 +0000, Simon Stratmann wrote:
>
>
> >So, could you please give me an idea on what features might be omitted?
>
>Anythign not permitted by the PDF/A specification.
>
>          Ken
Ken Sharp | 27 Jan 09:43 2016

Re: Possible (side) effects of using dPDFACompatibilityPolicy=1

At 08:35 27/01/2016 +0000, Simon Stratmann wrote:

>GPL Ghostscript 9.18: Annotation set to non-printing,
>  not permitted in PDF/A, annotation will not be present in output file
>GPL Ghostscript 9.18: PDFA doesn't allow images with Interpolate true.
>
>The link text is kept but the links don't work. The images seem to be 
>still there, so I don't know what Ghostscript could've left out?

I presume, but cannot say for certain without investigating the file, that 
it left out the link annotation (the *text* is not the same thing as the 
link) and it emitted the image without the /Interpolate flag being set.

>For comparison I converted the same PDF with 3-Heights PDF/A converter and 
>it would keep the links intact - so the links itself aren't the problem 
>and could be left in.

Not if they are set to non-printing. We could instead change them to 
'printing' but that isn't what Policy=1 does, it drops anything which is 
invalid.

>The point is, with PDFs which usually only contain text and images, could 
>I lose actual content or just metadata and stuff like links (if they were 
>in the PDF).

And I'm not going to guarantee you anything. Check the spec, anything which 
is  not permitted in a given level of PDF/A will be dropped from the output 
if you set the Policy to 1 (exception; we render transparency to an image 
for PDF/A-1).

Its up to you to decide whether that is acceptable to you.

                     Ken
Ken Sharp | 27 Jan 09:27 2016

Re: Possible (side) effects of using dPDFACompatibilityPolicy=1

At 06:51 27/01/2016 +0000, Simon Stratmann wrote:

>So, could you please give me an idea on what features might be omitted?

Anythign not permitted by the PDF/A specification.

         Ken
Simon Stratmann | 27 Jan 07:51 2016

Possible (side) effects of using dPDFACompatibilityPolicy=1

Hi,

 

I already read the documentation and http://ghostscript.com/pipermail/gs-devel/2011-May/008975.html but it’s still unclear to me which effects this might have.

I tested this flag with a PDF with links which were omitted while the link text was still included. I can live with any metadata or links going lost. I just want to make sure that I won’t lose actual content (text or images or something like that). Unfortunately I cannot check every PDF I converted to PDF/A.

 

The full command I use is this:

gswin64c.exe -dPDFA=2 -dBATCH -dNOPAUSE -sProcessColorModel=DeviceRGB -dColorConversionStrategy=/DeviceRGB -dCompatibilityLevel=1.7 -sDEVICE=pdfwrite -dNOOUTERSAVE -dNumRenderingThreads=8 -dPDFACompatibilityPolicy=1 -sOutputFile="output.pdf" "input.pdf" PDFA_def.ps

 

So, could you please give me an idea on what „features“ might be omitted?

 

Thanks so much.

 

 

--
Simon Stratmann
Manufacturing Execution Systems
Werum IT Solutions GmbH

Wulf-Werum-Strasse 3 | 21337 Lueneburg | Germany

Tel. +49 4131 8900-443 | Fax +49 4131 8900-20

simon.stratmann <at> werum.com | www.werum.com

Geschäftsführer / Managing Directors: Rüdiger Schlierenkämper, Richard Nagorny, Hans-Peter Subel
RG Lüneburg / Court of Jurisdiction: Lüneburg, Germany
Handelsregisternummer / Commercial Register: HRB 204984
USt.-IdNr. / VAT No.: DE 118 589 979

 

_______________________________________________
gs-devel mailing list
gs-devel <at> ghostscript.com
http://ghostscript.com/cgi-bin/mailman/listinfo/gs-devel
Ken Sharp | 26 Jan 20:06 2016

Re: Missing "DecodeParms" in pdf info

At 10:03 26/01/2016 -0800, Rajesh Khan wrote:

>Any suggestions on what this parameter does ?

I would suggest you read the PDF Reference Manual for a complete and 
accurate description.

>  Why does Adobe pdfs have this parameter while ghostscript generated pdfs 
> dont.Â

Because the Ghostscript ones don't require it I would imagine, its 
impossible to say for certain without seeing an example. It is *NOT* a 
required parameter so its absence is not an error.
Rajesh Khan | 26 Jan 19:03 2016
Picon

Missing "DecodeParms" in pdf info

Hello , I am currently facing an issue with pdf files generated from ghostscript from ps files.
The pdf file displays correctly when displayed. However our case is an exception we are using pdfium library to parse the contents of the pdf.I have noticed that pdfs generated by ghostscript do not have "DecodeParams" in them however pdf generated with Adobe distiller do.
Any suggestions on what this parameter does ? Why does Adobe pdfs have this parameter while ghostscript generated pdfs dont. 
 

CPDF_Object* pParams =
      pDict ? pDict->GetElementValue(FX_BSTRC("DecodeParms")) : NULL;

Any suggestions would be helpful.
_______________________________________________
gs-devel mailing list
gs-devel <at> ghostscript.com
http://ghostscript.com/cgi-bin/mailman/listinfo/gs-devel
Brian Norris | 8 Jan 21:42 2016
Picon

[PATCH] Fix typo in cross-compilation documentation

---
I'm not sure if this is the right place to send this for the ghostscript
project, but here goes nothing...

 doc/Make.htm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/doc/Make.htm b/doc/Make.htm
index a346febba913..bda001b0da0a 100644
--- a/doc/Make.htm
+++ b/doc/Make.htm
 <at>  <at>  -776,7 +776,7  <at>  <at>  Cross-compiling is not fully supported by the <code>configure</code> script (suc
 support is a work-in-progress).
 <p>
 You can either use <code>base/unixansi.mak</code> or <code>unix-gcc.mak</code>
-as the basis for a cross-compile makefile, or use <code>ocnfigure</code> to
+as the basis for a cross-compile makefile, or use <code>configure</code> to
 create a basic <code>Makefile</code> as the basis. And modify to suit.
 <p>
 You can set the compiler to your cross-compiler for <code>configure</code> by doing:
--

-- 
2.6.0.rc2.230.g3dd15c0
Giacomo Boccardo | 1 Dec 14:44 2015
Picon
Gravatar

PDF to TIFF hash - Avoid date/time reference

Hi,
    I'm using Ghostscript to extract pages' images from a PDF using a
command like:

gs -dQUIET -dNOPAUSE -dBATCH -dSAFER -dFirstPage=1 -dLastPage=1
-dBandHeight=100 -dNOPAUSE -sDEVICE=tiff12nc -r200
-dNumRenderingThreads=2 -dBandBufferSpace=500000000
-dBufferSpace=750000000 -sBandListStorage=memory -sOutputFile=page1.tiff
input.pdf

For caching purposes I need that the hash of each tiff must be the same
if it's produced from the same page. Unfortunately, I noticed that a
date/time reference is added at the "beginning" (prolog?) of each file.
That's the only thing that alters the hash: if you produce images in the
same second, the hash is the same.

So, is it possible to avoid to add that time reference?
If it's not possible, is there a way to test if two tiffs have the same
"appearance", without considering the metadata?

I suppose the last chance is to change the source code and recompile it :)

Thanks,
    Giacomo Boccardo
Paul Wessel | 15 Nov 04:34 2015

Missing files in distribution

I am interested in building the OS X Framework for ghostscript under El Capitan.  However, your
instructions of use base/macosx.mak as the top-level makefile and run “make framework” fails
because key files are missing:

Makefile:425: base/devs.mak: No such file or directory
Makefile:426: base/contrib.mak: No such file or directory
…
Makefile:430: base/macos-fw.mak: No such file or directory
make: *** No rule to make target `base/macos-fw.mak'.  Stop.

Clearly, the macos-fw.mak would be very relevant here.  However, I am able to build the shared library.  Can
the framework no longer be built?

Cheers, Paul Wessel

_______________________________________________
gs-devel mailing list
gs-devel <at> ghostscript.com
http://ghostscript.com/cgi-bin/mailman/listinfo/gs-devel

Gmane