Skip to content

System.AggregateException: 'Invalid object ID.' when trying to open some pdfs #73

@andresdbv

Description

@andresdbv

I have been using for years 1.50.5147.0 to open pdfs and add some text to them. The thing is that it has trouble opening some files with PdfReader.Open(pathFilePDF, PdfDocumentOpenMode.Modify) (I've read about this and that I should save them again - I print them to pdf again with chrome and it works). As this is a service in the backend it gives us a lot of trouble. Some of the problematic pdfs are scans of physical documents and others are pdf saved from Autocad.

Our solution uses .net framework 4.72, so when I read that 6.1.0-preview-1 could be used in my project I thought to give it a try and set up a little project to see if it could handle the files that give us problems, to no avail.

So to check if I was doing something wrong I fired up a project in net.6 with 6.0.0 version of the library and it worked.

Expected Behavior

It should open the pdf attached in the Issue Template Project (File.pdf)

Actual Behavior

It gives me this error: System.AggregateException: 'Invalid object ID.'

Steps to Reproduce the Behavior

Here is the template, the code is just to try to open the pdf file I attached within the solution

Issue.zip

(if you can at least help me to know what its wrong with the pdf would be awesome)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions