Heya there!
Our team recently tried to switch from version 0.7.0 and we've noticed that in the latest versions the values of boxes in the PDF file get rounded to integer values, seems the change happens here: https://github.com/fschutt/printpdf/blob/0.8.2/src/graphics.rs#L124
Below is a sample of the results of parsing the generated file with https://fschutt.github.io/printpdf/ using data generated in the version we were using and the latest version.
Box data with version 0.7.0:
"mediaBox": {
"x": 0,
"y": 0,
"width": 31.304373,
"height": 31.304373
},
"trimBox": {
"x": 0,
"y": 0,
"width": 31.304373,
"height": 31.304373
},
"cropBox": {
"x": 0,
"y": 0,
"width": 31.304373,
"height": 31.304373
},
Box data with version 0.8.2:
"mediaBox": {
"x": 0,
"y": 0,
"width": 31,
"height": 31
},
"trimBox": {
"x": 0,
"y": 0,
"width": 31,
"height": 31
},
"cropBox": {
"x": 0,
"y": 0,
"width": 31
"height": 31
},
My question is the following: Is this rounding expected behaviour or would it be possible to again serialize the box sizes as real numbers instead?
Heya there!
Our team recently tried to switch from version
0.7.0and we've noticed that in the latest versions the values of boxes in the PDF file get rounded to integer values, seems the change happens here: https://github.com/fschutt/printpdf/blob/0.8.2/src/graphics.rs#L124Below is a sample of the results of parsing the generated file with https://fschutt.github.io/printpdf/ using data generated in the version we were using and the latest version.
Box data with version
0.7.0:Box data with version
0.8.2:My question is the following: Is this rounding expected behaviour or would it be possible to again serialize the box sizes as real numbers instead?