This error has been bugging me on and off for months:
Printing failed because PMSessionBeginCGDocumentNoDialog() returned -30870.
When printing (even using the print dialog) at times an alert dialog pops up saying that printing failed, and the error above is logged to the Console. No further diagnostic information is logged. This caused me grief in an specialised app which produced print jobs every few seconds, a bit like a RIP.
NB: I am answering my own question—apparently this is OK.
It appears that this is a fairly generic error code for a range of CUPS problems.
In my case, it was because I had too many print jobs in the queues and CUPS would not accept any more. If this is your problem, increase your MaxJobs value or set it to
0.