Dave Nottage
Dave Nottage

Reputation: 3602

Fill and sign for PDF file not working using Acrobat Reader DC

I'm asking this here because given the searches I've done, it appears Adobe's support is next to non-existent. I have, according to this online validation tool:

https://www.pdf-online.com/osa/validate.aspx

A perfectly valid PDF, which is generated from code. However, when using Acrobat Reader DC I am unable to use Fill And Sign - when attempting to sign, it throws this error:

The operation failed because Adobe Acrobat encountered an unknown error

This is the offending PDF:

https://github.com/DelphiWorlds/MiscStuff/blob/master/Test/PDF/SigningNoWork.pdf

This is one which is very similar, where Fill and Sign works:

https://github.com/DelphiWorlds/MiscStuff/blob/master/Test/PDF/SigningWorks.pdf

Foxit Reader has no issue with either of them - Fill and Sign works without fail.

I would post the source of the files, however because they have binary data, I figure links to them is better.

The question is: why does the first one fail to work, but not the second?

Upvotes: 1

Views: 3121

Answers (2)

Joseph Hughes
Joseph Hughes

Reputation: 21

Acrobat Reader DC - the free version, does not allow you to do the fill and sign anymore if your document has metadata attached to it.

You need to purchase the Pro DC version, which is like $14.99, in order to continue using the fill and sign on here.

I just got done with a 4 months support exchange of emails with Adobe, and that was their final answer.

Upvotes: 2

mkl
mkl

Reputation: 95938

In your non-working file all the fonts are defined with

/FirstChar 30
/LastChar 255

i.e. having 226 glyphs. Their respective Widths arrays only have 224 entries, though, so they are incomplete.

After adding two entries to each Widths array, Adobe Reader here does not run into that unknown error anymore during Fill And Sign.


As the OP inquired how exactly I changed those widths arrays:

I wanted the change to have as few side effects as possible, so I was glad to see that there was some empty space in the font dictionaries in question, so a trivial hex editing sufficed, no need to shift indirect objects and update cross references:

In each of those font definitions in the objects 5, 7, 9, and 11 the Widths array is the last dictionary entry value and ends with some white space, after the last width we have these bytes:

20 0D 0A 5D 0D 0A 3E 3E --- space CR NL ']' CR NL '>' '>'

I added two 0 values using the white space:

20 30 20 30 20 5D 3E 3E --- space '0' space '0' space ']' '>' '>'

Upvotes: 3

Related Questions