Free Support Forum - aspose.com

Pdf to local printer issue

hi,

I have a Windows desktop application where we use the Aspose.Pdf.Kit.PdfViewer to send pdf documents to local printers.

However, what i am facing now is, if the default printer is not set as the local printer, then the program does not send the document for printing to the printer. I have a dialog box which allows the user to select the type of printer ( local printer, PdfCreator, AdobePdf etc,).

Here, even if the user selects the local printer option, the pdf is still printed to pdf ( when PdfCreator is selected as the Default Printer).

I am using the below method to send my pdf docs to print:

pdfFile.PrintDocument()

Can anyone please help?

isasmit:
However, what i am facing now is, if the default printer is not set as the local printer, then the program does not send the document for printing to the printer. I have a dialog box which allows the user to select the type of printer ( local printer, PdfCreator, AdobePdf etc,).

Here, even if the user selects the local printer option, the pdf is still printed to pdf ( when PdfCreator is selected as the Default Printer).

Hi Sasmit,

Thanks for using our products.

From above statement, do you mean if network printer is set as default printer and when you execute the PDF printing code using PdfViewer class, still the output is being generated in PDF format using PdfCreator. Please share the details so we may reply accordingly.

Thanks Nayyer Shahbaz for replying to my post.

Let me try and clarify the issue.

When the network printer is set as default, there is no issue. The document prints fine.

When the default printer is set as PDFCreator, that is when, even if i print the document ( selecting network printer from the dialog box) the document still prints in pdf.

I have checked the routine for printing and the network printer name is being passed to the function fine, in case if there is a question that may arise if the parameters being passed is the issue.

Please let me know if this clears some confusion around the issue and thanks in advance for helping.

isasmit:
Let me try and clarify the issue.

When the network printer is set as default, there is no issue. The document prints fine.

When the default printer is set as PDFCreator, that is when, even if i print the document ( selecting network printer from the dialog box) the document still prints in pdf.

Hi Sasmit,

I wonder I cannot find the PDFCreator as printer over my system. Can you please share how I can use it and set it as default printer. I am using PdfViewer to print the document.

Furthermore, can you please share the code snippet that you are using so that we can test the scenario at our end.