C
C#2y ago
Kerruan

❔ impressC910 shifting position in output tray

How to print with a jogoffset after each x pages by C# code? (Physically ejecting the paper with a little shift) I only see options in workflows in the docs but then the value is fixed. How to control it by C# code?
2 Replies
Noah
Noah2y ago
@Kerruan
int pageCount = 0;
int pagesPerOffset = 5;
float jogOffset = 0.125f;

PrintDocument document = new PrintDocument();
document.PrintController = new StandardPrintController();
document.PrintPage += (sender, args) => {
// Draw the content for this page
pageCount++;
if (pageCount % pagesPerOffset == 0) {
string offsetCommand = string.Format("\x1B[{0:F2}in", jogOffset);
SendStringToPrinter(document.PrinterSettings.PrinterName, offsetCommand, 1);
}
args.HasMorePages = pageCount < 20; // set to false when done printing
};

document.Print();
int pageCount = 0;
int pagesPerOffset = 5;
float jogOffset = 0.125f;

PrintDocument document = new PrintDocument();
document.PrintController = new StandardPrintController();
document.PrintPage += (sender, args) => {
// Draw the content for this page
pageCount++;
if (pageCount % pagesPerOffset == 0) {
string offsetCommand = string.Format("\x1B[{0:F2}in", jogOffset);
SendStringToPrinter(document.PrinterSettings.PrinterName, offsetCommand, 1);
}
args.HasMorePages = pageCount < 20; // set to false when done printing
};

document.Print();
Accord
Accord2y ago
Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity.
Want results from more Discord servers?
Add your server