3

I just want to know if Mozilla's pdf.js can modify PDFs or it is just strictly for viewing PDFs only.

developarvin
  • 4,940
  • 12
  • 54
  • 100
  • 1
    It converts PDF's to HTML5 so you can access the content like any other HTML element, but the script does not currently support modifying during/before convertion as far as I know. – adeneo Aug 23 '12 at 06:04

2 Answers2

7

No. pdf.js is currently only a PDF reader (renderer), as stated by their README. Check out Generating PDF files with Javascript if you want to generate PDFs with Javascript.

Community
  • 1
  • 1
nneonneo
  • 171,345
  • 36
  • 312
  • 383
1

Yes, starting in pdf.js v2.15.349 they added an "Editor" mode which became enabled by default in version 3.x. I have not been able to find anything about it in the docs. The FAQ still says editing is not supported.

To be clear, you can't modify the elements in the existing PDF, but you can add text, images, or drawings on top and download the overlayed version.

See the demo

bendytree
  • 13,095
  • 11
  • 75
  • 91