Comment 22 for bug 975972

Revision history for this message
Till Kamppeter (till-kamppeter) wrote : Re: cupsRasterOpen failed error when printing vector graphics

Daniel, your Ghostscript command line is broken and does not work with any driver. It contains "-dDEVICEWIDTHPOINTS=0 -dDEVICEHEIGHTPOINTS=0" which means a page of zero width and zero height.

The problem is the application or its print dialog. It seems that a custom page size was selected and then only the attribute "PageSize=Custom" was sent and not the actually set page size. What has to be sent to CUPS is something like "PageSize=Custom.10x20cm" (unit can also be "in", "mm", or "pt"). A print dialog has to offer a widget for setting width and height if the user chooses "Custom". If Inkscape chooses custom because the user has set a canvas size which does not fit any of the printers's (PPD's) page sizes it has to send the correct "PageSize=Custom.<width>x<height><unit>" to CUPS so that the output can be printed.

The attached PostScript file testcase.ps also contains the PostScript code for a custom page size, but also with zero width and height:

----------
[{
%%BeginFeature: *CustomPageSize True
0
0
0
0
0
pop pop pop <</PageSize[5 -2 roll]/ImagingBBox null>>setpagedevice
%%EndFeature
} stopped cleartomark
----------

Moving to inkscape ...