Question: How can I know how many pages there are in my memorystream?
I have a base64String. In it there is the base64 encoded information of a PDF file.
I can use the PdfPageEditor to resize it (zoom).
But how can I know how many pages there are in the Pdf (base64String, decodedBytes or resized outputfile or outputstream)?
string base64String = "JVBE ........";
byte decodedBytes = Convert.FromBase64String(base64String);
MemoryStream stream1 = new MemoryStream(decodedBytes);
string inputfile2 = path + "./App_Data/TestSjabloon.pdf";
// --- INVOEGEN ---
PdfPageEditor pageEditor = new PdfPageEditor();
pageEditor.BindPdf(stream1); //als je een stream wilt invoegen
pageEditor.Zoom = (float)0.88;
pageEditor.Save(@"C:\Temp\TestResized.pdf"); //Or save in a stream
// And here I want to know how many pages there are in the PDF so that I can insert all the pages in another PDF (stamp) and after inserting uodating the index with the correct number of inserted pages!