Pdfinfo get media size pdf#
It is a useful tool for examining information extracted from a PDF submited to CUPS and comparing it to a PDF produced by the filtering system. The use examples described on this page use the Debian 11 (bullseye) version of cupsfilter and its documentation, but there is very little difference in the utility's behaviour on previous distributions. Often the only way to view a file which is classified by the file utility as data is to send it to the printer without passing through the filtering system. It is sufficient to put the binary in /usr/local/bin for it to function. Viewing the file which is actually sent to the printer (the printer-ready file) may or may not be possible because it depends on whether it is PostScript, PDF, PCL, raster data or vendor-specific data. The bottom left of the window has buttons for moving forwards and backwards in a document or use the SPACE and BACK keys from the keyboard. Zooming in and out is mouse-driven with its left and right buttons or the - and = keys can be used. The rasterview executable produced would be put in /usr/local/bin. The executable can be compiled after installing the g++ and libfltk1.3-dev packages and doing The following command would do this for you:
Pdfinfo get media size code#
For successful compiling you are advised to obtain source code which has a version greater than v1.5. The source code for RasterView may be downloaded from the principal CUPS developer's web site. The PWG format is based on CUPS raster and Apple Raster is very similar to PWG raster.
CUPS, PWG and Apple raster output viewing is handled by rasterview. PDF and PostScript can be viewed by gv, xpdf, mupdf, evince, okular or zathura. The ease of examining the output from cupsfilter at a particular stage of a filtering process depends on the file type produced. However, when a PPD is called for, as it is with the -e option, root privileges may be required. When tracking down a problem with printing the cupsfilter utilty is a useful tool to complement what is produced by an error_log.Ī user can access much of what cupsfilter offers when it is executed as /usr/sbin/cupsfilter. Please see the WARNING or NOTES section in the filter manual. The filters in /usr/lib/cups/filter can also be used as standalone programs to examine the conversions but this is not generally encouraged. We can use cupsfilter to examine the state of the filter conversions at each stage of the filtering process and determine whether behaviour is reasonabl and correct.
The processing is identical to that done by CUPS and the filter subsystem when a file makes its way to the printer and ink or toner is put on paper except there isn't paper output. The idea behind it is to use the filter subsystem (provided in the cups, cups-server-common, cups-daemon, cups-filters and cups-filters-core-drivers packages) to convert a file to a specific format.