Paritian

Developers

Image to PDF Converter

Put a picture on an A4 or Letter page and save it as a PDF, with the margin and orientation you choose.

Results

Page A4 portrait
Page size 210 x 297 mm
Image width on the page 538.6 pt
Image height on the page 761.8 pt
Printed resolution 332

What this tool does

Almost every official form, application and claim wants a PDF, and almost every photograph and scan arrives as a JPEG. This page bridges the two. Choose an image, pick the paper and the margin, and it is centred on the page and written out as a PDF. The printed resolution is shown as well, so you can tell before sending whether the result will look sharp on paper or soft.

Formula

the image is shrunk to fit the sheet less the margins, by the smaller of the two factors, and centred in what is left

Variables

SymbolMeaningUnit
img_wImage width, in pixels
img_hImage height, in pixels
pagePage
orientationOrientation
marginMarginmm
OUTPage
PMPage size
PWImage width on the pagept
PHImage height on the pagept
DPIPrinted resolution

Worked example

  • Image width, in pixels2480
  • Image height, in pixels3508
  • Pagea4
  • Orientationauto
  • Margin10 mm
  • PageA4 portrait
  • Page size210 x 297 mm
  • Image width on the page538.6 pt
  • Image height on the page761.8 pt
  • Printed resolution332

Limitations

  • The calculation runs entirely in your browser. The values you type are never sent to a server.

Frequently asked questions

What does the printed resolution number mean?

It is how many of the image's own pixels end up inside each printed inch once it has been scaled to the page. Around 300 is what print shops ask for; 150 is acceptable for something read at arm's length; below about 100 the pixels start to show. Shrinking the margin or choosing a smaller page raises the number, because the same pixels are packed into less paper.

How is the PDF made without any library?

A PDF holding one picture is a small, plain file: a catalogue, a page list, the page itself, the image, and a short instruction saying where to put it. The image goes in as a JPEG exactly as it is, because JPEG is one of the compressions PDF already understands. The page is written byte by byte here, which is why this tool loads nothing from anywhere else.