I’m trying to get a Brother PT-P950NW to do half cuts for each copy of an item in my loop, and then a complete cut at the end of the batch.
For example:
- “000-0001” gets 40 labels printed with a half cut. At the end of those 40 it fully cuts.
- “000-0002” gets 20 labels with a halt cut. At end of the 20 it fully cuts… etc
Here’s the relevant code:
<code>if(labelList.Count > 0)
{
IDocument doc = (bpac.IDocument)new bpac.Document();
if (doc.Open(lblTemplate) != false)
{
doc.StartPrint("", PrintOptionConstants.bpoHalfCut);
foreach (var a in labelList)
{
doc.GetObject("partNumber").Text = $"{a.PartNumber}";
doc.GetObject("QR CODE").Text = $"{a.PartNumber}";
doc.PrintOut(a.QtyToPrint, PrintOptionConstants.bpoAutoCut);
}
doc.EndPrint();
doc.Close();
}
}
</code>
<code>if(labelList.Count > 0)
{
IDocument doc = (bpac.IDocument)new bpac.Document();
if (doc.Open(lblTemplate) != false)
{
doc.StartPrint("", PrintOptionConstants.bpoHalfCut);
foreach (var a in labelList)
{
doc.GetObject("partNumber").Text = $"{a.PartNumber}";
doc.GetObject("QR CODE").Text = $"{a.PartNumber}";
doc.PrintOut(a.QtyToPrint, PrintOptionConstants.bpoAutoCut);
}
doc.EndPrint();
doc.Close();
}
}
</code>
if(labelList.Count > 0)
{
IDocument doc = (bpac.IDocument)new bpac.Document();
if (doc.Open(lblTemplate) != false)
{
doc.StartPrint("", PrintOptionConstants.bpoHalfCut);
foreach (var a in labelList)
{
doc.GetObject("partNumber").Text = $"{a.PartNumber}";
doc.GetObject("QR CODE").Text = $"{a.PartNumber}";
doc.PrintOut(a.QtyToPrint, PrintOptionConstants.bpoAutoCut);
}
doc.EndPrint();
doc.Close();
}
}
One would think this would accomplish my goal, but its just printing a continuous label at half cut with no full cuts in between. The documentation has no examples of combining options in C#, and the StartPrint/PrintOut methods don’t support more than one value there.
Documentation example is in VB something:
<code>ObjDoc.Open("***.lbx")
ObjDoc.StartPrint "Print sample", (bpoAutoCut Or bpoHalfCut)
ObjDoc.PrintOut 1, (bpoAutoCut Or bpoHalfCut)
ObjDoc.EndPrint
ObjDoc.Close
</code>
<code>ObjDoc.Open("***.lbx")
ObjDoc.StartPrint "Print sample", (bpoAutoCut Or bpoHalfCut)
ObjDoc.PrintOut 1, (bpoAutoCut Or bpoHalfCut)
ObjDoc.EndPrint
ObjDoc.Close
</code>
ObjDoc.Open("***.lbx")
ObjDoc.StartPrint "Print sample", (bpoAutoCut Or bpoHalfCut)
ObjDoc.PrintOut 1, (bpoAutoCut Or bpoHalfCut)
ObjDoc.EndPrint
ObjDoc.Close
Anyone have experience trying to do this in C#?
Tried mixing and matching all kinds of cut combos in the start and out methods to no avail.