Free Support Forum - aspose.com

Pdf printfile get's really large in the print spooler

Hi,

I'm printing a pdf file that is 386kb to a windows printer using facades I change some properties to set the print margings and use the printLarge file option.

Now in the printer spooler the file grows to 21.4 mb and this causes memory issues in my customers printer. (it pauses and prints 5 blank pages before it start printing again).

When printing the exact same pdf from acrobat the file in the spoolfolder to 285kb and printed without a problem (and much faster).

This is a problem form my customer!

Is there a way we can control the size of the viewer(stream) that is send to the printer?

Any help with this issue is apriciated,

Ron

Hi Ron,


Thanks for using our products.

I have tested the scenario while using one of my sample PDF files and as per my observations, the size of resultant file (printout i.e. XPS) is not much. Furthermore, I cannot see the size of document in print dialog. Can you please share some details on how I can see the size of document being printed in Print dialog.

Also please share the source PDF file so that we can test the scenario at our end.

Hi,

We are sending the file not to XPS but to a production printer (Printronix line printer). You can take my word that the file grows in the spooler to the abnormal size of 21mb (i'm using the atached file). I know that microsoft has a problem printing documents using the spooler (see article http://support.microsoft.com/kb/919543). However other products do keep the size of the printfile within an acceptable range.

I don’t understand exactly what you mean with the print dialog. We print without dialog.

We basically use the following code:

PdfViewer

viewer = new PdfViewer();

System.Drawing.Printing.

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

System.Drawing.Printing.

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

System.Drawing.Printing.

PrintDocument prtdoc = new System.Drawing.Printing.PrintDocument();

viewer.BindPdf(printstream);

//set attributes for printing

viewer.PrinterJobName = DocName;

viewer.AutoResize =

false; //print the file with adjusted size

viewer.AutoRotate =

false; //print the file with adjusted rotation

viewer.PrintPageDialog =

false; //do not produce the page number dialog when printing

CurrentPrinter.SetPrinterSettings(

ref viewer, ref ps, ref pgs, ref prtdoc);

Task

taskPrint = Task.Factory.StartNew(() => viewer.PrintLargePdf(PDFContent,pgs, ps));

taskPrint.Wait(

DRData.printwait); //Wait for x minutes

Hi Ron,


Please accept my apology for delayed response. I’m working over your request and update you soon.

Best Regards,

Hi Ron,


Thanks for your patience and additional information of Mircrosoft printing issue, for increase of file size in print spooler.

I’ve tested the scenario with your shared source document at my side and noticed that file size grows bigger in spooler while printing from Adobe Acrobat instead printing from Aspose.Pdf, shared the screen shot here for the reference.

I’m afraid I couldn’t use your code for testing due to missing references. Could you please share your sample project here? So we test the issue with your code and provide your more information accordingly.

Sorry for the inconvenience faced.

Best Regards,