Bug 690803 - PDF/A: endobj is missing EOL-Marker
Summary: PDF/A: endobj is missing EOL-Marker
Status: NOTIFIED WORKSFORME
Alias: None
Product: Ghostscript
Classification: Unclassified
Component: PDF Writer (show other bugs)
Version: 8.70
Hardware: PC Windows XP
: P4 normal
Assignee: Ken Sharp
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-10-05 05:33 UTC by T. Fischer
Modified: 2009-10-06 04:10 UTC (History)
0 users

See Also:
Customer:
Word Size: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description T. Fischer 2009-10-05 05:33:34 UTC
A Word document converted with Acrobat Pro 9.1.3 to PDF (without A) followed by
a PDF/A-Conversion with Ghostscript results in a number of errors:

- Syntax: Missing EOL after endobj
  German: Indirektes Objekt “endobj”-Schlüsselwort nicht nach “EOL”-Kennung
  Keine EOL-Kennung nach "endobj"-Schlüsselwort in einem indirekten Objekt
- Syntax: incorrect length for data object folder
  German: Datenobjekt-Verzeichnis hat inkorrekten Längen-Eintrag
- Syntax: incorrect format for data object folder
  German: Syntax-Problem: Datenobjekt-Verzeichnis inkorrekt formatiert
- Comment has no flags
  German: Kommentar enthält keinen Flags-Eintrag
- Comment is not set to "printing"
  German: Kommentar ist nicht auf druckend gesetzt

Command used to create PDF/A:
gswin32c.exe -dPDFA -dBATCH -dNOPAUSE -dNOOUTERSAVE -sFONTPATH=C:\WINDOWS\Fonts
-dUseCIEColor -sProcessColorModel=DeviceCMYK -sDEVICE=pdfwrite
-sOutputFile=aPDFtestOut.pdf PDFA_def.ps aPDFtest.pdf

Using the same PDFA_def.ps as in Bug 690768 (resulting in additional errors not
mentioned here)
Comment 1 T. Fischer 2009-10-05 05:41:48 UTC
Created attachment 5442 [details]
aPDF2test.pdf (The file to convert to PDF/A)
Comment 2 T. Fischer 2009-10-05 05:44:03 UTC
Created attachment 5443 [details]
aPDF2testOut.pdf (The converted file with PDF/A-errors)
Comment 3 T. Fischer 2009-10-05 05:46:31 UTC
Created attachment 5444 [details]
aPDFtestOut_report.pdf (The PDF/A-error report by Acrobat Pro 9.1.3 Preflight)
Comment 4 T. Fischer 2009-10-05 05:52:08 UTC
Created attachment 5445 [details]
aPDF2testOut_report.pdf (The PDF/A-error report by Acrobat Pro 9.1.3 Preflight)

aPDF2testOut_report replaces aPDFtestOut_report
Comment 5 Ken Sharp 2009-10-05 08:10:46 UTC
When converted to PDF/A using the current HEAD revision (and, I thought, 8.70)
Ghostscript emits the following warning:

Annotation set to non-printing, not permitted in PDF/A, reverting to normal PDF
output.

This was an enhancement made in July 2009 to prevent creation of non-compatible
PDF/A files. See revision 9876, bug #690500 and the Ghostscript documentation
gs/doc/ps2pdf.htm the new PDFACompatibilityPolicy switch. 

Unfortunately this new feature does not seem to be working correctly with your
file, and the default is still attempting to produce a PDF/A file, apparently
because the setting is reset on subsequent pages (initial testing was with a
single page file).

Are you certain you are using version 8.70 of Ghostscript, or did you simply
miss the warning ?

If I set -sPDFACompatibiltyPolicy=1 so that GS elides any non-conforming
annotations then I can create a conforming PDF/A file.
Comment 6 Ken Sharp 2009-10-06 00:38:06 UTC
revision 10141, patch here:

http://ghostscript.com/pipermail/gs-cvs/2009-October/009865.html

Correctly resets PDF/A production when encountering non-compliant input and the
PDFACompatibiltyPolicy is 0 (produce regular PDF file) on multi-page input.

Please note that in comment #5 -sPDFACompatibilityPolicy should instead read
-dPDFACompatibilityPolicy. That is a -d switch not a -s switch.
Comment 7 T. Fischer 2009-10-06 04:10:22 UTC
Thank you very much. Using the parameter "-dPDFACompatibilityPolicy=1" solves
all five PDF/A-errors mentioned in comment 1.

The PDF-annotation (German: Kommentar, Notiz) is removed from the PDF/A-dokument
(for PDF/A-compliance).

The command used and the resulting Ghostscript output:

gswin32c.exe -dPDFA -dBATCH -dNOPAUSE -dNOOUTERSAVE -sFONTPATH=C:\WINDOWS\Fonts 
-dUseCIEColor -sProcessColorModel=DeviceCMYK -sDEVICE=pdfwrite
-dPDFACompatibilityPolicy=1 -sOutputFile=aPDF2testOut.pdf PDFA_def.ps aPDF2test.pdf

GPL Ghostscript 8.70 (2009-07-31)
Copyright (C) 2009 Artifex Software, Inc.  All rights reserved.
This software comes with NO WARRANTY: see the file PUBLIC for details.
Processing pages 1 through 2.
Page 1
GPL Ghostscript 8.70: Annotation set to non-printing,
 not permitted in PDF/A, annotation will not be present in output file