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

Let PDF::Core determine precision of float rounding (currently 4 decimal places) #782

Closed
wants to merge 8 commits into from

Conversation

practicingruby
Copy link
Member

This attempts to integrate prawnpdf/pdf-core#10.

@practicingruby
Copy link
Member Author

Note to self for CHANGELOG: This pull request will not break external behavior, but it will change how PDFs are represented at the binary level. We don't promise binary compatibility between releases, but a note to warn people who do their testing that way is in order.

@practicingruby
Copy link
Member Author

We had decent test coverage on the Prawn side of this, so this patch can probably be merged after prawnpdf/pdf-core#10 has been tidied up.

That said, it's a scary change with global effects. @packetmonkey can you at least do a non-trivial test rendering using this branch against one of your projects?

@practicingruby practicingruby changed the title Round all real numbers in PDF output to four decimal places Let PDF::Core determine precision of float rounding (currently 4 decimal places) Oct 10, 2014
@packetmonkey
Copy link
Contributor

Sure, I'll try to get that test run today or monday depending on meetings. I have a few fairly complex dynamically calculated products (using a lot of dry runs) that would hopefully ferret out any major problems.

@packetmonkey
Copy link
Contributor

I just compared a fairly complex document that uses a lot of dry-runs to calculate heights and dynamically position elements on the page. After eyeballing it and also using xscope to independently check the measurements on screen, everything looks identical to me on the decimal rounding branches. I asked someone else spot check it as well and she found nothing wrong either.

My tests also continued to pass which includes tests to make sure that the dimensions of various elements are calculated correctly, which shouldn't be (and weren't) impacted by this, but it was comforting to continue to see none the less.

@practicingruby
Copy link
Member Author

Hooray! We will merge this week, then.

@practicingruby
Copy link
Member Author

Squashed and merged in 0249316

@pointlessone pointlessone deleted the decimal_rounding branch December 30, 2020 07:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants