69
Views
4
Comments
Solved
[Ultimate PDF] Paper Size not being correctly applied
ultimate-pdf
Reactive icon
Forge asset by Leonardo Fernandes
Application Type
Reactive

Greetings,

We have an issue wherein regardless of what paper size we use in the PaperSize parameter of the PrintToPDF_Advanced method, the PDF always comes out printed with A4 size, even in a very simple sample app. In a personal environment, the paper size is correctly applied.

We are using the latest version of UltimatePdf (9.0.0), with the latest chromium revision (donwloaded manually to the server, which does not have internet access), with Platform Server version 11.18.1 and OutsystemsUI version 2.6.5.

It must be something related to the environment we are running it on, but i would like to know if anyeone has had this problem, and how have they fixed it? 

Is an update to Outsystems UI needed? Should this have impact? 

Can it be something with the Framework version deployed on the server?


Any help would be appreciated.

2019-07-08 11-04-35
Leonardo Fernandes
 
MVP
Solution


Does that reactive page include any stylesheet that have an @page declaration specifying a "size"? Example:

@page {
    size: a4;
}


If so, then Ultimate PDF will respect that definition on the stylesheet.

2019-07-08 11-04-35
Leonardo Fernandes
 
MVP

Hi Sérgio.

If you are using the PrintLayout block, the paper size specified in the PrintToPDF_Advanced call is ignored, and the paper size of the PrintLayout block will be used instead. You can select the same paper size in the input parameter of the PrintLayout block.

2023-11-28 14-16-06
Sergio Amendoeira
Staff

Greeting Leonardo,

No, we are not using the PrintLayout block, the page we are "printing" does not have anything from UltimatePDF, it is a standard Reactive page.

2019-07-08 11-04-35
Leonardo Fernandes
 
MVP
Solution


Does that reactive page include any stylesheet that have an @page declaration specifying a "size"? Example:

@page {
    size: a4;
}


If so, then Ultimate PDF will respect that definition on the stylesheet.

2023-11-28 14-16-06
Sergio Amendoeira
Staff

Hello Leonardo,

It did not, but your suggestions has given us a workaraound to be able to configure the size of the page in UltimatePDF without needing to use the Size parameter for the action.

Thank you very much.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.