I am making a POS system in windows forms using C#. Project is complete except one thing. I have to print the each sale on a QL 500 P-Touch label Printer. But I don't really know how to operate it from a application. I am new to such a label printing. I have googled but didn't find the satisfactory tutorial or documentation.
Download the b-PAC SDK .
Example C# projects are included; it's actually quite easy.
bpac.DocumentClass doc = new DocumentClass();
if (doc.Open("templateFile.lbx"))
{
doc.GetObject("field1").Text = "...";
doc.GetObject("field2").Text = "...";
doc.StartPrint("", PrintOptionConstants.bpoDefault);
doc.PrintOut(1, PrintOptionConstants.bpoDefault);
doc.EndPrint();
doc.Close();
}
I had to manually edit the project.csproj file to make the proper reference.
<ItemGroup>
<COMReference Include="bpac">
<Guid>{90359D74-B7D9-467F-B938-3883F4CAB582}</Guid>
<VersionMajor>1</VersionMajor>
<VersionMinor>0</VersionMinor>
<Lcid>0</Lcid>
<WrapperTool>tlbimp</WrapperTool>
<Isolated>False</Isolated>
</COMReference>
</ItemGroup>
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.