Repository navigation
fix: Content returns the text of form XObjects - #97
Open
anaelorlinski wants to merge 1 commit into
Open
anaelorlinski wants to merge 1 commit into
anaelorlinski wants to merge 1 commit into
Conversation
Content had no case for the Do operator, so the text drawn inside a form XObject (form-field appearances, embedded diagrams, headers placed as forms) was missing from the page. Do now interprets a form XObject's content stream in a saved graphics state, with the form's /Matrix concatenated to the CTM and the form's own /Resources (or, without them, those of the content stream painting it; PDF 32000-1:2008 §8.10). Image XObjects are ignored as before. Nesting is bounded by maxFormDepth since a form can paint itself. Refs ledongthuc#67
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Content() had no case for Do, so text drawn inside a form XObject (form-field appearances, embedded diagrams, headers placed as forms) was missing. Do now interprets a form's content stream in a saved graphics state, with the form's /Matrix concatenated to the CTM and its own /Resources (or those of the painting stream; PDF 32000-1:2008 §8.10). Image XObjects are ignored as before; nesting is bounded by maxFormDepth since a form can paint itself.
Refs #67 (which covers GetPlainText; this is the Content() side). Tests build small PDFs in memory, like buildContentPDF.