We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

PDF print not working in client machine


We have a requirement where a user has an option to clicking on a print button, the pdfs should print in the client machine (user) default printer. Code deployed in server machine.

Print pdf is not working in client machine.So please provide us the solution for this issue.

Please find the below used code for your reference

Aspose.Pdf.Facades.PdfViewer viewer = new Aspose.Pdf.Facades.PdfViewer();

viewer.BindPdf(@"c:\test\test.pdf");-->PDF file is in server

viewer.AutoResize = true;

viewer.Resolution = 600;

viewer.AutoRotate = true;

viewer.PrintPageDialog = false

System.Drawing.Printing.PrinterSettings ps = new System.Drawing.Printing.PrinterSettings();

System.Drawing.Printing.PageSettings pgs = new System.Drawing.Printing.PageSettings();

pgs.PaperSize = new System.Drawing.Printing.PaperSize("A4", 827, 1169);

pgs.Margins = new System.Drawing.Printing.Margins(0, 0, 0, 0);

viewer.PrintDocumentWithSettings(pgs, ps);




Hi Gawaskar,

Thanks for your inquiry. Could you please confirm the error message you are getting, while using above code? Furthermore, please also confirm which Aspose.Pdf API version are you using?.

Sorry for the inconvenience faced.

Best Regards,

Hi Gawaskar,

Thanks for contacting support.

Adding more to Tilal’s comments, when using the above code snippet, the default printer attached to system is used to print the document. Furthermore, when you are trying to print the file, the file is not getting printed at all or the printer attached to server is being used.

Hi Team,

We are not getting any error.When using the above code snippet, the file is not getting printed at all in client machine.We are using Aspose pdf version

We need to print pdf from client default printer.Please test and provide us the solution for this issue.


print pdf is working only if we use the code in local.

Print pdf is not working if we deployed the code in server and print from client machine

Thanks and Regards


Hi Gawaskar,

Sorry for the delayed response.

We are further looking into the details of this issue and will get back to you soon.

Hi Gawaskar,

Thanks for your patience. I've managed to observe the printing issue in web application. For further investigation I've logged an issue in our issue tracking system as PDFNEWNET-34998 and also linked your request to it. We will keep you update via this thread regarding the issue status.

Please feel free to contact us for any further assistance.

Best Regards

Hi Team,

Kindly provide status on this ticket no PDFNEWNET-34998 . Please update us at the earliest, or give some workaround to overcome this issues.



Hi Gawaskar,

Thanks for your patience. Please note printers are usually installed on user’s profile (especially if it’s a network printer, not a physically connected one such as on USB or parallel cable). When Administrator sees a printer it doesn’t necessarily mean they’ll be available when other user is logging on the same machine. ASP.NET applications runs as ApplicationPoolIdentity or NerworkService credential by default so the web application is unlikely to see the printers there.

There are two solutions:

1) Create an account for .NET application pool to run on, and then login as that user on the server and add the printers there

2) Run on web site under Custom account (Identity property in site’s pereferences) that is already able to work with printers.

More information about application pool usage - http://www.iis.net/learn/manage/configuring-security/application-pool-identities

Best Regards

The issues you have found earlier (filed as PDFNEWNET-34998) have been fixed in Aspose.Pdf for .NET 9.2.0.

The blog post for this release is created over this link

This message was posted using Notification2Forum from Downloads module by Aspose Notifier.