Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PDF/A : endobj is missing EOL-Marker #184

Closed
benito103e opened this issue Oct 24, 2023 · 3 comments
Closed

PDF/A : endobj is missing EOL-Marker #184

benito103e opened this issue Oct 24, 2023 · 3 comments
Assignees

Comments

@benito103e
Copy link

Hello,

When copying objects from readers :
\setasign\Fpdi\Fpdi::_putimages

PdfIndirectObject is created and writed in buffer :

$this->writePdfType($value->value);

But $value->value of PdfIndirectObject can be a scalar (e.g. a PdfNumeric)
So no new line is added after the scalar and before the endobj

70 0 obj
24340 endobj

It throw a non-conformity "PDF/A : endobj is missing EOL-Marker"

@JanSlabon
Copy link
Member

Okay, while this is not a requirement in the PDF specification it is in PDF/A-1 (ISO 19005-1). So fixing this shouldn't be a problem.

We need to setup a Scalar interface, add this to the related PDF type classes and check for this in the writePdfType() method.

@JanSlabon JanSlabon self-assigned this Oct 24, 2023
@benito103e
Copy link
Author

Thanks @JanSlabon for your reply.

I'm not sure that I have the last specifications, but it's seems that ISO 19005-1 requires :

5.9 Indirect objects
The object number, generation number, and obj keyword shall be located on a single line and shall be
separated by a single white-space character.
The object number and endobj keyword shall be preceded by an EOL marker. The obj and endobj keywords
shall be followed by an EOL marker. 

@JanSlabon
Copy link
Member

Yep, that's exactly what I was referring to. Give me some days. I'm on holiday this week.

JanSlabon added a commit that referenced this issue Dec 6, 2023
Ensure newline before endobj token (fixes #184)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants