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.

Thu Feb 16, 2017 7:53 am

Hey,

we are using the free version auf spire.pdf to print pdfs stored as byte array in DB.

Now we have to print a document with a barcode on it (Code 128).

The original document is wellformed and if we write the bytes into a file and open it with Adobe everything looks fine.

But, if I print it out with spire.pdf the barcode isn't printed and shows only letters.

I tried also the commercial version as trial but the result was the same.

Any hints how to fix this issue?

t.malkmus
 
Posts: 6
Joined: Wed Feb 15, 2017 3:39 pm

Thu Feb 16, 2017 8:33 am

Dear t.malkmus,

Thanks for your inquiry.
We will appreciate it if you could offer us the sample file which has issue for further investigation.

Thanks,
Betsy
E-iceblue support team
User avatar

Betsy.jiang
 
Posts: 3099
Joined: Tue Sep 06, 2016 8:30 am

Thu Feb 16, 2017 10:13 am

Because the pdf includes some sensible costumer data, it is not so easy to post this document here. I will try to figure out, how to generate a document with the barcode and without the data.

t.malkmus
 
Posts: 6
Joined: Wed Feb 15, 2017 3:39 pm

Thu Feb 16, 2017 4:25 pm

Here I have extracted the second page of the pdf. With this the problem should be the same as with the full pdf (3 pages).

t.malkmus
 
Posts: 6
Joined: Wed Feb 15, 2017 3:39 pm

Fri Feb 17, 2017 2:45 am

Dear t.malkmus,

Many thanks for the file.
I have tested the file with the latest Spire.PDF Pack(Hot Fix) Version:3.8.173, it works fine, I have attached the result for checking.
Please use this version, if there is any question, please let me know.

Sincerely,
Betsy
E-iceblue support team
User avatar

Betsy.jiang
 
Posts: 3099
Joined: Tue Sep 06, 2016 8:30 am

Mon Feb 20, 2017 9:03 am

Hi, attached you find 2 Screenshots. The original is the pdf shown in Adobe, the second one (printed) is the one printed with this lines of code:

Code: Select all
 
public void Print(string pFileName, PrinterSettings pPrinterSettings)
        {

            Spire.Pdf.PdfDocument doc = new Spire.Pdf.PdfDocument();
            doc.LoadFromFile(pFileName);

            doc.PrintDocument.PrinterSettings = pPrinterSettings;
            doc.PrintDocument.Print();
        }


where the selected printer was the Office XPS Printer. But the result is the same with every printer. I have testet it on different machines, everytime the barcode isn't shown correctly.

t.malkmus
 
Posts: 6
Joined: Wed Feb 15, 2017 3:39 pm

Mon Feb 20, 2017 9:48 am

Dear t.malkmus,

Thanks for the information.
Did you test the version I mentioned ? I can print the barcode on the file you sent to me on my side correctly with the version. In addition I found the file showing on screenshot is not the file you sent to me. Could you please offer the same file to us(support@e-iceblue.com) via email for further investigation ? We promise to keep it confidential and won’t use it for any other purpose.
In addition, please provide us the OS information of the computer which has issue, e.g. Win7 64bit.

Thanks,
Betsy
E-iceblue support team
User avatar

Betsy.jiang
 
Posts: 3099
Joined: Tue Sep 06, 2016 8:30 am

Mon Feb 20, 2017 10:12 am

Yes, i loaded the Version:3.8.173 again (I already testet it with this version the first time)

The screenshots I send to you is from the first page of the pdf. Like I mentioned before, the pdf contains 3 pages with same header and I posted only the second page because the is no customer data included.

Its been testet on Windows 10 with VS2017 and VS2015

t.malkmus
 
Posts: 6
Joined: Wed Feb 15, 2017 3:39 pm

Tue Feb 21, 2017 3:13 am

Dear t.malkmus,

Thanks for the information.
I have tested the file you provided before on Win10 VS2015, but unfortunately I still cannot reproduce the issue on my side. The result is correct as before.
Here is my testing code.
Code: Select all
            PdfDocument doc = new PdfDocument();
            doc.LoadFromFile(@"F:\testing\EBD17DE335654682788E0.pdf");
            doc.PrintDocument.Print();

What is the PrinterSettings in your code ?
And I am afraid it is difficult to find reason caused your issue and then fix it if we cannot reproduce the issue.

Sincerely,
Betsy
E-iceblue support team
User avatar

Betsy.jiang
 
Posts: 3099
Joined: Tue Sep 06, 2016 8:30 am

Tue Feb 21, 2017 9:49 am

I found out, why the example I postet before could printed correctly.

In the attached files you can see, in the exported second page pdf the fonts is embedded not so in the original pdf.

So like you mentioned before, I will send you the original pdf via email.

Thank you for your help!

t.malkmus
 
Posts: 6
Joined: Wed Feb 15, 2017 3:39 pm

Wed Feb 22, 2017 5:36 am

Dear Torsten,

After further investigation, we found the file(tmpD1D2.pdf) you sent doesn’t display the barcode in Adobe on my side. I have installed the code128 font on the computer, and test it on three computers, but all don’t display the barcode in Adobe. And I have attached the files via email, please check it on email.
Maybe I do something wrong. We would much appreciate it if you could provide us below information.
1) Code128 font installation package you were using.
2) Adobe version on your side.
3) Region and Language.

Sincerely,
Betsy
E-iceblue support team
User avatar

Betsy.jiang
 
Posts: 3099
Joined: Tue Sep 06, 2016 8:30 am

Tue Apr 11, 2017 8:27 am

Dear Torsten,

Thanks for waiting.
Now the issue has been fixed in Spire.PDF Pack(Hot Fix) Version:3.9.27. Welcome to test it.
Looking forward to your feedback.

Sincerely,
Betsy
E-iceblue support team
User avatar

Betsy.jiang
 
Posts: 3099
Joined: Tue Sep 06, 2016 8:30 am

Return to Spire.PDF