Pdf page orientation

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

Pdf page orientation

Visk
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.SetPdfVersion(iTextSharp.text.pdf.PdfWriter.PDF_VERSION_1_7);
            pdfStamper.Writer.CloseStream = false;
            pdfStamper.Close();

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

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
Loading...