1 person found this helpful
A reasonable way? Like a boolean value? No -- ID doesn't check if you are actually printing something (the one exception being that blasted "Include blank pages" that's OFF by default!).
Unfortunately, there are tons of reasons any given object will print, and you have to check them all before deciding it does not.
non-printing, or transparent, or have 0 thickness strokes, or no stroke or fill color
Each and every one of those 'or's should be and; each single one on its own can leave a mark on the page. (Not that entire list, but you know what I mean.)
From your list, I'm missing at least the following:
- Is the layer it is on visible? (If not, you are done!)
- Is the layer set to 'Nonprinting'? (Ditto.)
- Does the object contain text? Have to check its attributes -- fill, stroke. If it contains footnotes, anchored objects, tables: if the 'main' text is invisible, check all of these.
- Does it contain any other objects? Have to check their attributes as well -- recursively! Fortunately, the very first positive "Does print" hit is definitive for all objects higher up in the chain. Check allPageItems -- this superclass should cover all possibilites, except (I think) Buttons.
How bad do you consider the Distiller error? It might be easier to handle that gracefully instead.
Another way would be to cheat, and put something paper coloured on every page
Thanks very much, Jongware. I wasn't expecting something as straightforward as a single boolean, but as you confirmed, it's pretty haywire now, with dozens of things that need to be checked. I wonder if there's an easier way at the plugin SDK level.
Basically, for a certain workflow, I'm trying to separate documents into image and non-image items. The image items will use the original source JPEG, TIFF, etc., while the non-image items will get output to EPS. So, if I encounter a PageItem that just contains a single Graphic, then the PageItem itself may or may not add anything to the Graphic in terms of printing results ... border, drop shadow, etc. Unfortunately, this workflows fails if one of the EPS files produces no output in Distiller.
1 person found this helpful
Doing all that recursive checking is very very difficult!
of every page? That should insure that the EPS files will not be empty.
Thanks. Putting a "Paper" rectangle on the back of the page is a possibility, though certainly not the most efficient. I may wind up doing that in the short term, but for the long haul, I'd like to completely eliminate any EPS that doesn't actually contain anything, for efficiency.
I guess another approach would be to scan the EPS file after it's written to see if it actually draws anything. Using the DSC comments, this shouldn't be too difficult.
1) move your item(s) to new empty document
2) set FALSE to:
Property PrintBlankPages As Boolean
Member of InDesign.PrinterPreset
Whether to print blank pages
3) try to print - you should get error if nothing will be printed - catch it
you will get error when object is non-printing, no fill and no stroke, but 0% of opacity still will print it - you need to check all other posibilities
if you are working in CS4 - I think you can play with Preflight options and presets ...