<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: raptorgold</title>
    <description>The latest articles on DEV Community by raptorgold (@raptorgold).</description>
    <link>https://dev.to/raptorgold</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3838977%2F211447e4-f807-428c-9e68-dae7bb9480ba.png</url>
      <title>DEV Community: raptorgold</title>
      <link>https://dev.to/raptorgold</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/raptorgold"/>
    <language>en</language>
    <item>
      <title>I built a CLI tool to assemble pages from PDFs, Word docs, and PowerPoint into one file</title>
      <dc:creator>raptorgold</dc:creator>
      <pubDate>Sun, 22 Mar 2026 22:28:59 +0000</pubDate>
      <link>https://dev.to/raptorgold/i-built-a-cli-tool-to-assemble-pages-from-pdfs-word-docs-and-powerpoint-into-one-file-npd</link>
      <guid>https://dev.to/raptorgold/i-built-a-cli-tool-to-assemble-pages-from-pdfs-word-docs-and-powerpoint-into-one-file-npd</guid>
      <description>&lt;h2&gt;
  
  
  The problem
&lt;/h2&gt;

&lt;p&gt;Every time I needed to put together a report or proposal I was doing the&lt;br&gt;
same manual process — export this PDF, convert that Word doc, grab slides 3-5 from a PowerPoint, then merge everything in some online tool that wanted me to upload confidential documents to their servers.&lt;/p&gt;

&lt;p&gt;It's a solved problem that somehow still takes 15 minutes every time.&lt;/p&gt;

&lt;p&gt;So I built PageFuse.&lt;/p&gt;




&lt;h2&gt;
  
  
  What it does
&lt;/h2&gt;

&lt;p&gt;PageFuse is a CLI tool that assembles pages from multiple document formats&lt;br&gt;
into a single output file.&lt;/p&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
bash
  pagefuse assemble board_pack.pdf cover.pdf:1 financials.docx:all slides.pptx:2-5

  That pulls page 1 from a PDF, all pages from a Word doc, and slides 2-5
  from a PowerPoint into one PDF. Done in seconds.

  ---
  Page specs

  pagefuse assemble out.pdf file.pdf:1        # single page
  pagefuse assemble out.pdf file.pdf:1-3      # range
  pagefuse assemble out.pdf file.pdf:1,3,5-8  # mixed
  pagefuse assemble out.pdf file.pdf:all      # all pages

  ---
  Config files for repeatable builds

  For documents you rebuild regularly — weekly reports, monthly packs,
  proposals — save a .fuse config:

  output: board_pack.pdf
  output: board_pack.docx

  from: cover.pdf          1
  from: financials.docx    all
  from: slides.pptx        2-5

  Then just:

  pagefuse assemble board_pack.fuse

  Commit the config to your repo. Run it in a Makefile or CI pipeline.
  Same output every time.

  ---
  Split works too

  pagefuse split report.pdf cover.pdf:1 body.pdf:2-10 appendix.docx:11-20

  Each output can be a different format.

  ---
  Supported formats

  ┌────────┬─────────────────────────────────────────────────────────────────────────────────────┐
  │        │                                       Formats                                       │
  ├────────┼─────────────────────────────────────────────────────────────────────────────────────┤
  │ Input  │ PDF, DOCX, DOC, PPTX, PPT, ODT, ODP, ODS, XLSX, RTF, HTML, Markdown, PNG, JPG, TIFF │
  ├────────┼─────────────────────────────────────────────────────────────────────────────────────┤
  │ Output │ PDF, DOCX, ODT, PPTX, ODP, HTML, PNG, JPG, TIFF                                     │
  └────────┴─────────────────────────────────────────────────────────────────────────────────────┘

  ---
  How it's built

  - Click — CLI framework
  - pikepdf — PDF read/write/assembly (lossless, no re-rendering)
  - LibreOffice headless — DOCX/PPTX/ODT/HTML conversion
  - img2pdf — lossless image → PDF
  - pypdfium2 — PDF → image rendering
  - Rich — terminal output
  - ThreadPoolExecutor — parallel file loading

  PDF-to-PDF assembly is lossless and fast — no rendering involved.
  Non-PDF inputs go through LibreOffice headless for conversion,
  assembled to a temp PDF first, then converted to the target format.

  ---
  Install

  pip install pagefuse
  # or
  pipx install pagefuse

  Requires LibreOffice for DOCX/PPTX/ODT/HTML conversion:

  sudo apt install libreoffice       # Ubuntu/Debian
  brew install --cask libreoffice    # macOS

  ---
  What's next

  - GUI wrapper
  - Homebrew formula
  - Watch mode for auto-rebuilding on file change

  ---
  30-day free trial, no credit card: pagefuse.net

  Would love feedback on the config format, the feature set, or anything
  else. What formats or features would make this useful for your workflow?
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

</description>
      <category>cli</category>
      <category>python</category>
      <category>productivity</category>
    </item>
  </channel>
</rss>
