Publish PDF files as pages
Publish a PDF and get a page on your Flowershow site with the PDF in a viewer and a Download button. The PDF file itself stays at its own URL.
Give it this page as Markdown: https://flowershow.app/docs/guides/publish-pdf-files.md. For all of Flowershow, point it at https://flowershow.app/llms.txt.
Publish a PDF and Flowershow gives it a page on your site. report.pdf gets the page /report, with your site's navbar, sidebar and footer, and the PDF file itself is still at /report.pdf.
What you'll build
A page with the PDF's title, a line such as PDF · 14 pages · 2.3 MB, a Download button, and the PDF shown in a viewer. The pages fit the width of the screen, on phones too, and you can select and copy the text. You'll also learn how to link to the page and which file gets an address when two files share it.
You'll need: a Flowershow site and a PDF file. Time: about 2 minutes.
Step 1: Publish the PDF
Publish it the same way as any other file. All of these accept a PDF, on its own or in a folder:
- the
flCLI:fl report.pdf, or a folder containing it (see Publish from the terminal) - the dashboard's file import
- the drag-and-drop publish page
- GitHub repo sync (see Publish a GitHub repo)
- AI publishing through MCP
You should see the publish succeed, with no extra setup.
Step 2: Open the page
report.pdf gets the page /report. A file in a folder keeps its folder: notes/q3.pdf becomes /notes/q3. A PDF is never a folder's home page: index.pdf gets the page /index.
The page title is the PDF's own title (set in the document's properties), if it has a usable one, otherwise the file name: Q3_report-final.pdf becomes "Q3 report final". You should see the page with the title, the Download button and the PDF below.
Step 3: Link to the page or the file
/reportlinks to the page, for example[the Q3 report](/report).[report](report.pdf),[[report.pdf]]and![[report.pdf]]reach the PDF file, as they always have: links open the file and the embed shows it inside your page.
[[report]], without the extension, does not reach the PDF's page yet. Use /report.
You should see the first link open the page and the others open or embed the file.
Step 4: Update or remove it
Publish the PDF again and the page shows the new version. Delete the PDF and the page is removed.
PDFs that were already on your site before PDF pages existed stay plain files until you publish them again. Publishing again skips unchanged files, so save or edit the PDF and publish it again to give it a page.
Which file gets the address
Only one file can have a page at an address:
- A Markdown or Word page with the same name wins. With
report.mdandreport.pdfin one folder,/reportis the Markdown page and the PDF is only a file at/report.pdf. Soreport.mdcan link[the full report](report.pdf)as before. - A folder with the same name wins. With
blog.pdfnext to ablog/folder,/blogstays the folder's page.
The PDF that loses stays available at its own .pdf URL, with no warning.
Search
Text in the PDF is found by site search, and a search hit opens the page. The page description is the start of the PDF's text.
- A scanned PDF (pictures of pages, with no text layer) is found by its title only.
- A PDF over 25 MB still gets a page, titled from its file name, and is found by its title, but its text is not searched.
What is not included
- PDF pages appear in the sidebar, sitemap and search, but not in listing pages or the RSS feed. A PDF kept in
blog/for embedding doesn't turn into a blog post. - PDF pages have no frontmatter, so you can't set the title, description or tags. The title comes from the PDF's own title or the file name.
- PDF pages have no table of contents, comments, "copy as Markdown" or page actions, and are not listed in
llms.txt.
Troubleshooting
- My PDF only opens as a file, with no page → it was on your site before PDF pages existed. Publish it again (edit or re-save it first, as unchanged files are skipped). Or a Markdown or Word file, or a folder, has the same name: see Which file gets the address.
- The page title is the file name, not my document's title → the PDF has no title in its properties, or it is a placeholder such as "untitled" or a file name. Set the title in the PDF's properties, or rename the file, and publish again.
- Search doesn't find text in my PDF → it is scanned, so it has no text to search: run it through OCR (most PDF tools can) and publish again. Or it is over 25 MB: shrink it (for example by compressing its images) or split it, and publish again.
[[report]]doesn't link to the PDF's page → link to/reportinstead.