Reading/Writing PDF Files in Visual C# Windows Forms

后端 未结 3 1473
广开言路
广开言路 2021-01-03 09:09

For a client, I need to be able to read and write PDF files. There are two downsides to this:

  1. I don\'t know how.
  2. I can\'t use any third-party copmonen
3条回答
  •  日久生厌
    2021-01-03 09:36

    Agree with the answers above. Implementing a PDF engine isn't a trivial task. If you need to do the full one reading and modifying PDF, then use third party library like suggested.

    I have worked with PDF document creation, management and etc for several years. Often I found that the requirement to handle PDF can be very basic and achieved quite easily but misunderstood. I will just list some options here to consider if one of your requirement fall in to this category:

    • For displaying PDF within you program, you can drop a browser control and setting the Navigate URL to the pdf document will automatically display the inline PDF just like in the IE browser.
    • If you need to produce from an existing document, you can simply use print driver like doPDF, PDFCreator and etc and automate the process of printing to the driver
    • If you are creating the document from Word, you can automated Word2007 and use the SaveAsPDF interface offered
    • If you need to transform it to different format, depending on the target format Ghostscript commands are worth checking out too.

提交回复
热议问题