Progress 4gl printer not following inputted number of copies - progress-4gl

We are using a new printer unit but it didn't follow the inputted number of copies. We tried to print it on our old printer and it was able to follow the number of copies. The number of copies worked in DocuCentre S2320 printer but not in HP LaserJet Pro P1102.
This is the code used for calling the report.The numCopy variable is used for the number of copies.
RUN _printrb(rptDir,"Summary Report","","O","","","D","?","","",numCopy,vPage[1],vPage[2],no,"",yes,yes,no,"").

Related

How to modify a packet before it is sent to a printer?

I am using old (3 years) label software automatically print barcodes on a production line to a Zebra printer. I just realized and confirmed with their IT that this software, for whatever reason when a print job is triggered, it sends a ^PR6 to the printer, setting the print speed to 6 (and overwriting the 2 I have set). No amount of tooling around with the printers settings or properties we changed were able to override this. IT also told me this product is at end of life and likely no one there will make a patch on it.
It seems like my only solution is to somehow catch this packet before it goes from the server to the printer and remove this ^PR6 from the beginning of the packet so that the print job uses the printers settings. Is there a way that I can do this?
This is all on a Windows Server 2012 system.
Newer printers have a command override command. Send the following command to the printer that you want to ignore the ^PR6:
! U1 setvar "device.command_override.add" "^PR"
More information can be found in the ZPL manual:
https://www.zebra.com/content/dam/zebra/manuals/printers/common/programming/zpl-zbi2-pm-en.pdf

`body.insertHtml` working incorrectly with list items

Expected Behavior
I am trying to run this code:
const html = '<ul><li>ListItem1</li><li>ListItem2</li><li>ListItem3</li></ul>';
body.insertHtml(html, Word.InsertLocation.end)
to expect:
Current Behavior
Somehow, the API doesn't detect the last list item.
Steps to Reproduce, or Live Example
Link to live example: ScirptLab
Context
I am trying to render unordered lists in Word programmatically.
Your Environment
Platform [PC desktop, Mac, iOS, Office Online]: PC desktop
Host [Excel, Word, PowerPoint, etc.]: Word
Office version number: 18.2005.1191.0
Operating System: Windows 10 Pro 1903
You just need to append something to the end, for example, you may append <br> to the HTML string:
<ul><li>ListItem1</li><li>ListItem2</li><li>ListItem3</li></ul><br>

Setting number of copies when printing from swift

I have setup a pdf etc. to print from my MacOS application, but I cannot figure out how to set the number of print copies in swift, everything else is there but I can't find the number of copies.

Clearprompt command: Element-list generation

In view of my previous question Script for recursive add-to-source control: How to ignore specific files and folders, an issue that arose in regard to the command clearprompt (whereby to generate a list of elements for source control) is that it has restrictions on the number of elements it can process. So my question is: Is there a way to allow for a larger number of elements?
clearprompt has some limitation, in term of size, number of character per lines, and as you see, number of elements.
Those aren't fixed, on Windows or Unix, as far as I know.
So it is best to split your list, and to display several clearprompt dialogs, with a header specifying the number of said dialog over the total of number of windows expected (1/6, 2/6, 3/6, ...)
The only other solution would be to rely on another library to dispolay that dialog, but the advantage of using ccperl is that it is installed with the ClearCase client, which means it is available on all client workstation.
I believe I encounter a similar issue where because of this limit, the clearprompt dialog was empty. I debugged the script and the error seems to be because of the system limit of the max command line which was passed to echo in the following statement
`echo $listelement > $list_add`
I just changed this line to the following
open(LIST_ADD,">".$list_add);
print LIST_ADD $listelement;
close(LIST_ADD);
or basically, instead of relying on the shell to copy the content, I am doing the same through perl and that resolved the issue.

Setting an Excel worksheet's custom page size (not the printable area) from Perl

Long story short, all I'm really attempting to do is print my reports on half sheets. I had Kinko's chop a pack of printer paper in half and my laser printer is perfectly happy to suck them in and print the reports properly, if the paper size of the Excel report is set to exactly 8.5" x 5.64".
That can be done easily in Excel, but it's the one and only adjustment, in my project, I wasn't able to automate with Perl using Spreadsheet::WriteExcel. The CPAN documentation states that you can pick from some of the default sizes normally available with Excel, but doesn't provide an option to specify your own paper size.
Even if you establish the custom size you need in Excel beforehand, making it available in future spreadsheets, as one of your selectable paper sizes, there doesn't seem to be an index, using set_paper($index), that would specify that newly established custom size.
Thank you in advance!
#!/usr/local/gnu/bin/perl --
use strict;
use warnings;
use Spreadsheet::WriteExcel;
my $repWB = Spreadsheet::WriteExcel->new('../tmp/test.xls');
my $repWS = $repWB->add_worksheet('AA');
$repWS->set_paper(1);
Since VBScript can do many of these things natively, maybe you could try embedding the necessary VBScript into your main Perl script using Inline:WSC.
You could determine the needed VBScript by recording an Excel macro of you setting the print size. Then embed that code into your main Perl script.
I am the author of Spreadsheet::writeExcel.
As far as I know there isn't an option in Excel to set a custom paper size. This is usually set in the printer (correct me if I am wrong).
Excel can store printer information along with the workbook data so there may be a workaround.
Can you send me a single sheet workbook with data in cell A1 only and a copy with the custom page set and I'll take a look to see if it is possible.
P.S. The available option B5 (index 13) in landscape mode is fairly close: 8.27" x5.83". Or the undocumented "Organiser L" (index 129) which should be half Letter size: 8.5" x 5.5".