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.

Wed Nov 08, 2017 6:09 am

We are evaluating spire.pdf for .net single user license. But We are seeing issue with printing using spire.pdf. I have attached three output. I am attaching also the original document for your reference.

first one directly printed on thermal printer and works
second one is printed using following code and it works.
static void Main(string[] args)
{
ProcessStartInfo info = new ProcessStartInfo();
info.Verb = "print";
info.FileName = @"C:\Users\kirti\Desktop\TestPDF\test8.pdf";
info.CreateNoWindow = true;
info.WindowStyle = ProcessWindowStyle.Hidden;

Process p = new Process();
p.StartInfo = info;
p.Start();

p.WaitForInputIdle();
System.Threading.Thread.Sleep(10000);
if (false == p.CloseMainWindow())
p.Kill();
}
Third one is, I am trying print using spire.pdf with following code and it is always printing tiny. I tried changing pagescaling to all four options but it did not work.
using Spire.Pdf;
using System.Drawing;
using System.Drawing.Printing;

namespace printpdf
{
class pdfprinttest
{
static void Main(string[] args)
{
PrintMethod(@"C:\Users\kirti\Desktop\TestPDF\test8.pdf");
}

public static void PrintMethod(string path)
{

PdfDocument pdfdocument = new PdfDocument();
pdfdocument.LoadFromFile(path);
pdfdocument.PageScaling = PdfPrintPageScaling.CustomSacle;
pdfdocument.PrintDocument.Print();
}

}


}

Could you help us investing this issue, so that we can evaluate it fast please

prabhuss
 
Posts: 3
Joined: Thu Jun 16, 2016 4:20 pm

Wed Nov 08, 2017 7:56 am

Hello,

Thanks for your inquiry.
I did not find your attachments here. Would you please attach them again? Or you could send them to us via email(support@e-iceblue.com).

Best regards,
Simon
E-iceblue support team
User avatar

Simon.yang
 
Posts: 620
Joined: Wed Jan 11, 2017 2:03 am

Wed Nov 08, 2017 8:47 am

attaching files

prabhuss
 
Posts: 3
Joined: Thu Jun 16, 2016 4:20 pm

Wed Nov 08, 2017 10:26 am

Hello,

Thanks for your sharing. I find that your PDF itself has some blank space. I try to print the PDF with the three methods and the results are all the same. Please see the attached result. Please confirm if the PDF file is the one your were using.
I am using Spire.PDF Pack(Hot Fix) Version:3.9.431.


Best regards,
Simon
E-iceblue support team
User avatar

Simon.yang
 
Posts: 620
Joined: Wed Jan 11, 2017 2:03 am

Thu Nov 09, 2017 9:41 am

Hello Prabhu,

With further investigation, I have reproduced the issue on my side and logged it in our bug tracking system. Once it’s fixed, we will inform you immediately.

Sincerely,
Simon
E-iceblue support team
User avatar

Simon.yang
 
Posts: 620
Joined: Wed Jan 11, 2017 2:03 am

Fri Nov 17, 2017 8:42 am

Hello,

Thanks for your waiting. There is a solution to fix the issue. Please download Spire.PDF Pack(Hot Fix) Version:3.9.462 and refer to the below code snippet to have a try.
Code: Select all
            PdfDocument doc = new PdfDocument();
            doc.LoadFromFile(filename);
            PaperSize paperSize = new PaperSize();
            paperSize.Width = 283;//inch*100
            paperSize.Height = 826;//inch*100
            paperSize.RawKind = (int)PaperKind.Custom;
            doc.PrintSettings.PaperSize = paperSize;
            doc.PrintSettings.SelectSinglePageLayout(PdfSinglePageScalingMode.ActualSize, false, 100f);
            doc.Print();


Best regards,
Simon
E-iceblue support team
User avatar

Simon.yang
 
Posts: 620
Joined: Wed Jan 11, 2017 2:03 am

Mon Jul 12, 2021 8:03 am

Hi,
Good day

I am trying to print with free version FreeSpire.PDF 7.2.0, it prints but it is empty page. nothing prints.
please assist
my code

Spire.Pdf.PdfDocument pdfdocument = new Spire.Pdf.PdfDocument();
pdfdocument.LoadFromFile(@"c:\TestPrint\output3.pdf");
pdfdocument.PrintSettings.PrinterName = "PrinterName";
pdfdocument.PrintSettings.Color = false;
pdfdocument.Print();
pdfdocument.Dispose();

RajuGupta
 
Posts: 2
Joined: Tue Jul 06, 2021 10:28 pm

Mon Jul 12, 2021 10:46 am

Hello Raju,

Thank you for your inquiry.
In order to help us investigate your problem quickly and effectively, please provide your sample PDF file. You could attach it here or send it to us via email (support@e-iceblue.com). Thanks in advance.

Sincerely,
Annika
E-iceblue support team
User avatar

Annika.Zhou
 
Posts: 1648
Joined: Wed Apr 07, 2021 2:50 am

Wed Jul 14, 2021 4:56 pm

Hi Annika,
Thanks for the reply

It printed successfully
Didn't changed anything. not sure what went wrong
but it is working without any change
thank you

RajuGupta
 
Posts: 2
Joined: Tue Jul 06, 2021 10:28 pm

Thu Jul 15, 2021 1:24 am

Hi Raju,

Glad to hear that. If you have other questions about using Spire.PDF in the future, please feel free to contact us.

Sincerely,
Annika
E-iceblue support team
User avatar

Annika.Zhou
 
Posts: 1648
Joined: Wed Apr 07, 2021 2:50 am

Return to Spire.PDF