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 May 26, 2020 2:57 pm

Hello, I'm trying to print a pdf on a Datamax label printer.
No matter what settings I specify, the label is always rotated by 90 degrees.

I could not manage to have the label print correctly.

I tried other libraries for pdf printing and they work without problem.

The pdf is very simple, just one page, same size as the paper on the printer.

animha74
 
Posts: 1
Joined: Tue May 26, 2020 2:51 pm

Wed May 27, 2020 2:54 am

Hello,

Thanks for your inquiry.
Do you want to control printing orientation (landscape/portrait)? If so, please refer to the code below.
Code: Select all
    PdfDocument doc = new PdfDocument();
    doc.LoadFromFile("rpt_20200526142904.pdf");
    doc.PrintSettings.SelectSinglePageLayout(PdfSinglePageScalingMode.FitSize, false);
    //Portrait
    doc.PrintSettings.Landscape = false;
    ////Landscape
    //doc.PrintSettings.Landscape = true;
    doc.Print();

Or if I misunderstood, to help us better look into your issue, please provide your printout as well as your expected output.

Sincerely,
Rachel
E-iceblue support team
User avatar

rachel.lei
 
Posts: 1571
Joined: Tue Jul 09, 2019 2:22 am

Return to Spire.PDF