Skip to content

This code uses "pdf-lib" to prepend a page to a pdf file. The output shows fine in Google Chrome for one input, but doesn't for another.

Notifications You must be signed in to change notification settings

mugli/demo-prepending-page-to-pdf

Repository files navigation

Demo: Prepending pages with pdf-lib shows different output in Google Chrome

This code uses pdf-lib to add a page at the beginning of a pdf file.

Two sample pdf files provided.

The output generated for input-working.pdf shows fine in Google Chrome (tested in macOS), but NOT for input-problematic.pdf

How to start

npm install
npm start

The paths of the generated output files will be printed in the console.

Please open them with Google Chrome (tested in macOS) to compare the results.

The Preview app, Firefox, Safari shows the same result for both outputs.

About

This code uses "pdf-lib" to prepend a page to a pdf file. The output shows fine in Google Chrome for one input, but doesn't for another.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published