flyingsaucerproject / flyingsaucer

XML/XHTML and CSS 2.1 renderer in pure Java
Other
2.02k stars 564 forks source link

Page size 3value fix #382

Closed jelinj8 closed 2 months ago

jelinj8 commented 2 months ago

I wanted to create a PDF for a label printer with landscape orientation AND a custom size which evidently isn't supported.

@page {
   size: 40mm 20mm landscape;
}

This is an attempt to fix that (+ fixed one typo in original code reporting error on incorrect parameter value).

I'm unable to test this properly right now as I'm unable to compile the library with Java 17 (still using FS 9.4.1 with Java 1.8), but it compiled OK with slight modifications for the old version, this is to get it fixed when I'll be able to upgrade and to give something back, thanks.

jelinj8 commented 2 months ago

Another typo, sorry.