如何使用delphi FMX从Android设备打印画布。我可以在windows上打印,但是打印对话框不兼容android,我怎么从android设备打印到我的打印机?
使用windows打印库https://www.winsoft.sk/aprinting.htm,然后在设置中添加到库路径,将windows . android . print添加到uses,然后像这样使用打印功能(我有一个画布,必须将其转换为位图来打印)
procedure TfrmFinal.printBtnClick(Sender: TObject);
var
screenshot: TBitmap; // WINSOFT CAN PRINT BITMAPS, HTML, PDFS AND MORE.
begin
screenshot := showItemsSlip.MakeScreenshot;
if SystemSupportsPrint then
PrintBitmap(screenshot,'logo',TColorMode.Monochrome,TOrientation.Portrait, TScaleMode.Fit)
else
ShowMessage('Printing is not supported on this device');
end;