|145708||Jul 4,2019 03:22 PM UTC||Apr 8,2021 05:00 PM UTC||ASP.NET MVC - EJ 2||5|
||Tags: PDF Viewer|
Hi Mootaz,Thank you for your update.At present, EJ2 PDF Viewer control does not support splitting the PDF pages into multiple files. Can you please confirm us whether you are trying to split the pages like in the Acrobat PDF Viewer? However, we have added this feature to our features request list. It can be tracked through our feature management system.We do not have immediate plans to implement this feature. This feature will be available in any of our upcoming releases.Regards,Ramya T
FileStream docStream = new FileStream(DataPathBase + "Sample.pdf", FileMode.Open, FileAccess.Read);
PdfLoadedDocument loadedDocument = new PdfLoadedDocument(docStream);
for (int i = 0; i < loadedDocument.PageCount; i++)
//Creates a new document
PdfDocument document = new PdfDocument();
//Imports the pages from the loaded document
//Create a memory stream
MemoryStream stream = new MemoryStream();
//Save the document to stream
stream.Position = 0;
//Close the document
//Create a file stream
FileStream fileStream = new FileStream(DataPathOutput + "ImportPage_Output"+ i + ".pdf", FileMode.Create, FileAccess.Write);
byte bytes = stream.ToArray();
//Write bytes to file
fileStream.Write(bytes, 0, (int)bytes.Length);
//Dispose the streams
This post will be permanently deleted. Are you sure you want to continue?
Sorry, An error occured while processing your request. Please try again later.
This page will automatically be redirected to the sign-in page in 10 seconds.