VB.Net Merge multiple pdfs into one and export

后端 未结 4 533
小蘑菇
小蘑菇 2020-12-11 11:13

I have to merge multiple PDFs into a single PDF.

I am using the iText.sharp library, and collect converted the code and tried to use it (from here) The actual code

4条回答
  •  长情又很酷
    2020-12-11 11:39

    Some may have to make a change to the code at "writer = PdfWriter.GetInstance(pdfDoc, New FileStream(outputPath, FileMode.OpenOrCreate))" as iTextSharp may not support

    Change to:

    Dim fs As IO.FileStream = New IO.FileStream(outputPath, IO.FileMode.Create)
    
    writer = iTextSharp.text.pdf.PdfWriter.GetInstance(pdfDoc, fs)
    

提交回复
热议问题