Set PDF to print with no scaling

后端 未结 7 1320
名媛妹妹
名媛妹妹 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 19:13

    For me changing the FPDF Catalog method _putcatalog() and adding

        $this->_out('/ViewerPreferences [/PrintScaling/None]');
    

    wasn't accomplishing the goal so I looked at the code produced by a Acrobate XI PDF and found some more verbage. Adding the following code

        $this->_out('/ViewerPreferences<>');
    

    created a PDF that no longer defaulted to scaling and instead only gave the option to print Actual Size which was what was desired.

提交回复
热议问题