For test purposes, I have created a simple html file which has a simple table with the width of 600 pixel and a single row and column containing a little text snippet with font size 20pt and font family Verdana.
If I generate a pdf file from the html file mentioned above using pd4ml pro, the created pdf file contains a table with exactly 600 pixel as well but the width of the text snippet (I measured the width of the whole text with a pixel ruler tool) is about 70 pixel less than the width of the same text displayed in the browser(displaying the original html file).
That’s the important part of the pd4ml generation code:
PD4ML pd4ml = new PD4ML();
pd4ml.setPageInsets(new Insets(0, 0, 0, 0));
As you can see I set the html width to 793 pixel, which corresponds to the width of A4 with 595 points (I did the test on a windows machine which uses 96 dpi, what means that 595 points corresponds to 595 point * 1,3333 = 793 pixel, I think).
Furthermore I did not set any insets.
So I think I can calculate the scale factor the following way: