Pdf page orientation

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Pdf page orientation

We are using the below code:

  MemoryStream outputStream = new MemoryStream();
            iTextSharp.text.pdf.PdfReader reader = new iTextSharp.text.pdf.PdfReader(sourceStream);
            iTextSharp.text.pdf.PdfStamper pdfStamper = new iTextSharp.text.pdf.PdfStamper(reader, outputStream);
            pdfStamper.FormFlattening = true;
            pdfStamper.Writer.CloseStream = false;

            outDoc = PdfReader.Open(outputStream, PdfDocumentOpenMode.Modify);

the problem is when we upload a pdf which has page orientation and when we view the width changes to fit as portrait. Please advice if there us any parameter to maintain the page orientation