Printing from the server

Does PDF.Kit support printing from the server (spooling)? The product information page seems to say that this is supported in the Java version but not the .Net version.

Hi,

Thank you for considering Aspose.

We have supported printing in PdfViewer but this feature is not perfect. We are still working on this issue to make it work better. I hope the new version of this feature can be available in about a month.

What are the issues? Our needs are very simple - we loop through a number of PDF files and print them each one by one. We need to be able to dynamically set the target printer. Preferably, it should support a network printer, but we could get by with a local printer.

Would PrintDocumentWithSettings accomplish this? When you say it isn't perfect, do you mean it is missing functionality, or it doesn't work consistently?

What do you anticipate will be in the new feature?

Dear dereka,

Here is the issue concerned by developers:

The printing effect issue: At present, it is not a workable solution for the pdf document containing complicated structure such as images, tables, forms and so on. Only pdf documents written with plain texts have acceptable printing outcoming.

My question is simular yet a bit different:



I use pdf.kit in an asp.NET application where users can create PDF-files dynamicly (with form-function).



I want to usethe print-function too, but because this is as server-side application I have not yet found how to do this.



I want users to be able to print to a network-printer from the server (not from the client!).



I understand that the pdfviewer-function is not yet able to do this, but I hope it will be in the near future. In the meanwhile, can you tell me how?

We need to investigate this issue and then reply to you.

Hi,

Thank you for considering Aspose.

In currect version, you could setup some options such as paper size by using PrintDocumentWithSettings function. We did not support network printers in current version of pdf.kit. We will consider this in the follow release.

The current version of pdfviewer can not support some tag or format. We will improve this in the next version.

Thanks,

While I'm waiting for the new release, could you give me an example how to use

PrintDocumentWithSettings?

Hi,

[C#]

using System.Drawing.Printing;

....

PrinterSettings printerSettings = new PrinterSettings();
PageSettings pageSettings=new PageSettings(printerSettings);
this.viewerPanel.myViewer.PrintDocumentWithSettings(pageSettings, printerSettings);

....

Thanks for your answer, but it didn't help. First of all, I use VB.net, but the code is quite simple.

But because asp.net is server-side, this won't work. I want to print a pdf-document from the server wheren the application is running!

Hi
If you want to print the document in the server side, you could use PrintDocumentWithSettings method. But if you want to use the printer in your web browser side, this method does not work. You should implement a web browser object.
like this:

You should convert the document to image file first, and link the image to the html(Server-side). Then use the WebBrowser object to print the image file.

If you want to print document by selected printer in the server side, you should do something with the printerSettings object. There are some public attribute in PrinterSettings class such as printerName, pageSize…