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 May 16, 2018 8:29 am

Hello,

I try to print a PDF with Spire.Pdf and C#.

I have a problem with barcode.

The document is OK but lines of barcode are "crooked".

You can see my PDF and printed page on attachments.

I have the same problem with all my printers. But no problem with printer "Microsoft print to PDF".

My code :


Code: Select all
PdfDocument pdfdocument = new PdfDocument();

pdfdocument.LoadFromFile(myPDF);
pdfdocument.PrinterName = myPrinter;
pdfdocument.PrintDocument.PrinterSettings.Copies = 1;
pdfdocument.PrintDocument.Print();
pdfdocument.Dispose();


Thank you for help.

rvincent
 
Posts: 3
Joined: Wed May 16, 2018 7:45 am

Wed May 16, 2018 10:08 am

Hello,

Thanks for your inquiry.
I tried several printers including "Microsoft XPS Document Writer", "HP LaserJet P1007", and "Adobe PDF", all of them could output the correct result. To help us reproduce the issue, could you please provide the following information?
1. Try to print the pdf directly in Adobe using the printers you have tried before and tell us the result.
2. Try to use Spire.PDF to print to "Microsoft XPS Document Writer" and tell us the result.
3. The system configuration. Eg, Win 7, 64 bit.
4. The region information. Eg, China/Chinese.
Thanks in advance.

Sincerely,
Jane
E-iceblue support team
User avatar

Jane.Bai
 
Posts: 1156
Joined: Tue Nov 29, 2016 1:47 am

Wed May 16, 2018 11:48 am

1. With Adobe, the printed file is correct
2. With "Microsoft XPS Document Writer" and Spire.PDF, the barecode is wrong
3. Windows 10 Pro, 64 bits
4. France / French

Thank you

rvincent
 
Posts: 3
Joined: Wed May 16, 2018 7:45 am

Thu May 17, 2018 9:05 am

Hello,

Thanks for your details.
I'm sorry I still couldn't reproduce the issue even with the same environment, attached the result for checking. I suggest that you try the latest Spire.PDF Pack(Hot Fix) Version:4.5.3 which has more fixes with the following code.
Code: Select all
PdfDocument pdfdocument = new PdfDocument();
pdfdocument.LoadFromFile(myPDF);
pdfdocument.PrintSettings.PrinterName = myPrinter;
pdfdocument.Print();

If the issue still occurs, please share a sample project to help us look into it.
You could send it to us via email(support@e-iceblue.com).

Sincerely,
Jane
E-iceblue support team
User avatar

Jane.Bai
 
Posts: 1156
Joined: Tue Nov 29, 2016 1:47 am

Thu May 17, 2018 10:42 am

Thank you for the answer, i have the same issue.

Email was sent !

Thank you for help :)

rvincent
 
Posts: 3
Joined: Wed May 16, 2018 7:45 am

Fri May 18, 2018 2:10 am

Dear Vincent Rousseau,

Thanks for your email.
I finally find out why I couldn't reproduce the problem before. It is because that the original document you provided has some data part covered. This time, I managed to notice the issue with the complete document and referred it to our dev team.
Once there's any update, I will let you know.

Sincerely,
Jane
E-iceblue support team
User avatar

Jane.Bai
 
Posts: 1156
Joined: Tue Nov 29, 2016 1:47 am

Return to Spire.PDF

cron