Commit 713d96199096680f9593e0d2cc53657eb8d27b46
1 parent
e3129ef4
Appearance streams: some floating point values were truncated
Bounding box X coordinates could be truncated, causing them to be off by a fraction of a point. This was most likely not visible, but it was still wrong.
Showing
10 changed files
with
1670 additions
and
1670 deletions
libqpdf/QPDFFormFieldObjectHelper.cc
| ... | ... | @@ -676,10 +676,10 @@ ValueSetter::writeAppearance() |
| 676 | 676 | if (highlight) |
| 677 | 677 | { |
| 678 | 678 | write("q\n0.85 0.85 0.85 rg\n" + |
| 679 | - QUtil::int_to_string(bbox.llx) + " " + | |
| 679 | + QUtil::double_to_string(bbox.llx) + " " + | |
| 680 | 680 | QUtil::double_to_string(bbox.lly + dy - |
| 681 | 681 | (tfh * (highlight_idx + 1))) + " " + |
| 682 | - QUtil::int_to_string(bbox.urx - bbox.llx) + " " + | |
| 682 | + QUtil::double_to_string(bbox.urx - bbox.llx) + " " + | |
| 683 | 683 | QUtil::double_to_string(tfh) + |
| 684 | 684 | " re f\nQ\n"); |
| 685 | 685 | } |
| ... | ... | @@ -693,7 +693,7 @@ ValueSetter::writeAppearance() |
| 693 | 693 | // which doesn't seem really worth the effort. |
| 694 | 694 | if (i == 0) |
| 695 | 695 | { |
| 696 | - write(QUtil::int_to_string(bbox.llx + dx) + " " + | |
| 696 | + write(QUtil::double_to_string(bbox.llx + dx) + " " + | |
| 697 | 697 | QUtil::double_to_string(bbox.lly + dy) + " Td\n"); |
| 698 | 698 | } |
| 699 | 699 | else | ... | ... |
qpdf/qtest/qpdf/appearances-1.pdf
No preview for this file type
qpdf/qtest/qpdf/appearances-11.pdf
No preview for this file type
qpdf/qtest/qpdf/appearances-12.pdf
No preview for this file type
qpdf/qtest/qpdf/appearances-2.pdf
No preview for this file type
qpdf/qtest/qpdf/appearances-a-more.pdf
No preview for this file type
qpdf/qtest/qpdf/appearances-a-more2.pdf
No preview for this file type
qpdf/qtest/qpdf/appearances-a.pdf
No preview for this file type
qpdf/qtest/qpdf/appearances-b.pdf
No preview for this file type
qpdf/qtest/qpdf/appearances-quack.pdf
No preview for this file type