c#做小票打印机的应用程序,不知道安装了驱动,用的时usb001端口,不知道怎么连接,求大神帮助。。。

c#做小票打印机的应用程序,不知道安装了驱动,用的时usb001端口,不知道怎么连接,求大神帮助。。。,第1张

小票打印机设置成默认的打印机,然后用Stream 流,下面连接的就是小票打印机打印rdlc报表,完全可以使用,你可以自己改改用调用的是PPrint()就行

#region 报表自打印

public void PPrint()

{

try

{

LocalReport report = thisreportViewer1LocalReport;

Export(report);

m_currentPageIndex = 0;

NBPrint();

if (m_streams != null)

{

foreach (Stream stream in m_streams)

streamClose();

m_streams = null;

}

}

catch (Exception ex)

{

MessageBoxShow("在打印过程中出现异常! " + exMessageToString());

}

}

private void Export(LocalReport report)

{

//75in 366in 0 0 0 0 当前设置为A4纵向

string deviceInfo =

"<DeviceInfo>" +

" <OutputFormat>EMF</OutputFormat>" +

" <PageWidth>721mm</PageWidth>" +

" <PageHeight>250mm</PageHeight>" +

" <MarginTop>0in</MarginTop>" +

" <MarginLeft>0in</MarginLeft>" +

" <MarginRight>0in</MarginRight>" +

" <MarginBottom>0in</MarginBottom>" +

"</DeviceInfo>";

Warning[] warnings;

m_streams = new List<Stream>();

reportRender("Image", deviceInfo, CreateStream, out warnings);

foreach (Stream stream in m_streams)

{

streamPosition = 0;

return;

}

}

private void NBPrint()

{

if (m_streams == null || m_streamsCount == 0)

return;

PrintDocument printDoc = new PrintDocument();

if (!printDocPrinterSettingsIsValid)

{

string msg = StringFormat("Can't find printer \"{0}\"", "默认打印机!");

MessageBoxShow(msg, "找不到默认打印机");

return;

}

printDocPrintPage += new PrintPageEventHandler(PrintPage);

printDocPrint();

thisClose();

}

private Stream CreateStream(string name, string fileNameExtension, Encoding encoding, string mimeType, bool willSeek)

{

string filenameext = DateTimeNowYearToString() + DateTimeNowDayToString() + DateTimeNowMonthToString() + DateTimeNowHourToString() + DateTimeNowMinuteToString() + DateTimeNowSecondToString();

Stream stream = new FileStream(name + "" + fileNameExtension, FileModeCreate);

m_streamsAdd(stream);

if (m_streamsCount > 1)

{

m_streamsRemoveAt((int)1);

}

return stream;

}

private void PrintPage(object sender, PrintPageEventArgs ev)

{

Metafile pageImage = new Metafile(m_streams[m_currentPageIndex]);

evGraphicsDrawImage(pageImage, evPageBounds);

m_currentPageIndex++;

evHasMorePages = (m_currentPageIndex < m_streamsCount);

}

#endregion

你好亲,首先启动pos机,先进行签到注册,输入自己的 *** 作员编号和密码,进入到功能页面之后,可以直接选择“交易管理”或者是进行结算都是可以的,选择打印功能,然后根据自己的需求,现在需要打印的一笔,可以选择打印最后一笔或者是前一笔都是可以的

不必要,小程序可以使用普通的热敏小票机,只要该小票机支持蓝牙打印就可以,只需要在小程序中调用相应的接口,即可实现打印功能。但是,如果要实现更多的打印功能,比如支持发票打印,就需要使用专用小票机,这种小票机一般支持多种打印功能,包括发票打印、条形码打印等,可以满足更多的打印需求。

您好,您的小票机没有配置测试页单,这是因为小票机需要安装特定的驱动程序和软件,以便能够正常工作。另外,您还需要在小票机上安装测试页单,以便能够正常打印。如果您没有安装小票机的驱动程序和软件,或者没有在小票机上安装测试页单,那么小票机将无法正常工作,也就无法打印测试页单。因此,您需要先安装小票机的驱动程序和软件,然后再安装测试页单,这样小票机才能正常工作,才能打印测试页单。

以上就是关于c#做小票打印机的应用程序,不知道安装了驱动,用的时usb001端口,不知道怎么连接,求大神帮助。。。全部的内容,包括:c#做小票打印机的应用程序,不知道安装了驱动,用的时usb001端口,不知道怎么连接,求大神帮助。。。、云pos收银软件怎么连小票机使用、微信小程序必须要用专用小票机吗等相关内容解答,如果想了解更多相关内容,可以关注我们,你们的支持是我们更新的动力!

欢迎分享,转载请注明来源:内存溢出

原文地址:https://54852.com/zz/10639588.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2023-05-10
下一篇2023-05-10

发表评论

登录后才能评论

评论列表(0条)

    保存