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

Use byte_size for correct lengths and offsets #13

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jbowtie
Copy link

@jbowtie jbowtie commented May 10, 2017

This replaces several usages of String.length with byte_size to ensure that correct lengths and offsets are written out.

Without this fix several PDF readers will flag the generated PDF as corrupt and may refuse to display more complex documents. The command-line tools for muPDF are good for validating output (as well as inspecting and dumping the PDF objects).

@jbowtie
Copy link
Author

jbowtie commented May 10, 2017

Note that this will not build on Travis due to #12 but can be built and checked locally.

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.

1 participant