FlareStart
HomeNewsHow ToSources
FlareStart

Where developers start their day. All the tech news & tutorials that matter, in one place.

Quick Links

  • Home
  • News
  • Tutorials
  • Sources
  • Privacy Policy

Connect

© 2026 FlareStart. All rights reserved.

Back to articles
Splitting a PDF Is Easier Than Merging One
NewsWeb Development

Splitting a PDF Is Easier Than Merging One

via Dev.to WebdevMichael Lip2h ago

A PDF file is a collection of pages with a cross-reference table that maps page numbers to byte offsets. Splitting extracts pages by creating a new file with only the selected page references. No re-encoding required. How splitting works internally A PDF file has a structure like this: Header Body (objects: pages, fonts, images, etc.) Cross-reference table (maps object numbers to byte offsets) Trailer (points to the root object and cross-reference table) Splitting a PDF means: Reading the cross-reference table Identifying which objects belong to the desired pages Copying those objects to a new file Writing a new cross-reference table and trailer Handling shared resources (fonts, images used by multiple pages) The "shared resources" part is the complication. If pages 1 and 5 share an embedded font, splitting out page 5 alone must include that font in the new file. Common split patterns Range extraction: Pages 1-5 from a 20-page document. Most common for extracting chapters or sections.

Continue reading on Dev.to Webdev

Opens in a new tab

Read Full Article
2 views

Related Articles

Percentage Change Is Not Symmetric and That Breaks Dashboards
News

Percentage Change Is Not Symmetric and That Breaks Dashboards

Dev.to Beginners • 2h ago

Three Percentage Formulas That Cover Every Situation
News

Three Percentage Formulas That Cover Every Situation

Dev.to Beginners • 2h ago

2 Years on DEV!
News

2 Years on DEV!

Dev.to • 2h ago

A former Thiel fellow’s startup just launched a drone it says can replace police helicopters
News

A former Thiel fellow’s startup just launched a drone it says can replace police helicopters

TechCrunch • 2h ago

The Hidden Fees in Currency Exchange That Your Bank Does Not Advertise
News

The Hidden Fees in Currency Exchange That Your Bank Does Not Advertise

Dev.to Beginners • 3h ago

Discover More Articles