Closed stan96D closed 8 months ago
@stan96D Sorry, I could not see the image you attached. I modified "createBitmapData" in StarPRNT SDK like below. Then, the whitespace was approximately 10mm. Is this whitespace acceptable to you? If so, could you try printing with the below code?
Here is a sample code ("SampleImage" is a pdf file):
static func createBitmapData(_ emulation: StarIoExtEmulation, width: Int) -> Data {
let sampleImage: UIImage = UIImage(named: "SampleImage")!
let builder: ISCBBuilder = StarIoExt.createCommandBuilder(emulation)
builder.beginDocument()
builder.appendBitmap(sampleImage, diffusion: true, width: width, bothScale: true)
builder.appendCutPaper(SCBCutPaperAction.partialCutWithFeed)
builder.endDocument()
return builder.commands.copy() as! Data
}
Printing result:
Hi again,
We followed your advice of getting a LAN printer and it worked, so thanks! But now we have the problem that our cash receipts are way too (approx 16) long. It kinda makes sense since the PDF has a lot of whitespace at the bottom but we would like to cut this if possible. We apply the PDF as an image through the appendBitmap function and this works, besides the receipts being too long. Even if we crop the cash receipts's PDF to delete the whitespace at the bottom it's still the same. I hope you can help us!
In the attachment we have an example how it's currently printed. We disrupted the printing process to waste more paper so it's not at its full length but I think the idea is clear.
Thanks in advance!