I am using the below function to split the pdf into two.
Though it is spliting the pdf, the content is appearing upside down. How do I rotate it by 180 degrees.
A little change in above code old code
case 270: writer.DirectContent.AddTemplate(importedPage, 0, 1f, -1f, 0, pageWidth, 0);
new code
case 270: writer.DirectContent.AddTemplate(importedPage, 0, 1f, -1f, 0, pageHeight, 0);
This will fix the issue with 270 degree rotation