-
-
Notifications
You must be signed in to change notification settings - Fork 147
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
BUG Inverted characters #164
Comments
I have a correction. Using the above script renders text correctly. Noteably downloading the PDF from the original source seems to make a difference. I was running the script originally with this PDF which produced the errors: |
The content of a PDF is located in a so called content stream. These streams are essentially compressed pieces of code (in a language called postfix) that tell the viewing software how to render content. In pseudo-code you might find something such as:
As you can tell from the pseudo-code, the renderer has a state (coordinates, colors, active font, etc). There are operators that modify this state even further. For instance you can apply a matrix transformation to the coordinate system. Normally, you would encapsulate content-rendering operations with a Your issue might be something like:
|
Describe the bug
When adding text to an existing PDF the characters are inverted.
To Reproduce
Expected behaviour
I would expect this to render "Hello World!" somewhere near the top of the page
Screenshots
Desktop (please complete the following information):
Additional context
The coordinates of the rectangle aren't behaving as I would expect either, increasing the width seemingly makes the rectangle taller, and visa versa.
The text was updated successfully, but these errors were encountered: