Ridiculously Enormous PDFs and Printing
Ridiculously Enormous PDFs and Printing
- Subject: Ridiculously Enormous PDFs and Printing
- From: Robert Clair <email@hidden>
- Date: Thu, 17 Jul 2003 10:07:13 -0400
Thanks to all who reminded me of libtiff. I'd gotten so used to Cocoa
doing everything that I'd forgotten about it.
In the course of the discussion I was asked why I'd want to do such
a thing (make printer resolution tiffs) instead of letting the printing
architecture worry about it. The original reasons were allowing the
user to take the image into Photoshop and to be able to drive oddball
output devices that don't have RIPs. I'm not entirely certain of
the current state of the art, but at least some older model laser
engravers
work of off tiff.
Now let me add another reason for doing your own rasterizing. The
printing
architecture makes really BIG pdfs as spool files. This is a well known
complaint, but it can veer towards insanity in certain situations:
I have an application that does a lot of instancing - essentially the
user can stamp little bits of hi-res bitmap around at various positions,
scales and orientations. Of course I only keep one copy of each bitmap
and draw it where ever it is required. The problem comes when you print
-
the printing architecture makes 1 copy of the bitmap each time you draw
it.
It doesn't know from Form Xobjects or anything like that.
This can lead to absurd situations - I have one test file whose spool
file
was heading past 4 Gig when I killed it, three hours into the process.
From
previous experiments it would have taken days to print on my dumpy
little
HP 842C. This for a design that stores in about 5 Meg in the app's file
format
and draws on the screen in less than a second.
I wrote some code to rasterize and band myself - when printing the
drawRect renders the display list, in bands, into an NSImage and then
draws the bands as the output. It does have the disadvantage that you
must inquire (or guess) for the printer resolution, but the results are
dramatic: the same file took 2 minutes to make a 3 Meg spool file and
printed in 3 minutes. (300dpi, letter size)
This takes care of printing - I guess for the general idea of handing
a resolution independent pdf to someone I'll generate my own (smarter
than default) Postscript and see what's available in terms of
intelligent
PS->pdf conversion.
.....Bob Clair
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.