Q: When I print my pdf in C++ sample application it is printed
correctly.
However when I use jar with Java the printed page is slightly larger
and cut off from the page (margins maybe?). I used you sample java
code for printing. I suspect some settings defaults are not the same.
------
A: I guess the only difference in how the margins are selected. The C+
+ sample is using Win32 functions (GetDeviceCaps()) to obtain the
printer margins whereas the JAVA sample is ignoring margins.
To account for printer margins you will need to fetch this info
(perhaps from java.awt.print.PageFormat -> getPaper() -> imageable
dimensions) and pass them to drawInRect() method.