How to edit a pdf in the browser and save it to the server

前端 未结 7 1689
-上瘾入骨i
-上瘾入骨i 2020-12-13 02:55

Here are the requirements, the users needs to be able to view uploaded PDFs in the browser. They need to be able to add notes to the PDF and save the updated PDF to the ser

相关标签:
7条回答
  • 2020-12-13 03:41

    You can use GhostScript to render a PDF to JPEG.
    Command line example:

    gswin32c.exe -dSAFER -dBATCH -dNOPAUSE -sDEVICE=jpeg -r300 -sOutputFile=output.jpg input.pdf
    

    You need to call GhostScript via the command line version (as above) or use a wrapper. A Google search turned up this blog post:

    • A Simple C# Wrapper for Ghostscript

    For creating a new PDF you have two main alternatives:

    • Modify the JPEG and convert the JPEG into PDF (you can use GhsotScript for the conversion)
    • Use A PDF library that imports your original PDF and add data on top of that

    For PDF libraries see this SO question:

    • Building PDF Files with C#
    0 讨论(0)
提交回复
热议问题