NathanaelA / fluentreports

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

[FRG] Font Size setting does not work on "Print Page" element #239

Closed beauwest closed 3 years ago

beauwest commented 3 years ago

When I use the Print Page element: "Page {0} of {1}", and set a font size, it always uses the reports global font size setting.

NathanaelA commented 3 years ago

I can't duplicate this, if I add a fontSize to the footer page data; it looks fine: image

And also

const reportData = {
    "type": "report",
    "dataUUID": 10002,
    "version": 2,
    "fontSize": 10,
    "autoPrint": false,
    "name": "demo37.pdf",
    "paperSize": "letter",
    "paperOrientation": "portrait",
    "fonts": [],
    "variables": {},
    "header": {
        "children": [
            {
                "page": "Font Size 40 - Page {0} of {1}",
                "settings": {
                    "absoluteX": 190,
                    "absoluteY": 10,
                    "align": "center",
                    "fontSize": 40
                },
                "type": "print"
            },
            {
                "page": "Font Size 30 - Page {0} of {1}",
                "settings": {
                    "absoluteX": 10,
                    "absoluteY": 45,
                    "align": "center",
                    "fontSize": 30
                },
                "type": "print"
            },
            {
                "text": "Font Size 20",
                "settings": {
                    "absoluteX": 10,
                    "absoluteY": 75,
                    "align": "center",
                    "fontSize": 20
                },
                "type": "print"
            },
            {
                "text": "Font Size Default",
                "settings": {
                    "absoluteX": 10,
                    "absoluteY": 95,
                    "align": "center",
                },
                "type": "print"
            },
            {
                "settings": {
                    "top": 120,
                    "width": 468,
                    "height": 0,
                    "shape": "line",
                    "radius": 50
                },
                "type": "shape"
            }
        ]
    }
};

Produces this: image

beauwest commented 3 years ago

Huh, you're right. I am unable to reproduce this as well in a simple example. I'll revisit the more complex report that I encountered it on and see if anything stands out. Thanks for taking a look!