Sub topic 12
Export a consistent carousel PDF
This chapter assumes you have a finished plan: a hook slide, body slides with one idea each, and a call-to-action slide, with the layout already designed. It also assumes you can run a Python script. The Python parts are optional, because every check here can also be done by hand in a PDF viewer. The goal is to turn your slides into one PDF file that LinkedIn displays cleanly and that looks the same on every page.
What "consistent" means
LinkedIn treats the uploaded PDF as a stack of pages. It does not know about your slides. If page 4 is a different size from page 3, the viewer scales or letterboxes it, and the reader sees the layout jump while swiping. A consistent export has four properties:
- Every page has the same width and height.
- Every page has the same orientation and rotation.
- Fonts render the same on every device, either because they are embedded or because they are standard.
- The file is small enough to upload and to load quickly on a mobile connection.
Check the current document limits in LinkedIn's help pages before publishing. At the time of writing, document posts accept PDF, PowerPoint and Word files up to 100 MB and 300 pages. A carousel is far below both limits, so size is rarely the constraint. Page geometry and fonts are.
Choose one page size
Pick the size before you design, not at export time. Resizing afterwards changes line breaks and can push text outside the margins.
| Format | Size (points) | Aspect ratio | Notes |
|---|---|---|---|
| Portrait | 1080 x 1350 | 4:5 | Uses the most phone screen. This is the size used in this tutorial. |
| Square | 1080 x 1080 | 1:1 | Safe on desktop and mobile, with less vertical room for text. |
| Landscape | 1920 x 1080 | 16:9 | Familiar from slide decks, but small on a phone. Text must be larger. |
A PDF measures pages in points, where 72 points equal one inch. A 1080 x 1350 page is therefore 15 x 18.75 inches. This is unusual for print but fine for a screen document, because the viewer scales the page to fit the display. What matters is the ratio and that the numbers match on every page. Make type large relative to the page: body text around 40 points and titles around 64 points on a 1080-wide page stay readable when the whole page shrinks to a phone width.
Export from a design tool
If you build slides in a presentation or design tool, follow this order:
- Set the page or slide size to your chosen format before adding content.
- Use the same master layout, margins and fonts on every slide.
- Export with the "PDF" or "Standard/Print" option, not as a stack of images, so the text stays selectable and the file stays small.
- Choose one page per slide. Turn off speaker notes, handouts and multiple slides per page.
- Open the result and scroll through it once at full screen.
Avoid exporting each slide as a screenshot and combining the images. Image-only PDFs are larger, text cannot be selected or searched, and a low-resolution capture looks blurry once the reader pinches to zoom.
Export from a script
A script gives exact, repeatable page sizes, which suits a series of carousels with the same look. This version extends the generator from the earlier example. It paints a background on every page, sets document metadata, and prints a page counter in the bottom corner.
import textwrap
from reportlab.pdfgen import canvas
WIDTH, HEIGHT = 1080, 1350 # portrait pages, in PDF points
MARGIN = 80
BACKGROUND = (0.07, 0.13, 0.25) # dark blue, RGB values from 0 to 1
TEXT_COLOR = (1, 1, 1) # white
slides = [
("3 findings from the 2026 survey", "Swipe to see what changed."),
("1. Teams use fewer tools", "Most respondents consolidated their toolset this year."),
("Want the full report?", "Link in the first comment."),
]
pdf = canvas.Canvas("carousel.pdf", pagesize=(WIDTH, HEIGHT))
pdf.setTitle("3 findings from the 2026 survey")
pdf.setAuthor("Your Name")
for index, (title, body) in enumerate(slides, start=1):
# Background first, so text is drawn on top of it
pdf.setFillColorRGB(*BACKGROUND)
pdf.rect(0, 0, WIDTH, HEIGHT, stroke=0, fill=1)
pdf.setFillColorRGB(*TEXT_COLOR)
y = HEIGHT - 200
pdf.setFont("Helvetica-Bold", 64)
for line in textwrap.wrap(title, width=24):
pdf.drawString(MARGIN, y, line)
y -= 80
y -= 40
pdf.setFont("Helvetica", 40)
for line in textwrap.wrap(body, width=36):
pdf.drawString(MARGIN, y, line)
y -= 56
pdf.setFont("Helvetica", 28)
pdf.drawRightString(WIDTH - MARGIN, 60, f"{index}/{len(slides)}")
pdf.showPage()
pdf.save()Three details keep the output consistent:
pagesizeis set once on the canvas, so everyshowPage()produces a page of that size.- The background rectangle is drawn on every page. PDF has no page background setting, so a page without a rectangle is white.
textwrap.wrapbreaks lines by character count, not by measured width. Thewidthvalues of 24 and 36 are tuned for Helvetica at these sizes. If you change fonts or sizes, re-check the longest line on each slide.
Fonts
The font names Helvetica, Helvetica-Bold and Times-Roman are among the 14 standard PDF fonts. Every viewer supplies them, so they need no embedding. This is why the example always renders the same way. If you register your own TrueType font with reportlab, the library embeds the glyphs it uses. If you export from a design tool, make sure the export setting embeds fonts. A PDF that references a font it did not embed can fall back to a different one on the reader's device, which changes line lengths and can break your layout.
Standard fonts cover basic Latin text only. Curly quotes and the euro sign usually work. Emoji, arrows and accented characters outside the Western European set often do not. If a character shows as a black square or is missing, switch to an embedded font that includes it, or remove the character.
Verify the PDF before uploading
Do not trust the export. This script opens the file, lists each page's size and rotation, and exits with an error if they differ. It requires the pypdf library used earlier for text extraction.
import os
import sys
from pypdf import PdfReader
path = sys.argv[1] if len(sys.argv) > 1 else "carousel.pdf"
reader = PdfReader(path)
layouts = set()
for number, page in enumerate(reader.pages, start=1):
width = round(float(page.mediabox.width))
height = round(float(page.mediabox.height))
layouts.add((width, height, page.rotation))
print(f"Page {number}: {width} x {height}, rotation {page.rotation}")
size_mb = os.path.getsize(path) / (1024 * 1024)
print(f"{len(reader.pages)} pages, {size_mb:.2f} MB")
if len(layouts) != 1:
sys.exit(f"Inconsistent pages: {sorted(layouts)}")
print("OK: every page has the same size and rotation")Comparing the rotation along with the size matters. A page stored as 1350 x 1080 with a rotation of 90 displays as portrait, but a page stored as 1080 x 1350 with a rotation of 0 displays the same way. The set would contain two entries, so the script flags a mix that a size-only check would miss.
Then do the checks a script cannot do:
- Open the PDF on your phone, not only on a desktop. Check that the smallest text is readable at arm's length.
- Swipe through slowly and look for jumps in layout, clipped text, or a missing background.
- Confirm the page count matches your slide plan, with no blank trailing page.
- Select text on one page. If you cannot, the PDF is image-only, which is acceptable only if you chose that deliberately.
Common export problems
| Symptom | Likely cause | Fix |
|---|---|---|
| Page 5 looks smaller than the others | Slide sized differently in the source | Reset the slide size and re-export, then run the checker |
| Text wraps differently than in the editor | Font not embedded, so a substitute was used | Embed fonts in the export settings or use a standard font |
| White strip at the page edge | Background shape does not cover the full page | Extend the background beyond the page boundary |
| Blank last page | Extra empty slide or an extra `showPage()` call | Delete the slide, or remove the call |
| Blurry text when zoomed | Slides were exported as low-resolution images | Export as vector PDF with live text |
| File over 10 MB for a few slides | Large photos embedded at full resolution | Resize photos to about twice their display size before placing them |
Name the file for what it is, such as 2026-survey-findings-carousel.pdf. LinkedIn shows the document title to readers, which it takes from the title you enter when uploading or from the file name. A name like final_v3_export.pdf is unhelpful there.
Exercise
You export a five-slide carousel and your checker script prints "Inconsistent pages: [(1080, 1350, 0), (1350, 1080, 90)]". Both sets of dimensions look like portrait on screen. Why is this still a problem to fix, and what do you do?
Show answer
One page is stored as landscape (1350 x 1080) and rotated by 90 degrees to look portrait. Some viewers and tools handle rotation differently, and it signals that the slide was built with different settings from the others. Find the slide whose size or orientation differs in the source, reset it to the shared portrait size (1080 x 1350), re-export, and run the checker again until it reports a single (width, height, rotation) combination.
Exercise
Why is a PDF made by exporting each slide as a screenshot and merging the screenshots usually worse than a vector PDF with live text? Give two reasons.
Show answer
Image-only pages produce larger files and cannot be searched or have text selected. They also look blurry when the reader zooms, because the text is fixed-resolution pixels instead of scalable shapes.