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

Fetch info that is stored in Refs for DocumentInfo #1456

Closed
wants to merge 1 commit into from

Conversation

saebekassebil
Copy link
Contributor

This is a fix for #1447 - The PDFDoc.info now contains not the "raw" info dictionary, but a dictionary where every Ref has been fetched and therefore easier to work with. The raw dictionary can still be fetched from PDFDocModel.getDocumentInfo()

@andreasgal
Copy link
Contributor

Shouldn't this be done lazily?

@saebekassebil
Copy link
Contributor Author

We could do that, but that would mean that I'd have to implement a new DocumentInfo object - which is no problem, but I wasn't sure that we'd want that many more objects flying around?

I also thinks that this sounds more performance demanding that it really is - Most PDFs doesn't store DocumentInfo as Refs and even when they do, they rarely store more than 5-7 pieces of information.

@brendandahl
Copy link
Contributor

This will be fixed by some changes I'm making for how dictionary and arrays handle xrefs. Instead of passing around the xref the dict/array will do the xref fetching. We've had several bugs related to this since people keep forgetting that nearly every dict entry or array entry can be an xref unless the spec explicitly says that the object must be all direct objects.

Hopefully I'll wrap this up today, if not early tomorrow morning.

@saebekassebil
Copy link
Contributor Author

Great, thanks! Closing?

@brendandahl
Copy link
Contributor

Closing because of #1488.

@brendandahl brendandahl closed this Apr 4, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants