Hi! The problem comes from strangely defined PDF margins in v4 version.

Here is the API calls dump of v3:
% PD4ML version: 3100.PRPC.1 Pro % JDK version: 1.8.0_342 % OS version: Linux 3.10.0-1160.76.1.el7.x86_64 % File encoding: UTF-8 % insets: java.awt.Insets[top=85,left=71,bottom=85,right=71] % size: java.awt.Dimension[width=595,height=842] % protectPhysicalUnitDimensions % interpolate: true % footer: % pn tpl lng: 19 % pn alg: 2 % init pn: 1 % skp: 0 % fn sz: 11 % hgh: 20

As you can see the margins (aka insets) are set to moderate values in typographic points: [top=85,left=71,bottom=85,right=71], and the page size matches A4: [width=595,height=842]

When you call v4, the settings differ:
% PD4ML DIAGS % % Version: 4.0.13 % JDK version: 1.8.0_352 % OS version: Linux 3.10.0-1160.80.1.el7.x86_64 % file encoding: UTF-8 % supplied license 'java:pd4ml.lic...': v=true, i=true, p=true, pa=true, pb=true, pr=true, rt=true % setPageMargins: [null] l:142.0, t:142.0, r:142.0, b:142.0 % setPageMargins: [null] l:141.75, t:141.75, r:141.75, b:141.75 % setPageSize: null,595x842 % % protectPhysicalUnitDimensions % injectHtml*: 469 true % ttf: java:/defaultfonts % setPageMargins: [null] l:142.0, t:142.0, r:142.0, b:142.0 % userspace=640 % setPageSize: null,440x623

The page margin are suspiciously huge: l:142.0, t:142.0, r:142.0, b:142.0
And the page size for some reason degraded to 440×623 from initial 595×842(A4).

I would recommend to start the troubleshooting with a switch from Version: 4.0.13 to 4.0.15fx2 – obviously you do not use PD4ML v4 API directly, but PD4ML v3 -> v4 API wrapper classes. We fixed few issues with the default page settings in the meantime.

And please check your code to determine where 142pt margins come from.

The attached is PDF output of the current v4 build.

You must be logged in to view attached files.