Spire.PDF is a professional PDF library applied to creating, writing, editing, handling and reading PDF files without any external dependencies. Get free and professional technical support for Spire.PDF for .NET, Java, Android, C++, Python.

Tue Jun 14, 2022 7:20 am

Hi. I tried creating a pdf table with a data from my database. The columns (6) are packed and squeezed and not too nice to be read because the default pdf view is portrait. I think my problem will be solved if I create the pdf in landscape format. Please help me? Thank you very much.

animbenard
 
Posts: 3
Joined: Sun Jan 16, 2022 5:34 am

Tue Jun 14, 2022 7:38 am

Hello,

Thanks for your inquiry.

You can add a new page with landscape mode.

Code: Select all
PdfPageBase page= pdf.Pages.Add(new SizeF(580, 500),new Spire.Pdf.Graphics.PdfMargins(0),PdfPageRotateAngle.RotateAngle0,PdfPageOrientation.Landscape);


Or change the page settings to landscape mode.

Code: Select all
pdf.PageSettings.Orientation = PdfPageOrientation.Landscape;
Sincerely,
Andy
E-iceblue support team
User avatar

Andy.Zhou
 
Posts: 483
Joined: Mon Mar 29, 2021 3:03 am

Wed Jun 15, 2022 3:30 am

Thank you very much for your support. It worked very fine.

animbenard
 
Posts: 3
Joined: Sun Jan 16, 2022 5:34 am

Wed Jun 15, 2022 3:57 am

You are welcome!
Sincerely,
Andy
E-iceblue support team
User avatar

Andy.Zhou
 
Posts: 483
Joined: Mon Mar 29, 2021 3:03 am

Return to Spire.PDF

cron