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.

Fri Oct 19, 2018 2:36 pm

Hi,

I'm just testing Spire.PDF with the Free Version 4.3.1 and I am not able to print a PDF in landscape format. I have used different printers and settings. Is there a limitation in the free version?

Code: Select all

            PdfDocument doc = new PdfDocument();
            PdfPageSettings ps = new PdfPageSettings();

            ps.Margins.Top = 20;
            ps.Margins.Bottom = 20;
            ps.Margins.Left = 20;
            ps.Margins.Right = 20;
            ps.Size = PdfPageSize.A4;

            PdfPageBase page = doc.Pages.Add(ps.Size, ps.Margins, 0, PdfPageOrientation.Landscape );


            PdfBrush brush = new PdfSolidBrush(Color.Black);

            PdfTrueTypeFont font = new PdfTrueTypeFont(new Font("Arial", 18f, FontStyle.Bold));
 
            PdfStringFormat format = new PdfStringFormat(PdfTextAlignment.Left);
            format.CharacterSpacing = 1f;

            String text = "test test test";
            page.Canvas.DrawString(text, font, brush, 100, 100, format);
            doc.PrintDocument.PrinterSettings.DefaultPageSettings.Landscape = true;
            doc.PageScaling = PdfPrintPageScaling.FitSize;
            doc.PrintDocument.Print();

            doc.SaveToFile("test.pdf");
            doc.Close();

            Process.Start("test.pdf");


But i'm able to print the test.pdf without any problems with Adobe Acrobat!

master3lu
 
Posts: 1
Joined: Fri Oct 19, 2018 1:33 pm

Mon Oct 22, 2018 10:11 am

Hi,

Thanks for your inquiry and sorry for the late reply as weekend.
Free version indeed has the problem, so sorry that we have no plan to maintain the free version at present. I have confirmed that your case worked well using Spire.PDF Pack(Hot Fix) Version:4.10.3. Please download it and try again. Besides, we have adjusted the printing function of the commercial version. Please refer to the below method.
Code: Select all
...
doc.PrintSettings.Landscape = true;            doc.PrintSettings.SelectSinglePageLayout(Spire.Pdf.Print.PdfSinglePageScalingMode.FitSize);
doc.Print();

To help you remove the warning message and have a better evaluation on our commercial version. Our sales team has sent you a one-month free license of Spire.PDF. Here is a guidance on how to apply license. How to Apply the License by license key.

Sincerely
Anna
E- iceblue support team
User avatar

Anna.Zhang
 
Posts: 73
Joined: Thu Sep 27, 2018 3:20 am

Thu Oct 25, 2018 8:51 am

Hi,

Greetings from E-iceblue.
Has your issue been fixed with the commercial version?
Could you please give us some feedback at your convenience? Thanks in advance.

Sincerely
Anna
E- iceblue support team
User avatar

Anna.Zhang
 
Posts: 73
Joined: Thu Sep 27, 2018 3:20 am

Return to Spire.PDF

cron