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
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.