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 Apr 23, 2015 1:04 am

Hi,

I'm using the free version of Spire.PDF to convert PDF files to XPS, but when I try to print the converted files unsing a normal printer, nothing happens.

But if I open the PDF file on Acrobat and print using Microsoft XPS Printer, and then try to print the XPS file to a normal printer the file is printed correctly.

And the file I'm using is just a simple test file, with only one line of text.

Can you help me?



Regards,

Jair

jair.minharo.salfer
 
Posts: 4
Joined: Wed Apr 22, 2015 4:48 pm

Thu Apr 23, 2015 7:24 am

Hello,

Thanks for your inquiry.
Could you please send us the pdf file? It would be helpful to replicate the issue and work out the solution for you ASAP.

Sincerely,
Sweety

E-iceblue support team
User avatar

sweety1
 
Posts: 539
Joined: Wed Mar 11, 2015 1:14 am

Thu Apr 23, 2015 11:27 am

Hi,

I uploaded the samples files, the two XPS files have some differences on: margins, page width.

I don't know if this is the reason for not printing.

I appreciate your quick response.

The code used to create the XPS:
Code: Select all
            //create PdfDocument instance and load file
            Spire.Pdf.PdfDocument doc = new Spire.Pdf.PdfDocument();

            //doc.PDFStandard.SaveToXPS(@"c:\temp\teste_xps.xps");           

            //convert Xps to PDF file format
            //doc.PageSettings.Margins.All = 10;
            //doc.CompressionLevel = Spire.Pdf.PdfCompressionLevel.BestSpeed;
             
            //doc.PageSettings.SetMargins(50);
            doc.PageScaling = Spire.Pdf.PdfPrintPageScaling.CustomSacle;
           
            doc.LoadFromFile(@"C:\temp\copia.pdf", Spire.Pdf.FileFormat.PDF);
           
            PaperSize paper = new PaperSize("A4", (int)PdfPageSize.A4.Width, (int)PdfPageSize.A4.Height);
            paper.RawKind = (int)PaperKind.A4;
            doc.PrintDocument.DefaultPageSettings.PaperSize = paper;
            //set the page size to be output automatically from the size of the PDF file:
            doc.PageScaling = PdfPrintPageScaling.ActualSize;
            //doc.PrintDocument.OriginAtMargins = true;

            doc.SaveToFile(string.Format(@"c:\temp\{0}.xps", "Copia_XPS"), Spire.Pdf.FileFormat.XPS);
            doc.Close();



Regards,
Jair

jair.minharo.salfer
 
Posts: 4
Joined: Wed Apr 22, 2015 4:48 pm

Fri Apr 24, 2015 7:57 am

Hello,

Thanks for your information.
I have tested your issue with Free Spire.PDF for .NET Version:3.2 , it worked well. The printer I used is HP LaserJet P1007. Could you please tell us what printer you use? Can you use another printer to test again?

Sincerely,
Sweety

E-iceblue support team
User avatar

sweety1
 
Posts: 539
Joined: Wed Mar 11, 2015 1:14 am

Mon Apr 27, 2015 5:15 am

Hello,

Has your issue been resolved? Could you please give us some feedback at your convenience?

Sincerely,
Sweety

E-iceblue support team
User avatar

sweety1
 
Posts: 539
Joined: Wed Mar 11, 2015 1:14 am

Sat May 09, 2015 12:19 pm

Hi,


Unfortunately it's not working, even if I try to print the generated file it doesn't print anything.

I'm using a Ricoh Aficcio printer. Printing PDF files just work fine.

Thank you for your reply.


If you can give me any further information I'll appreciate.


Regards,
Jair

jair.minharo.salfer
 
Posts: 4
Joined: Wed Apr 22, 2015 4:48 pm

Mon May 11, 2015 3:00 am

Hello,

Thanks for your feedback.
According to your information, the problem you mentioned is not caused by our product. This may be caused by printer settings. Please check it. And can you use another printer to test again?
If there are any questions, welcome to get it back to us.

Best Regards,
Sweety
E-iceblue support team
User avatar

sweety1
 
Posts: 539
Joined: Wed Mar 11, 2015 1:14 am

Tue May 12, 2015 9:23 am

Hello,

Has your issue been resolved? Could you please give us some feedback at your convenience?

Sincerely,
Sweety

E-iceblue support team
User avatar

sweety1
 
Posts: 539
Joined: Wed Mar 11, 2015 1:14 am

Fri May 15, 2015 11:00 am

HI,

It's not working, so I decided to use only PDF file, and not convert to XPS. Because I looked at the printer settings and I didn't find anything difference.

Thank you for your quick response and help.


Regards,
Jair

jair.minharo.salfer
 
Posts: 4
Joined: Wed Apr 22, 2015 4:48 pm

Mon May 18, 2015 7:33 am

Hello,

Thanks for your feedback.
Please try to directly print the pdf file which you have sent to us with the below method.
Code: Select all
PdfDocument doc = new PdfDocument();
doc.LoadFromFile(@"d:\copia.pdf");
doc.PrintDocument.Print();

If you still have issue, could you please tell us your os environment and Regional and Language Options?

Best Regards,
Sweety

E-iceblue support team
User avatar

sweety1
 
Posts: 539
Joined: Wed Mar 11, 2015 1:14 am

Tue May 19, 2015 2:49 am

Hello,

Has your issue been resolved?
Thanks for your feedback.

Sincerely,
Sweety

E-iceblue support team
User avatar

sweety1
 
Posts: 539
Joined: Wed Mar 11, 2015 1:14 am

Thu May 21, 2015 8:54 am

Hello,

Have you tried to print the pdf file directly?
Thanks for your response.

Best Regards,
Sweety

E-iceblue support team
User avatar

sweety1
 
Posts: 539
Joined: Wed Mar 11, 2015 1:14 am

Return to Spire.PDF