3

I am using a combination of iTextSharp and PdfSharp to assemble a large PDF file for printing to a Canon Oce VarioPrint 6000 series printer. The PDF is replacing a postscript file.

Both this new file and the old are transferred to the printer via an LPR command.

The postscript file would take maybe 10 minutes to rip to the printer. My PDF version of the same file is taking over 30 minutes to process before it is ready to print.

Can anyone give me pointers into ways I could change the way this file is written / created that would decrease the processing time on the Vario?

EDIT: I took the file that was ripping so slowly and ran it through Acrobat Preflight and it found many RGB images, that it wanted to convert to CMYK. When I look at the PDF though, they are all black and white logos, so I had Preflight do a fix up to convert all images to print Black and White.

I also noticed the Preflight was consolidating backgrounds. Half of the pages have the same logo on them, so leveraging this conversion is probably also helpful.

When I LPR'd that file, it copyed and ripped in less than 5 minutes! So I guess the real question is how can I do that programmatically?

I am modifying the title and tags.

Thanks!

Robb Sadler
  • 705
  • 10
  • 22
  • possible duplicate of [PDF Convert to Black And White PNGs](http://stackoverflow.com/questions/26580912/pdf-convert-to-black-and-white-pngs) – Bruno Lowagie Jun 06 '15 at 12:36
  • I didn't end up editing the images to fix the problem, so I reverted the question back to not be about image manipulation. – Robb Sadler Jul 02 '15 at 16:20

1 Answers1

1

An equivalent result to the preflight repair process in this case can be gotten by using iText (or in my case, iTextSharp). I replaced the PdfSharp method of aggregating the pdfs with the PdfSmartCopy class. This brought down the size of the outputted pdf significantly, combined with using iText's reader.RemoveUnusedObjects(), and my rip time to the printer was lowered to the same or below the previous rip times that we had with the postscript file. Very pleased.

So the RGB images that were probably contributing to the large processing time, were narrowed by the Smart copy removing duplicates.

More info on PdfSmartCopy can be found at: http://api.itextpdf.com/itext/com/itextpdf/text/pdf/PdfSmartCopy.html

and in Bruno's book, iText In Action, more specifically in Chapter 6.

Bruno Lowagie
  • 75,994
  • 9
  • 109
  • 165
Robb Sadler
  • 705
  • 10
  • 22