Issues with the print functionality: org.netbeans.spi.print.PrintProvider with strange zoom parameter
Oliver Rettig <[email protected]> Fri, 12 May 2017 11:03:42 +0200
| Newsgroups | gmane.comp.java.netbeans.modules.openide.devel |
|---|---|
| Organization | ORAT |
| Message-ID | <4748566.oqQpLnZVeE@l560> |
Hi, the org.netbeans.spi.print.PrintProvider SPI defines the method: PrintPage [][] org.netbeans.spi.print.PrintProvider.getPages ( int width, int height, double zoom) The documations tells: zoom specifies the scale of pages. The zoom can take positive double value: 0.2 means 20%, 1.0 - 100%, 3.1415 - 314.5% etc. This looks straitforward but the PrintPreview invokes this method with different zoom factors - different the documentation. If I fitt to one page I get 1001.0, if I render to more than one page it depends of the count of rows and columns of the pages. I get 1002.0 if I fit to two pages width which results also in two rows of pages (together 4 pages) . I get 2002,0 (yes, it is not 1001.0!) if I fit to two pages in hight which results in three pages in the width (6 pages all together) I get 1003.0 if I fit to three pages in height which results in 5 pages in width (15 pages all together) This systematics is not totally clear to me and I am not sure if this happen on all operation systems or maybe there are other things this behavoir depends on. Any ideas? best regards Oliver