NathanaelA / fluentreports

:page_facing_up: Fluent Reports - Data Driven Reporting Engine for Node.js and Browsers :page_facing_up:
https://fluentreports.com
MIT License
375 stars 84 forks source link

[FRG] Last element floats up 1px every time report is saved & loaded #231

Closed beauwest closed 4 years ago

beauwest commented 4 years ago

We do a lot of saving and loading with our implementation of FluentReports, one issue we've seen is that the last element has a tendency to float up 1px when it's loaded into the report editor.

Consider this report structure

{"name":"report.pdf","type":"report","fonts":[],"detail":{"children":[{"text":"Welcome to fluentReports","type":"print","settings":{"absoluteX":0,"absoluteY":49}}]},"footer":{"children":[{"type":"raw","values":["Sample Footer"]}]},"header":{"children":[{"type":"raw","values":["Sample Header"]}]},"version":2,"fontSize":0,"autoPrint":false,"paperSize":"letter","variables":{},"paperOrientation":"portrait"}

I have the detail print set to an absoluteY of "49". However, if I load the report, and click the "Save" button, the output from the report editor will place it at "48" instead. As I continue to save and reload the report, it continues to float up.

I have especially noticed this on the very last element, but I believe it can happen on any element depending on what the absoluteY is set to.

NathanaelA commented 4 years ago

I'll try and crate a test that loads and saves a couple times to see if I can duplicate this issue.

beauwest commented 4 years ago

I think it should be able to be seen just by loading that structure, and then hitting the save button and inspecting the output as well. It'll go down by 1 to 48, if it works like it does on mine.

NathanaelA commented 4 years ago

This is fixed in the next version 1.3.8