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
679 views Asked by user3416126 At
1
There are 1 answers
Related Questions in CUPS
- How to learn about print options keys from pycups?
- using python pycups cups how to set margin for custom page size
- How to receive nearby print information with Cups4j
- To detect connected printer then disconnect and remove printer using CUPS library in Swift language on Mac OS
- CUPS how to change font for printing text files
- How to get filename as output from CUPS, not job id?
- How would I use CUPS to get the printers in my network in C++?
- Serial line printer - first portion of printed document is corrupted
- How to limit pages to be printed on java printing using linux/CUPS with IPP?
- Print size not changing when printing via CUPS on Raspbian to Canon SELPHY CP1500
- I have converted a pdf file to pwg/raster but how do I print it using pycups PrintFile function?
- Access USB printer in CUPS container with udev rule for SYMLINK
- IPP request CUPS server C#
- CUPS: issues with two Brother USB printers (different model)
- How to used PostProcessing's script in cups-pdf
Related Questions in COLLATE
- AES Encryption and Decryption not giving proper result
- SQL query not returning results when combining collate and escape function using mutated vowels (umlauts)
- COLLATE differences between SQL dumps from primary and replica MySQL servers
- Using utf-8 in an webpage isn't working properly
- COLLATE Vietnamese_CI_AI is not working correctly with LIKE '%value%'
- Different number of bounding boxes per image, tried padding, but boxes with zeros are invalid for training object detection model
- Empty error when using collate fn and num workers at same time in dataloader
- "collate_fn" for Huggingface Hyperparameter Tuning
- Mysql - convert Tables in Database to diffrent encoding and collate - foreign key constraints are failing
- divide list to sublists in groovy
- What locale/rule gives this string sort order?
- Inconsistent Results from Cross-Server Query
- Sorting of special characters in Sequelize Postgres like in Javascript
- Can I retrieve Arabic text that stored in varchar column in Arabic Collate that stored from another database in Latin Collate
- SQL collate using select query on multiple fields
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?
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)
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