public byte[] PdfPagination(byte[] file, int itemsByPage, int page)
        {
            PdfDocument          pdfDocument = new PdfDocument(new PdfReader(new MemoryStream(file)));
            ICollection <byte[]> output      = new CustomPdfSplitter(pdfDocument).SplitByPageCount(itemsByPage);

            pdfDocument.Close();
            return(output.ElementAt(page));
        }
Example #2
0
        protected void ManipulatePdf(String dest)
        {
            PdfDocument pdfDoc = new PdfDocument(new PdfReader(RESOURCE));

            IList <PdfDocument> splitDocuments = new CustomPdfSplitter(pdfDoc, dest).SplitBySize(200000);

            foreach (PdfDocument doc in splitDocuments)
            {
                doc.Close();
            }

            pdfDoc.Close();
        }