split huge 40000 page pdf into single pages, itextsharp, outofmemoryexception

后端 未结 5 790
清酒与你
清酒与你 2021-01-31 21:40

I am getting huge PDF files with lots of data. The current PDF is 350 MB and has about 40000 pages. It would of course have been nice to get smaller PDFs, but this is what I hav

5条回答
  •  星月不相逢
    2021-01-31 22:05

    From what I have read, it looks like when instantiating the PdfReader that you should use the constructor that takes in a RandomAccessFileOrArray object. Disclaimer: I have not tried this out myself.

    iTextSharp.text.pdf.PdfReader reader = new iTextSharp.text.pdf.PdfReader(new iTextSharp.text.pdf.RandomAccessFileOrArray(@"C:\PDFFile.pdf"), null);
    

提交回复
热议问题