Stitch PDF pages in a chosen order
Admin ·
A review message needs a single image with a notes page first and a chart beneath it. Choose the PDF page order explicitly and use a gap to mark the boundary.
Place page 3 above the rotated chart
Open PDF to Long Image and choose Load example. The sample enters 3, 2 at 72 DPI with a 12-pixel gap. The image plan reads 520 × 722 px.
Page 3 is 250 pixels wide and is centered in the top 350 pixels. The rotated chart from page 2 occupies the bottom 360 pixels and fills the 520-pixel width.
Download the original color reference PDFPDF.js examples, page scale and rotation
Set the gap and check the new dimensions
Set Page gap to 16 and pick a light gray-blue gap and margin color. The predicted height changes to 726 pixels. The gap and the margins around page 3 use that color. The PDF pages are rendered on white.
Choose Build long image. In the preview, find the yellow block above the gap and the red and blue chart blocks below it. Download pdf-appearance-sample-long.png and confirm that the image is 520 × 726 pixels.
Download the original color reference PDFW3C Portable Network Graphics specification
Set a size your destination accepts
Choose a higher DPI to render both pages at the same larger scale. Each rendered page contributes its height. The widest page sets the overall width.
If the plan exceeds 12,000 pixels in height or 20 megapixels in area, lower the DPI or select fewer pages. The PNG is a single raster image. Keep the PDF alongside it when a reader needs to select text or use links.
PDF.js examples, page scale and rotationW3C Portable Network Graphics specification
Common questions
How do I add the same PDF page twice?
Repeat its page number in your range, for example 3, 2, 3. The image places each entry in the listed order.
Why do the pages have different widths?
All pages use the same DPI. A physically narrower page uses fewer pixels and is centered beneath or above wider pages.