Set PDF to print with no scaling

后端 未结 7 1301
名媛妹妹
名媛妹妹 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条回答
  •  萌比男神i
    2020-12-17 19:24

    I ran into the same problem.

    I have several PDFs where the content of the PDF, that is text and images, go very near the PDFs border but still the print dialogue Preview/Acrobat suggests printing it in 100% scaling, thus cutting off the contents which aren't printable because of the printers natural margins.

    Creating any PDF in Pages for example results in a PDF which is printed in 100% scaling by default.

    However if I create a PDF using TCPDF which is related to FPDF than the printer dialog suggests to scale it in order to fit the page.

    My suspicion is that the way the PDF is created is different. I suspect that Pages and other tools create separate layers and they are then handeled differently, possibly by a flag or something.

    I compared the readable parts of my two PDF-Files and did come accross some differences, especially on how the documents begin. My knowledge of the PDF-Sources is, however very limited, so I can only guess what needs to change. Is there a PDF-Reference where it is stated how to control the printable objects/areas?

    Here the content of a minimal PDF which will be printed without scaling:

    %PDF-1.4
    1 0 obj
    << /Type /Catalog
    /Outlines 2 0 R
    /Pages 3 0 R
    >>
    endobj
    2 0 obj
    << /Type /Outlines
    /Count 0
    >>
    endobj
    3 0 obj
    << /Type /Pages
    /Kids [4 0 R]
    /Count 1
    >>
    endobj
    4 0 obj
    << /Type /Page
    /Parent 3 0 R
    /MediaBox [0 0 595 842]
    /Contents 5 0 R
    /Resources << /ProcSet 6 0 R
    /Font << /F1 7 0 R >>
    >>
    >>
    endobj
    5 0 obj
    << /Length 73 >>
    stream
    BT
    /F1 24 Tf
    100 100 Td
    (Hello World) Tj
    ET
    endstream
    endobj
    6 0 obj
    [ /PDF /Text ]
    endobj
    7 0 obj
    << /Type /Font
    /Subtype /Type1
    /Name /F1
    /BaseFont /Helvetica
    /Encoding /MacRomanEncoding
    >>
    endobj
    xref
    0 8
    0000000000 65535 f
    0000000009 00000 n
    0000000074 00000 n
    0000000120 00000 n
    0000000179 00000 n
    0000000364 00000 n
    0000000466 00000 n
    0000000496 00000 n
    trailer
    << /Size 8
    /Root 1 0 R
    >>
    startxref
    625
    %%EOF
    

提交回复
热议问题