Our C++ application is using cups to print out a postscript file generated by XRT XrtTblVaDrawPS command. But when I print 2 copies and set the cups collate option the file is not printed out as collated.
postscript file is not collating when cups copies is set
675 Views Asked by user3416126 At
1
There are 1 best solutions below
Related Questions in CUPS
- How to get a response of file printing job to user from printer using CUPS in linux
- Where is the cupsctl terminal executable on MacOSX?
- how to print a text/plain document in CUPS printer without using raw option
- How to make PHP wait until PDF is created for printed?
- Printing from inside a docker container
- postscript file is not collating when cups copies is set
- Perform print operation on cups using Node.js
- Php exec can't print using cups
- Zebra Cups Driver paper size don't change
- Getting available printer trays with PyCups
- cups filter - need to allow "others" read permission
- CUPS send multiple jobs to IPP printer
- bundle install Ruby cups gem fails on OSX Mavericks
- Fatal Error: Call to undefined function _()
- Multiple Threads Swing
Related Questions in COLLATE
- how to upper a column with collate in SQL SERVER
- postscript file is not collating when cups copies is set
- SQLITE custom Accent collation function and LIKE queries
- Collating SQL query results
- How to collect items in a list of maps in Scala
- Bypass SQL COLLATE
- perl sort substrings using array to determine collating sequence
- Crystal Reports Server 2011 character set compatibility
- Problems change collation ALL ( PART II ) The object '' is dependent on column ''. ( SQL 2008 )
- Create TABLE in PHP using
- COLLATE differences between SQL dumps from primary and replica MySQL servers
- perl libSqliteIcu.so collate icu
- PostgreSQL 9.1 using collate in select statements
- Unicode sort number before space in Linux environment
- ORACLE 18c XE (18.0.0.0.0) - MAX_STRING_SIZE = EXTENDED (COLLATE BINARY_CI) problem
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Our project is using XRT motif library to generate a postscript file from a table layout using motif. The postscript file generated by XrtTblVaDrawPS was printed using cups but during testing the cups Collate option appeared not to work when we where printing more then 1 copy. Web searches did not return any reason why the ps file was not collating but after a lot of experimentation we found out why cups was not working as expected. The XrtTblVaDrawPS call generating the ps file and one of the option used was "XRTTBL_PS_NUM_COPIES, 2" to set how many copies the postscript file would print out. In our cups class we were doing a cupsAddOption("copies", "2",.. and cupsAddOption("Collate", "True", .. commands (see examples below). It turns out the the cups "copies" command was killing the Collating if it set to 2. Like the orientation postscript/cups conflict you need to set the cups copies value to 1 to get the collation to work. The postscript file already knows its going to print out, for example 2 copies. If you don't want it to be collated then set cups copies to 2 number. If you are generating a postscript file some other way this problem might not be happening to you, but it is if you are using the XrtTblVaDrawPS call.
pgs = XrtTblVaDrawPS(myTable, fp, XRTTBL_PS_NUM_COPIES, num, <= set to 2 XRTTBL_PS_CELL_RANGE, rng, XRTTBL_PS_COLOR, clr, XRTTBL_PS_ORIENTATION, ornt, XRTTBL_PS_SCALE, FIT_TO_PAGE_HEIGHT, XRTTBL_PS_SHOW_ROW_LABELS, XRTTBL_PS_ALL, XRTTBL_PS_SHOW_FROZEN_ROWS, XRTTBL_PS_ALL, XRTTBL_PS_SHOW_COL_LABELS, XRTTBL_PS_ALL, XRTTBL_PS_SHOW_FROZEN_COLS, XRTTBL_PS_ALL, XRTTBL_PS_PAPERSIZE_WIDTH, media_sz.width, XRTTBL_PS_PAPERSIZE_HEIGHT, media_sz.length, XRTTBL_PS_MARGIN_LEFT, 1.00, XRTTBL_PS_MARGIN_RIGHT, 1.00, XRTTBL_PS_MARGIN_TOP, 0.75, XRTTBL_PS_MARGIN_BOTTOM, 0.75, XRTTBL_PS_HEADER_FONT, "Adobe 10", XRTTBL_PS_HEADER, hdr, XRTTBL_PS_HEADER_MARGIN, 0.55, XRTTBL_PS_FOOTER_FONT, "Adobe 10", XRTTBL_PS_FOOTER, "Page #", XRTTBL_PS_FOOTER_MARGIN, 0.25, NULL);
myNumOptions = cupsAddOption("Collate", "True", myNumOptions, &myOptions); myNumOptions = cupsAddOption("copies", oss.str().c_str(), myNumOptions, &myOptions);
oss.str().c_str() is "2" and collate fails and I get (1-1-2-2) oss.str().c_str() is "1" and collate works and I get (1-2-1-2) oss.str().c_str() is "2" and cups Collate set to "False" I get (1-1-2-2) as expected