Menu

Post image 1
Post image 2
1 / 2
0

Generating LinkedIn Carousels as Multi-Page PDFs With Puppeteer

DEV Community·Nicolas Lecocq·21 days ago
#CfD7NuGj
#puppeteer#pdf#node#await#slide#const
Reading 0:00
15s threshold

LinkedIn carousels are not images. They are PDFs, one page per slide, uploaded as a document attachment to the share. LinkedIn's renderer turns each page into a swipeable slide on the feed. This is one of those things that took me three failed uploads to figure out, because the documentation says "carousel" and your mind says "image sequence." Once you know it is a PDF, the pipeline is straightforward. Render HTML templates to PDF with Puppeteer, upload the PDF to LinkedIn as a document, attach to a share. Here is the working setup. The HTML template approach Each slide is a 1080x1350 HTML page. I render them with React on the server, write the HTML to disk, then point Puppeteer at it.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.

Read More