Set PDF to print with no scaling

后端 未结 7 1304
名媛妹妹
名媛妹妹 2020-12-17 18:35

I am generating a PDF (using fpdf) and I am wondering if there is a way to set the document\'s properties to to default to print with no scaling.

So when you select

7条回答
  •  再見小時候
    2020-12-17 18:59

    Ok, I think I got it. Try this: open your TCPDF-created PDF and remove all occurenecs of viewerpreferences and any box-statements other than the MediaBox... doing so finally resulted in a print-default-scaling-free PDF :) seams like those additional infos -intended for professional printing- only confuse the common pdf-viewer instead of helping with anything :)

    Goto tcpdf.php and change line 8529 in method _putpages as follows

    change

    $boxes = array('MediaBox', 'CropBox', 'BleedBox', 'TrimBox', 'ArtBox');
    

    into

    $boxes = array('MediaBox');
    

    In my PDF-output this instantly removed the scaling problem :)

提交回复
热议问题