• I use metafiles to be drawn on the pdf printer.

    The size of the metafile is always 1122 (Height) and 794 (Width)
    (initilaized through this code: metaFile.Width := MulDiv(PageHeight, 96, 1440);)

    When printing on different computers this gives different page sizes
    in the pdf file. In one case it is correct (297x210mm) on other computers
    it is too small or too big.

    I've here the tags I think are responsible for the width and height of the
    pdf docs:

    Incorrect (on my test computer; 279x215mm):
    /Type/Page
    /Parent 7 0 R
    /Resources 8 0 R
    /MediaBox [0 0 612 792]

    Correct (on my own computer; 297x210mm):
    /Type/Page
    /Parent 7 0 R
    /Resources 8 0 R
    /MediaBox [0 0 598 839]
    /Contents 13 0 R
    /Contents 5 0 R


    We got a workaround for this using

    PDFPrinter.DrawMetafileEx(0, 0,
    round(Metafile.Width / 96 * 72),
    round(Metafile.Height / 96 * 72),
    metaFile.Handle,96,96);

    But I think it's not very clean.

    any help??

    best regards
    Mike