I am developing a POS application for my client. I want to print the invoice. The computer has connected with 3 different printers. I have to print the invoice without showing the PrintDialog() to a specific printer that is not default printer. How to complete this task?
Thanks a lot.
Related
i am using windows 10.
i am trying to create a report for continuous form (Half Of A4), i set manually from device and printer, so i set printer server like this.
then i change page setup on CR to vpc (name of paper where i create on printer server) like this..
then i tried it with different way :
i preview the report, than print.
with out run my application. the print result was great. just like i want.
i run my application, preview my report with Crystal REport viewer tools, but my report become landscape. not protrait.
see...
what must i do?
yes, after a week,finally i found the answer, we need to set default paper to our customer paper.
just that.
I have developed a POS application in C# with crystal report, i want the invoice to be printed on a continues paper(thermal printer size), i have designed a receipt, but when it prints, it goes on multiple pages. i have even tried to collapse header and footer of report. but no good.
Can anyone help me out?
I have an application where I need the user to be able to print to a network printer through a print server.
The paper being used is 8 * 8 form feed paper. When I print to the printer from my development machine it works fine and I can print multiple documents with perfect alignment.
If I print from a test machine which has the paper size defined in the print server options with the same name as the one in the report the application prints to the alignment of letter size of 8 by 11.
Is there anything I am missing?
-- I would comment instead of answer, but I don't have enough reputation --
Based on the description of the problem and your recent comment, it sounds like this may not be an issue with Crystal, as much as a problem with the client/user level printer configuration.
Are you able to print anything using the 8 * 8 using the test machine? It is just the Crystal Report that isn't aligned properly?
One way to test whether crystal is operating correctly is to export to pdf from the test machine, or print to pdf - this will verify whether crystal reports is properly retaining the page configuration.
Does POS printer just support Epson printers? (related to https://msdn.microsoft.com/en-us/library/windows/apps/mt426652)
How to send a document directly to the printer without showing Print Dialog?
ESC/POS is a command system created by Epson used across a wide range of POS printer systems, aimed at avoiding incompatible command sets by providing universal applicability. Most modern printers support ESC/POS.
So, for your first question, I think the answer is no. This POS printer API can be used for all the printers which support ESC/POS. Please refer to Epson ESC/POS with formatting.
For your second question, using POS printer API, you can print without a Print Dialog.
But I assume, what you want is Windows.Graphics.Printing namespace. For this printing in a UWP app, the Print Preview UI must be shown to guide user complete the printing operation.
You can refer to the official POS printer sample and Printing sample.
Update 2/1/2016:
using POS printer API, you can print without a Print Dialog.
#Seb, this is my personal conclusion, the official document of POS printer doesn't mention anything about a UI dialog.
But in the short sample in the document and official sample, when we print with a pos device, we create a print job at first, then call the PrintLine(string) method with the content which we want to print, at last, we execute it/them with ExecuteAsync method, this method
Runs the print job on the receipt printer station asynchronously.
In this process, we don't show any dialog unlike in the normal printing. In the normal printing, when we want to print a document from our app, we call ShowPrintUIAsync() method, this method will show a dialog to provide guidance for users to help them complete a printing-related oricess.
#Hamed, this Pos printer API can't support those device without ESC/POS, I'm not sure if it possible to send commands to your printer and get response from it through serial port, I think you may read the develop document of your printer.
I have a problem with my printers. I write an c# .net application. I used report viewer (rdlc file) to view and print reports. It have worked fine, but in these days my printers can not print directly, I must press ok button on printer. This situation does not happen with all printer, just 2 printer (hp 2050 and hp 1006).
Thank for your supporting.