Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

'there was a problem reading this document (14)' and 'expect a dict object'

New Here ,
Dec 05, 2022 Dec 05, 2022

I opened this document a few days ago and wrote in there with my lenovo pen. Now I get a error 'there was a problem reading this document (14)' and 'expect a dict object'. Other documents I used that they do still work. Can someone please help. I made notes in this document during a class in University and really need the things I wrote down.

TOPICS
Windows
3.4K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Advocate , Dec 07, 2022 Dec 07, 2022

@Hannah2323 shared the PDF in question in a private message.

 

The issue:

Usually the trailer of a PDF has a Root entry which points to the Catalog dictionary which in turn points to several central document structures, in particular its Pages entry points to the page tree of the document.

In the file in question, though, the Root entry in its trailer points to an annotation dictionary!

Thus, while trying to open the file Adobe Acrobat cannot find the page tree in the alleged catalog object and rejec

...
Translate
New Here ,
Dec 05, 2022 Dec 05, 2022

Maybe importent to know. I'm not able to open this document. I saw this problem on the internet but they had a problem with saving not with opening 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Dec 06, 2022 Dec 06, 2022

Can you share the PDF?

Considering the error message it seems like an important object in it is not a dictionary object but should have been... This might be fixable.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Dec 07, 2022 Dec 07, 2022

@Hannah2323 shared the PDF in question in a private message.

 

The issue:

Usually the trailer of a PDF has a Root entry which points to the Catalog dictionary which in turn points to several central document structures, in particular its Pages entry points to the page tree of the document.

In the file in question, though, the Root entry in its trailer points to an annotation dictionary!

Thus, while trying to open the file Adobe Acrobat cannot find the page tree in the alleged catalog object and rejects the file: Without the page tree there is no content in the PDF at all.

 

A work-around:

To somewhat fix this issue, I searched the page tree base object, added a new indirect dictionary object to the PDF with a Pages entry pointing there, and changed the trailer to point to this new indirect object as Root. Eventually I added an xref table entry for this new object.

This can be done in a text editor (as long as that text editor does not change regions of the file one doesn't work in) but requires some knowledge of PDF internals.

Thereafter the file could be opened and was mostly ok. Saving from Acrobat then finished the work-around.

 

A possible cause:

Inspecting the file a bit further one finds a linearization dictionary and two cross reference streams that look like they may have been the two cross reference streams of a linearized file. Furthermore, the object number of the original root entry equals the lower of the Size entries of the cross reference streams, i.e. of the stream that originally would have been located at the end of the linearized file.

Thus, it may be that the tool for the Lenovo pen does not support linearized files with cross reference streams and only considered that cross reference stream at the end, thinking that object number was unused yet. 

But this may also be a red herring, maybe the file that tool edited was already somehow broken and this is a situation of GIGO, garbage in, garbage out...

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 07, 2022 Dec 07, 2022

Excellent analysis!!  However, those fixes are outside the range of what any reasonable PDF user would be able to achieve. 

 

But I thinks it's safe to assume that whatever PDF viewer was making modifications to the PDF in question totally screwed up the PDF file. So the real question here is, was the file being viewed in Acrobat Pro/Reader when the Lenovo Pen was used, or was this in some other PDF viewer?  If it was in Acrobat, then this is a significant bug that needs to be reported. Otherwise it's not really an issue for this forum. 

 

Report bugs here:https://www.adobe.com/products/wishform.html

 

 

Thom Parker - Software Developer at PDFScripting
Use the Acrobat JavaScript Reference early and often

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Dec 07, 2022 Dec 07, 2022

I can't quite remember what I was using with this pdf with the lenovo pen. I change between adobe and microsoft edge... The weird thing is that I had this never before on any pdf and I use both programs quite often in combination with the pen.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Dec 07, 2022 Dec 07, 2022

Do you still have the file as it was before you added all those marks with the pen?

Also I doubt it was Adobe Acrobat: The file was saved with cross reference tables instead of cross reference streams referenced at the end of the file, and recent Adobe Acrobat versions do not do that unless it's required.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Dec 07, 2022 Dec 07, 2022

I can download the same file again if that is what you mean. 

 

Then it probably was mircosoft edge... 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Dec 07, 2022 Dec 07, 2022
quote

I can download the same file again if that is what you mean. 

Indeed, that would be great. If only to support or disprove my assumption above.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Dec 13, 2022 Dec 13, 2022

@Hannah2323 also shared the original file before the pen edits.

It indeed is a linearized file with cross reference streams. It has one issue, though: It is marked as a PDF 1.4 file while cross reference streams have not been introduced before PDF 1.5.

I assume that this version marker led the software used for the pen edits astray and prevented it from properly understanding the cross reference streams.

So this looks like a combination of a small versioning error in the original PDF and a very haywire reaction to that by the software used for the pen edits.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 13, 2022 Dec 13, 2022

That must be a very old PDF form. It's likely that the app that was used with the pen never checked the version and simply did what it usually does on the assumption the version would be compatible.  This is one of the standard issues with 3rd party PDF viewers, i.e., no respect for the spec. 

 

That's some seriously detailed analysis!! What tool do you use for analyzing the PDF file structure?

  

Thom Parker - Software Developer at PDFScripting
Use the Acrobat JavaScript Reference early and often

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Dec 14, 2022 Dec 14, 2022

That's some seriously detailed analysis!! What tool do you use for analyzing the PDF file structure?

Actually nothing magical, a text/hex viewer (Notepad++ with HEX Editor plugin; alternatively the Total Commander built-in viewer) to have a look at the bare PDF file and a PDF structure browser (iText RUPS; alternatively PDFBox PDFDebugger) for a parsed view of the COS objects.

And in case of doubts of course the PDF spec opened in another window...

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 14, 2022 Dec 14, 2022

Have you looked at PDFCanOpener?

 

 

Thom Parker - Software Developer at PDFScripting
Use the Acrobat JavaScript Reference early and often

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Dec 15, 2022 Dec 15, 2022
LATEST
quote

Have you looked at PDFCanOpener?

Not really. If I see that correctly it works as an Acrobat plugin. Unfortunately I often have to deal with PDFs which don't open in Acrobat at all or which Acrobat repairs (and, therefore, changes) on load. Thus, I need a view on the PDF that is not influenced by Acrobat.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 05, 2022 Dec 05, 2022

Try the forum for Adobe Acrobat.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines