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
615 views Asked by user3416126 At
1
There are 1 answers
Related Questions in CUPS
- Azure VM: Single disk (filesystem) greater than 1023 GB?
- Backup strategy for build tool hosted on Azure VM
- New-AzureQuickVM not creating VM on exsisting Cloud Service?
- Ping Azure VM in same subnet using VM name
- 'Your credentials did not work' in MS Azure
- Installing Azure powershell in an azure Virtual Machine
- Azure Virtual Network Custom DNS Server
- Extend On-premise AD to Azure
- How can I use Azure-provided DNS for Resource Manager VMs?
- Find out data traffic coming in and going out through azure VM
Related Questions in COLLATE
- Azure VM: Single disk (filesystem) greater than 1023 GB?
- Backup strategy for build tool hosted on Azure VM
- New-AzureQuickVM not creating VM on exsisting Cloud Service?
- Ping Azure VM in same subnet using VM name
- 'Your credentials did not work' in MS Azure
- Installing Azure powershell in an azure Virtual Machine
- Azure Virtual Network Custom DNS Server
- Extend On-premise AD to Azure
- How can I use Azure-provided DNS for Resource Manager VMs?
- Find out data traffic coming in and going out through azure VM
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?
Popular Tags
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