JPG/PNG to PDF places images into PDF pages. It is useful for sending several photographed sheets as one attachment. Putting a scan in a PDF does not automatically make its words searchable.
Check the image order first
- Add the images to the workspace.
- Read the displayed file list and use the available Up/Down controls to put it in the intended order.
- Create the download.
- Open the PDF and compare each page with its source image.
Test with two pictures marked A and B. The result should have two pages in the order you chose. File selection order and alphabetical filename order are not interchangeable, so inspect the visible list rather than assuming how the browser sorted it.
Prepare readable source images
Correct sideways photos and crop out unnecessary surroundings before conversion. Enlarging a low-resolution photograph does not recover missing letters. Check small print on a phone and at the intended print size. This workflow does not promise a specified paper-size layout merely because the result is a PDF.
Decide whether OCR is needed
Try selecting text in the output. An image-only PDF normally still needs OCR PDF if search or text extraction is required. OCR creates recognised text with possible mistakes, so names, dates and numbers need comparison with the image.
The image-embedding operations are described in pdf-lib's image API. The converted PDF is a new document; retain the original photographs for a better crop or a higher-quality export later.