Click here to Skip to main content
14,974,268 members
Everything / General Programming / Printing

Printing

printing

Great Reads

by Vahid_N
PdfReport is a code-first reporting engine which is built on top of the iTextSharp and EPPlus libraries.
by EFEaglehouse
Windows CE/Mobile printing client for LPR, LPRng, and Socket API.
by Howard 9448490
Windows Forms Print Dialog for rich text with accurate page preview and zooming
by George Sefcik
This article will show an easy way to add the ability to print, or save as an image, each screen (Window) or FrameworkElement (UserControl) in your application.

Latest Articles

by OriginalGriff
I'm getting a 3D printer for Christmas! So - I need to learn to use it. That means ... a CAD package. Gulp.
by Howard 9448490
Windows Forms Print Dialog for rich text with accurate page preview and zooming
by OriginalGriff
So ... you want to put that LCD display in there, huh? Pity it's not a rectangular frame, isn't it? How are you going to fit a neat frame round that, huh? It's complicated, but ... not that complicated when you get used to it.
by OriginalGriff
OK, OK. I had to set it up - Herself insisted - and I had to actually print to be sure. So I knocked up a quick box to print (just to show I could).

All Articles

Sort by Score

Printing 

Please Sign up or sign in to vote.
14 Feb 2013
Vahid_N
PdfReport is a code-first reporting engine which is built on top of the iTextSharp and EPPlus libraries.
Please Sign up or sign in to vote.
26 Mar 2010
Nicholas Butler
I think the point you're missing is that PrintPage is raised once for each page. If you set e.HasMorePages = true; when you finish and exit the handler, then it will be called again to print the next page. This will continue until you set e.HasMorePages = false; which indicates that you have...
Please Sign up or sign in to vote.
15 Dec 2010
EFEaglehouse
Windows CE/Mobile printing client for LPR, LPRng, and Socket API.
Please Sign up or sign in to vote.
9 Mar 2013
Michael Haephrati
It is not clear what you are developing. If you are developing a piece of software for someone else, you should create your own Print routine which will call printDocument 4 times, each time with the appropriate text. There is no way around that. Print drivers can usually allow you to define odd...
Please Sign up or sign in to vote.
13 Aug 2020
Howard 9448490
Windows Forms Print Dialog for rich text with accurate page preview and zooming
Please Sign up or sign in to vote.
18 Nov 2010
strogg
Dont know any app that does it, but here's some info.The shd file should contain just the print job settings, so you may ignore it.The spl file contains your print data. It can be recorded in RAW (printer format) or EMF format, dont know what you have.If its RAW:It may be in PS or PCL or...
Please Sign up or sign in to vote.
17 Mar 2011
fjdiewornncalwe
If you have command code documentation and a printer model, then the first place to look would be for an SDK or API specification from the manufacturer.
Please Sign up or sign in to vote.
17 Mar 2011
Albin Abel
Similar discussion here. May help you to get some idea.Print and send commands to receipt printer[^]
Please Sign up or sign in to vote.
17 Mar 2011
Espen Harlinn
You may find the following useful:http://www.microsoft.com/dynamics/rms/using/oposcontrols.htm[^]That one, and a bunch of others, can easily be found by leveraging your Google-Fu skills[^]RegardsEspen Harlinn
Please Sign up or sign in to vote.
27 Jul 2012
nagen bihari
Dear allFinally, I have solved the problem.Made a .dll filr from the link http://stackoverflow.com/questions/3507187/how-to-print-a-pcl-file-in-c.Added the dll to the GAC.Call it in my code.....and voila.......It prints my text file.Note that I am using a HP Laserjet P2015...
Please Sign up or sign in to vote.
4 Nov 2012
Akinmade Bond
Print, Cancel, Apply? I don't even have that on my PrintDialog.But maybe this articlel on hacking FontDialog can get you started. But I strongly suggest you create your own PrintDialog[^]
Please Sign up or sign in to vote.
20 Sep 2013
CHill60
I'm not convinced that you can do it without at least mentioning the printer name but you can temporarily change the default printer ...I found a solution here[^] that seems to work and by all accounts so does this one...
Please Sign up or sign in to vote.
28 Aug 2016
George Sefcik
This article will show an easy way to add the ability to print, or save as an image, each screen (Window) or FrameworkElement (UserControl) in your application.
Please Sign up or sign in to vote.
17 Sep 2019
OriginalGriff
OK, OK. I had to set it up - Herself insisted - and I had to actually print to be sure. So I knocked up a quick box to print (just to show I could).
Please Sign up or sign in to vote.
8 Jun 2010
CPallini
CWinApp::Updat...
Please Sign up or sign in to vote.
21 Nov 2010
strogg
This is a little different from normal printing routines.Open the printer using OpenPrinter() - make sure you send the data to the same printer.Call StartDocPrinter()Note: You must pass a DOC_INFO_1 structure with pDatatype(a member of it) set to "RAW" (upper case). This is not well...
Please Sign up or sign in to vote.
22 May 2011
Dalek Dave
This link[^] may help.Gives the method of orientating the print.
Please Sign up or sign in to vote.
24 Jun 2011
ankitjoshi24
HiI am not sure how you can negate the scroll but if you want to print the form then you can try: -PrintDialog printDlg = new System.Windows.Controls.PrintDialog();if (printDlg.ShowDialog() == true){ printDlg.PrintVisual(this, "First WPF Print");}The above code will...
Please Sign up or sign in to vote.
10 Aug 2012
Kenneth Haugland
The main problem with your question is I dont think we can answer it. Printers have some default settings that can be set via the .NET assembelies:http://msdn.microsoft.com/en-us/library/5ekk3hse[^]Your printer my store additional properties not required by the default printer class, and...
Please Sign up or sign in to vote.
1 Jan 2013
Sergey Alexandrovich Kryukov
You can use the WebBrowser control and print from it; it could be System.Windows.Forms.WebBrowser or System.Windows.Controls.WebBrowser. You know that.But there is one very different and interesting opportunity: the control from this CodeProject article: A Professional HTML Renderer You Will...
Please Sign up or sign in to vote.
11 Sep 2013
Member 10331745
1 alternative  
Hello Everyone,I have been assigned a task to generate reports regarding printer. I want to know from some IP how many print outs has been taken from all connected printer in network. I want to check this through my web application.Tried every possible solution but could not find any...
Please Sign up or sign in to vote.
16 Sep 2013
Member 10331745
1 alternative  
Hello Everyone,I have been assigned the task to monitor the jobs and generate the report related to Printer Activity in any way (online or stand alone system in c#).Like how many pages has been printed?, how many jobs printed?, how many double sided pages printed? From particular...
Please Sign up or sign in to vote.
8 Oct 2014
Sergey Alexandrovich Kryukov
It's almost always bad to start a separate process; it's much better to do your own print. You can use the class System.Drawing.Printing.PrintDocument:http://msdn.microsoft.com/en-us/library/system.drawing.printing.printdocument%28v=vs.110%29.aspx[^].As to the TIFF, you can create a...
Please Sign up or sign in to vote.
24 Apr 2015
Sergey Alexandrovich Kryukov
What you do could not work in principle — please see my comments to the question and the link. Instead of doing this very questionable stuff, you can use Microsoft.PointOfService.PosPrinter class which supports...
Please Sign up or sign in to vote.
28 Sep 2015
BillWoodruff
a quick sketch for one possible strategy: (not tested/working code !)public void ProcessCheckedRows(DataGridView dgv1){ // code by OP var allCheckedRows = dgv1.Rows .Cast() .Where(row => (bool?)row.Cells[0].Value == true) .ToList(); ...
Please Sign up or sign in to vote.
2 Oct 2015
Matt T Heffron
A variation on BillWoodruff's solution that allows generalization to an arbitrary number of "rows" per "Document" and works with the lazy behavior of IEnumerable:public void ProcessCheckedRows(DataGridView dgv1){ // code by OP var allCheckedRows = dgv1.Rows ...
Please Sign up or sign in to vote.
12 Nov 2015
claudetom01
Good evening,For that there are already many solutions in .NET, you go through the assembly. Drawing.Printing. See the examples that you can find everywhere even here;)PrintDocument ClassorBasic Text and Image PrintingorHow to print more pages in C#orPrinting in C#In your...
Please Sign up or sign in to vote.
25 Jul 2016
F-ES Sitecore
This is a frequently asked question, please do basic research such as a google search before you ask a question.The answer is that you can't. If the client wants to print something then they will. Would you want websites forcing things to your printer without your intervention?
Please Sign up or sign in to vote.
6 Jun 2017
juliashs
The following code works fine: DOCINFO Dinfo ; ... Dinfo.lpszOutput = (LPCSTR)"D:\\Test1.pdf";
Please Sign up or sign in to vote.
29 Apr 2018
Dave Kreskowiak
The problem is you're dealing with the Windows Print Spooler. The drawing stuff you do gets queued up, not directly printed. The printer driver has to convert your drawing commands into the language the printer understands to describe the page image, then that data has to be sent to the printer....
Please Sign up or sign in to vote.
1 Jun 2018
OriginalGriff
You create a print document: PrintDocument pd = new PrintDocument(); pd.PrintPage += new PrintPageEventHandler(printDocument1_PrintPage); Then you set the margins for a totally different one: Margins margins = new Margins(1, 1, 1, 1); printDocument1.DefaultPageSettings.Margins = margins;
Please Sign up or sign in to vote.
29 Jul 2019
Dave Kreskowiak
Your question makes no sense. Web App? Console App? Windows Service app? You didn't do a very good job of explaining what app is running where and how these apps relate to each other. What are these apps doing? How does this "Print button" work? What is the code behind it? "Default Printer" is...
Please Sign up or sign in to vote.
25 Nov 2019
OriginalGriff
So ... you want to put that LCD display in there, huh? Pity it's not a rectangular frame, isn't it? How are you going to fit a neat frame round that, huh? It's complicated, but ... not that complicated when you get used to it.
Please Sign up or sign in to vote.
8 Feb 2010
Grunge Boy
2 alternatives  
I'm trying to create automatically PDF documents from WORD documents, using a PDF creator as a default printer. However, I don't want to use the PrintDialog everytime, I need to make it automatic by the source code ( I have thousands of WORD documents). The problem is that it seems I cannot...
Please Sign up or sign in to vote.
2 Jun 2010
preet88
5 alternatives  
Hi friends I want to print file contents using C++ program. Please tell me how I can do this. I don't know anything about printer programming. Please help me to sort out this problem. I want it to perform on C++. If you can provide me code to implement it, then it will be more helpful to me.
Please Sign up or sign in to vote.
13 Jun 2010
Richard MacCutchan
I found this link[^] which suggests that there was a method in the days of Win-95/NT, but I cannot be sure that it still works now; perhaps still worth investigating.
Please Sign up or sign in to vote.
2 Aug 2010
E.F. Nijboer
There are some options you could try. Since you only need to print the documents you only need a kind of viewer. There is an example here on codeproject for this:PDF Viewer Control Without Acrobat Reader Installed[^]Good luck!
Please Sign up or sign in to vote.
7 Aug 2010
Jörgen Sigvardsson
It will not load, because it is not signed. You will have to make Vista/Windows 7 boot up in so called 'test mode'. Google on it, and you will find plenty of articles showing you how to do this.
Please Sign up or sign in to vote.
10 Aug 2010
Shining Legend
I am using the below code for printing documents in ASP.NET. But the concern here is it is printing on the server not on client side. I want to print the documents on client machine.void PrintFiles() { ProcessStartInfo startInfo = new ProcessStartInfo(); ...
Please Sign up or sign in to vote.
20 Sep 2010
thatraja
Try this post Crystal Report Direct Print[^] It will help you.
Please Sign up or sign in to vote.
2 Nov 2010
Nish Nishant
See http://msdn.microsoft.com/en-us/library/aa287563(VS.71).aspx[^]It was part of VS 2003 documentation, but the concepts remain the same. You will see separate articles there showing how to print a text file, a data grid, a form, and one for print preview.
Please Sign up or sign in to vote.
2 Nov 2010
Arindam Tewary
Hi,I dont think while developing the application you have any control where user(accessing from client machine) would print it. You at most can "fire" the "print" command but rest all is taken care by client's system confiuration.Therefore, you can set aside the idea of instructing your...
Please Sign up or sign in to vote.
24 Nov 2010
#realJSOP
Wow. Color me surprised when I found out that searching google for "vb.net printing" resulted in over 900 THOUSAND hits. Imean - really - WOW!
Please Sign up or sign in to vote.
5 Dec 2010
puzzletrain
I have used this utility before look at http://www.dos2usb.com/index.htmI have had mixed results - i.e works most of the time in XP - not tried this on Vista or 7Net Use LPT1 \\ComputerName\Printer_Name /Persistent:YesI believe the printer has to be sharedor something I have not...
Please Sign up or sign in to vote.
15 Dec 2010
Henry Minute
You are more likely to get a valid answer by asking your question Ricoh Support Europe[^].
Please Sign up or sign in to vote.
24 Dec 2010
thatraja
venlancer wrote:tried using Printer setup but nothing worked for me. what do you mean? It's printing in other paper size? which one?I hope this option will kick this issue for you.Select the "No Printer" Option Under Print Setup[^]Have a great time, Merry Christmas :-O
Please Sign up or sign in to vote.
31 Jan 2011
Igor Kushnarev
Use Jasper Reports: http://jasperforge.org/projects/jasperreports[^]There is a good...
Please Sign up or sign in to vote.
18 Mar 2011
OriginalGriff
Your best bet is to talk to the manufacturers: they must be used to this question, and probably have a stock reply.The chances are that it varies from manufacturer to manufacturer.
Please Sign up or sign in to vote.
13 Apr 2011
musefan
So you are basically printing a screen shot? not good.You should be creating a print document based on the data.so you go through each data field and draw that on the print document where you want it. This is not so simple as you will need to calculate positioning and also take page...
Please Sign up or sign in to vote.
14 Sep 2011
OriginalGriff
Don't use the VB power packs for printing - use the PrintDocument [^]instead. That way, the printed result does not need to contain any UI components, it can just be the information you need to print, and you can fit it to the page any way you want. It will also look better, because the output...
Please Sign up or sign in to vote.
16 Sep 2011
Mehdi Gholam
See the answers to this earlier question C# Print long height form with printform component
Please Sign up or sign in to vote.
4 Nov 2011
cardano7
I finally found the way but I dont know how to add the port?rundll32 printui.dll,PrintUIEntry /if /b "Test Printer" /f "K:\Drivers\HP Color LaserJet CP1515\hppcp609.inf" /r "IP_10.48.1.42" /m "HP Color LaserJet CP1510 Series PCL 6"
Please Sign up or sign in to vote.
8 Mar 2012
R. Giskard Reventlov
This[^] might help: in VB but you can translate.
Please Sign up or sign in to vote.
1 Apr 2012
Abhinav S
Maybe you are referring to some article you read on the internet.In this case, please provide a reference to the article so that someone can help you.There are a couple of articles on printing a grid view that could be of some assistance in helping you solve this problem.Printing a...
Please Sign up or sign in to vote.
4 May 2012
OriginalGriff
Without having your specific printer to hand, it isn't easy - it will either be available via a menu on the printer itself, or locatable once you have installed the driver software.However, there may be another way. If you connect your browser to your router then you may be able to find out...
Please Sign up or sign in to vote.
13 Jun 2012
Abhinav S
Someone of the solutions described here[^] might help you out. Note that these are all workarounds to the original problem.
Please Sign up or sign in to vote.
25 Jun 2012
Tim Corey
Since you did not specify a specific thermal printer, I'll have to speak generally. In general, thermal printers use beeps as error codes. Therefore, they do not provide a way for the drivers to make them beep for other reasons. Further, it seems like a poor requirement, since it will be...
Please Sign up or sign in to vote.
11 Jul 2012
Richard MacCutchan
The driver will have exclusive rights to that serial port in order to drive the printer, and so protect itself from malicious code. Why not just use normal print processing via the standard printing utilities and classes?
Please Sign up or sign in to vote.
25 Jul 2012
Christian Graus
You can't change how the browser works. However, you should know that the code that you've copied, will not work all, and if you change the folder it stores the txt file in, in order that your web site would have access to it, it will print your document using whatever printer is attached to...
Please Sign up or sign in to vote.
27 Jul 2012
OriginalGriff
You should talk to the people who created it - they should provide technical support and will know more about their product than we will. If they don't, then find another supplier and demand your money back!
Please Sign up or sign in to vote.
31 Jul 2012
Christian Graus
The only real way to improve print quality is to create a larger bitmap that is finer quality. GIGO.graphics.FromImage(bitmap) creates an exact copy, though, you should not lose quality doing that.
Please Sign up or sign in to vote.
15 Aug 2012
M.H. Shojaei
1 alternative  
There are some rows in my dataGrid, when i select one of them and print it's data, only first image of database will print while i only need to print selected row image.
Please Sign up or sign in to vote.
19 Aug 2012
M.H. Shojaei
I solved it.private void Print_Click(object sender, RoutedEventArgs e){ System.Windows.Controls.PrintDialog printDialog = new System.Windows.Controls.PrintDialog(); if (printDialog.ShowDialog() == true) { DrawingVisual dv = new DrawingVisual(); ...
Please Sign up or sign in to vote.
24 Aug 2012
Richard MacCutchan
Please do not post the same question in multiple forums. You have already posted this here[^].
Please Sign up or sign in to vote.
2 Sep 2012
Firdaus Shaikh
1 alternative  
Hello Everyone, I have created a new form (custom PaperSize) for printer of certain width and height,Now I want to change it's height but through code?Is there any way to this, so that page size for that custom paper will change in the printer settings? Firdaus Shaikh
Please Sign up or sign in to vote.
8 Oct 2012
mst2
1 alternative  
Hi,in the new layout i can't find the button for a printable version of an article. Where is it?thanks in advanceMathias
Please Sign up or sign in to vote.
3 Nov 2012
OriginalGriff
That's not going to be easy, and it may be a very, very silly idea.Certainly, on my system (vanilla Win7) the dialog that results from PrintDialog.ShowDialog contains no "Apply" button - just "OK" and "Cancel" so disabling or hiding the "Print" button won't work.If you need a dialog that...
Please Sign up or sign in to vote.
12 Nov 2012
OriginalGriff
Then you need to expand the PrintImage method to include something along the line of:this.DrawToBitmap(img, bounds);Point p = new Point(100, 100);e.Graphics.DrawImage(img, p);// Now add a string...e.Graphics.DrawString("Hello World!", new Font("Arial", 16), Brushes.Black, new...
Please Sign up or sign in to vote.
1 Jan 2013
prashant patil 4987
try this.You can use the WebBrowser control to do so. It will allow you to show HTML inside your WinForms.The DocumentText proprety will allow you to set a String that represent the HTML you want to show.For example:webBrowser.DocumentText = "I like...
Please Sign up or sign in to vote.
3 Jan 2013
Sergey Alexandrovich Kryukov
Please see my comment to the question.I really think you have more serious problems. Calling ToString on the object which is already a string. Repeating totally identical code with almost identical data 5 times. (Never heard of abstractions? Method? Method parameters? Don't Repeat Yourself...
Please Sign up or sign in to vote.
13 Jan 2013
markovl
Hey, you could set display:table-header-group; for your headers in a @media print rule, as shown here[^].I did a quick printing test in Firefox and IE9 and seems to do the job. Chrome for some reason doesn't honor it though.New content added after OPs comments in Solution 2:That's the...
Please Sign up or sign in to vote.
9 Apr 2013
Rai Pawan
You will need to have a domain account under which the windows service runs in order to access the printer that is available on network.Check this link http://stackoverflow.com/questions/8009558/printing-in-windows-service-using-background-worker[^]
Please Sign up or sign in to vote.
10 Apr 2013
ZurdoDev
Isn't it just a property? Something like printDocument1.DefaultPageSettings.Landscape?
Please Sign up or sign in to vote.
16 Apr 2013
SoMad
Turn the printer On. :) Just kidding, I am sure you already made sure it is connected and turned on.I found the link below, which has information about turning debugging logging on and in the last post, they say they fixed it by installing the driver with Administrative rights so it can...
Please Sign up or sign in to vote.
27 May 2013
Liju Sankar
Thank you very much for your suggestions and guidance.I found a couple of way to handle the situation a. Microsoft Print Preview controls b. Third party controls providers like Infragistics and Developer Express have there own extensions of this microsoft print preview controlBut...
Please Sign up or sign in to vote.
28 May 2013
Firdaus Shaikh
Hello Arun,Thanks for your reply I will try this and secondly,I have found a work around and below is the code,main code taken from somewhere I don't remember while finding every bit of code...this code is taken from Internet class named CustomPrintForm.cs1) Add below class in your...
Please Sign up or sign in to vote.
4 Jun 2013
Christian Graus
You can't. The only way to stop other programs from printing too much, is to have your own printer driver that won't accept more than XXX pages at a time. There may be a hook that allows you to write a layer between the OS and all printer drivers, but I'd be surprised, I'd imagine the best you...
Please Sign up or sign in to vote.
22 Jul 2013
Ron Beyer
Depends, what is your network architecture? Everything on a domain and part of Active Directory? If yes then its relatively easy to query AD objects. If you are just talking about a home network or workgroup network, then this is much more difficult as it involves network discovery.Please...
Please Sign up or sign in to vote.
15 Oct 2013
Sergey Alexandrovich Kryukov
How can you hope to get something good from this stone-age lame? No wonder Unicode support it a complete mess you would not like to deal with. Please see:http://www.west-wind.com/presentations/foxunicode/foxunicode.asp[^].—SA
Please Sign up or sign in to vote.
19 Oct 2013
thatraja
Here solved threadhttp://scn.sap.com/thread/3299135[^]
Please Sign up or sign in to vote.
24 Oct 2013
Marc Gabrie
1) ZPL & EPL are common Zebra printer command languages and can be used with any Zebra printer supporting them as well as with other brands that usually ship ZPL or EPL emulation like Datamax, Intermec, etc. If you want to support a broader range of printers, then ZPL & EPL is not the way to go....
Please Sign up or sign in to vote.
26 Oct 2013
Marc Gabrie
You wrote..."we have around 200 label printers(configured for static ip machines) and those has to print around 100k labels every day"How is the printing performance with such a high printing volume and based on the fact that you are using Windows graphic printing API (approach-I i.e....
Please Sign up or sign in to vote.
7 Nov 2013
Marc Gabrie
#1 AFAIK, there's any Zebra printer which model is GC420GT! It's important to know the correct model of your Zebra (read on)#2 In ZPL, the ^MMC,Y command should be sufficient and placed at the beginning of your label format. I see you also have specified ^CN but from ZPL ref this commands...
Please Sign up or sign in to vote.
14 Nov 2013
Roja23
http://files.support.epson.com/htmldocs/pho22_/pho22_rf/speed_1.htm[^]
Please Sign up or sign in to vote.
28 Jan 2014
Jochen Arndt
There is an old KB article HOWTO: Send Raw Data to a Printer by Using the Win32 API[^] referring to Windows 9x and NT. So I don't know if it is also working with newer Windows versions. All you need to know is the name of the printer. Then read the data from the PCL file and write it to the printer.
Please Sign up or sign in to vote.
24 Feb 2014
Dave Kreskowiak
Well, you HAVE to run the Office applications to print the documents. What else are you going to use to open the documents, parse them to render the page and printer them?? Without Office, you have no code that knows how to interpret and render the documents!You don't neccessarily need...
Please Sign up or sign in to vote.
24 Mar 2014
Marc Gabrie
I'd not use Crystal Reports or any other reporting tool for printing bills IF you are targeting special printers like thermals or dot matrix/impact ones. Instead, I'd try to learn the printer target language commands (ESC/POS in your case which is not hard to learn at all) and would send the raw...
Please Sign up or sign in to vote.
31 Mar 2014
Marc Gabrie
If you already know about ZPL commands then just create/design your labels using it and then send those commands to the printer by using this code http://support.microsoft.com/kb/322091If you do not know anything on Zebra printer languages then try this open source project...
Please Sign up or sign in to vote.
10 Jun 2014
AlwaysLearningNewStuff
INTRODUCTION AND RELEVANT INFORMATION:I am trying to bypass another problem in my application by trying to do printing/print preview on my own.I am trying to create a table that would look like in this picture[^].I am using C++ and WinAPI, on WindowsXP SP3. I work in MS Visual Studio...
Please Sign up or sign in to vote.
17 Jun 2014
Kschuler
I think you'd be better off using My.Settings[^] than using text files to store this information.Right Click on your Project in the Solution Explorer. Select Properties. This opens your project's property pages.Select the Settings Tab. This area lets you setup various settings that...
Please Sign up or sign in to vote.
15 Aug 2014
OriginalGriff
The problem is that you are just drawing the panel into a bitmap - so you will get exactly teh same thing as if you had drawn it onto the screen - the panel doesn't "know" where it is drawing to (and rightly, it shouldn't need to know).If you want to lose the background, you will have to...
Please Sign up or sign in to vote.
7 Sep 2014
Marc Gabrie
Instead of using Crystal Reports or any other reporting tool, I'd suggest you to use System.Drawing.Printing.PrintDocument[^] which is simple enough to reproduce POS outputs on common printers. A receipt usually contains plain text + some logo image which can be easily reproduced by using...
Please Sign up or sign in to vote.
13 Sep 2014
Nelek
Have a look:http://social.msdn.microsoft.com/Forums/vstudio/en-US/3a7d5f8b-b2d3-45dd-b2e7-959c3d55445c/barcode-generation-and-printing[^]it might help, or point you some directions out
Please Sign up or sign in to vote.
14 Sep 2014
Marc Gabrie
ZPL is very straightforward and simple to create as it's a plain text printer command language. You can send those commands to the printer by using this code http://support.microsoft.com/kb/322090If you do not want to learn ZPL or do not have time to spent on it, then try this open source...
Please Sign up or sign in to vote.
16 Sep 2014
Aitizaz Khan
Hi,I just want to know how can i decode the windows spooler .spl file to get the text i just printed.I know i have to do some kind of decoding but i need a little help from where to start. I am using USB POS Receipt printersThanks
Please Sign up or sign in to vote.
4 Nov 2014
Liju Sankar
Please take a look at the these linksHow to Silently Print PDFs using Adobe Reader and C#Print existing PDF in C#
Please Sign up or sign in to vote.
27 Dec 2014
OriginalGriff
Look at the PrintDocument class[^] - it allows you to specify exactly what is printed, where, and what size. You shouldn't use PrintForm - it's a poor solution that doesn;t generally give good results. It's only real use is for debugging when you need an image of the whole screen to show an...
Please Sign up or sign in to vote.
15 Jan 2015
Stan Huang
There may be lots of causes for such bug. In my case, it happened several times and I worked out it by re-building the driver in the development environment where the underlying image was built. That is, the drivers must be built at the same development environment as the kernel image. A little...
Please Sign up or sign in to vote.
29 Jun 2015
OriginalGriff
That code is for sending raw printer data to a printer, effectively bypassing the printer driver which normally translates it into something the printer hardware can understand. It expects that the data it reads from a file is already compatible with the exact make and model of printer you are...
Please Sign up or sign in to vote.
5 Aug 2015
sreeyush sudhakaran
Please refer the project here DataGridView to Crystal Report in C#[^]
Please Sign up or sign in to vote.
24 Aug 2015
Zoltán Zörgő
Use WMI. Win32_Printer[^] class has PortName property.Som other lecture in this topic: Managing Printers Programatically using C# and WMI[^]
Please Sign up or sign in to vote.
7 Sep 2015
Sergey Alexandrovich Kryukov
The question is unclear.Please see JavaScript window.print(); it will open the print dialog: https://developer.mozilla.org/en-US/docs/Web/API/Window/print[^].—SA
Please Sign up or sign in to vote.
21 Oct 2015
George Jonsson
If you add some validation code in the constructor you might get more info.Or use the debugger to step through the constructor line by line.You should add some checks:1. Is ObjDevicesInfo getting a value or is it null?if (ObjDevicesInfo == null) Report an error.2. Check...
Please Sign up or sign in to vote.
12 Nov 2015
Sergey Alexandrovich Kryukov
It all depends on the UI framework/library you are using. For System.Windows.Forms, you should better use PrintDocument (See Solution 1). For WPF… see, for example, http://www.c-sharpcorner.com/uploadfile/mahesh/printing-in-wpf[^].—SA
Please Sign up or sign in to vote.
21 Dec 2015
JayantaChatterjee
I solve my problem with the Unicode which suggested by @BillWoodruff..I found the Unicode Characters from this site: Unicode Characters List[^], then copy the unicode and paste it to in the code.My code become:e.Graphics.DrawString("HBA ɪϲ ", ftNormal, Brushes.Black, 20, 50);thanks...
Please Sign up or sign in to vote.
21 Dec 2015
BillWoodruff
This (C++) article might assist you: "Using Subscripts and Superscripts When Showing Text in the Device Context:" [^].Have you looked into using Unicode Escape formatting to produce subscript ... I'm not sure if that works with PrintDocument.If you do end up using a RichTextBox, see this...
Please Sign up or sign in to vote.
25 Jul 2016
Richard Deeming
The C# code runs on the server. It cannot access printers connected to the client. Unless you can connect the printer directly to the web server, and run your application pool as a user which has the printer configured, that's not going to work.Code running on the client cannot print...
Please Sign up or sign in to vote.
19 Aug 2016
Karthik_Mahalingam
remove the square brackets and try parms[0] = new ReportParameter("parameter_name", TextBox1.Text);
Please Sign up or sign in to vote.
2 Sep 2016
Philippe Mori
You might use that information: CSS Print Media Query | Styling the Printable Version of your Site[^].Thus with CSS, it is possible to make some adjustment for printing.Another possibility is for the server to generate some printable documents (often PDF), that the user can download and...
Please Sign up or sign in to vote.
4 Sep 2016
Duncan Edwards Jones
There is an overload to DrawString which allows you to specify the text alignment within a given rectangle - for example see the article A class to print and print preview a DataGrid or DataGridView control[^]Use that in preference to trying to pad the string with spaces.
Please Sign up or sign in to vote.
20 Nov 2016
Member 12393970
1 alternative  
I am using LPR command for printing PDF file, which is created by using iTextSharp.For printing, I am passing PDF file path, saved on my machine.Process objP = new Process();objP.StartInfo.FileName = "lpr";objP.StartInfo.Arguments = " -P " + printerName + " " + fileName;Now what I want...
Please Sign up or sign in to vote.
22 Dec 2016
Carlo Piras
1 alternative  
I'm trying to make a function in VB.NET that allows the user to print a .PDF file from a folder. Said function must have the following specifications: - The quality of the printed file must be the same as the original, with no degradation. - The user must be able to select a printer and edit...
Please Sign up or sign in to vote.
24 Dec 2020
juliashs
2 alternatives  
I should print PDF using my C++ app in Windows 10 without opening "Save file dialog". Previously I used "Generic Postscript Printer" to save file with the given name as ".ps" and than converted it to PDF using another application. Windows 10 doesn't support "Generic Postscript Printer" but has...
Please Sign up or sign in to vote.
14 Sep 2017
EssenceGold
Working Code: Private Sub Button6_Click(sender As Object, e As EventArgs) Handles Button6.Click BufferImg() Dim b As New ToolStripButton b.Image = CType(PrintPreviewDialog1.Controls(1), ToolStrip).ImageList.Images(0) b.ToolTipText = "Print" ...
Please Sign up or sign in to vote.
27 Nov 2017
Jochen Arndt
If your document uses a format that is registered for printing, you might use the PowerShell (e.g. by writing a script executed from your console application): start-process -File-Path "path-to-document" -Verb Print Otherwise you have to prepare your data to be in a format understood by the...
Please Sign up or sign in to vote.
7 Jan 2018
RohanBhosale21
1 alternative  
I have a WPF application that has user controls being loaded on button clicks. As a report each page is a user control and I load multiple user controls as multiple pages. When I try to print using FixedDocument if I call PrintDialog.ShowDialog for each user control I am able to print the...
Please Sign up or sign in to vote.
7 Jan 2018
Maciej Los
Yes, there's a way! You have to call PrintDialog on the beginning of the process, then you have to loop through the "WPF pages". For example: // select printer and get printer settings PrintDialog pd = new PrintDialog(); //catch when user cancel process //if (!pd.ShowDialog()) return; //...
Please Sign up or sign in to vote.
19 Feb 2018
RickZeeland
There are lots of ways, if you have Word then you can use Word automation, see article here: Word Automation using C#: Create a Word Table Programatically[^] You can also use the Report Viewer control, but sadly this is not installed standard anymore in newer Visual Studio version, it's still...
Please Sign up or sign in to vote.
11 Oct 2018
Richard MacCutchan
answer = len(content) for i in content That is not a valid Python statement; see 4. More Control Flow Tools — Python 3.4.9 documentation[^]. See also section 7.2.1 at 7. Input and Output — Python 3.7.1rc1 documentation[^].
Please Sign up or sign in to vote.
18 May 2019
OriginalGriff
Probably, you can't: the print data in the queue is specific to the actual printer - if you have two different makes (or even different models or software versions in the same make and model) the data will be meaningless to the printer you redirected it to. That's what a print driver does:...
Please Sign up or sign in to vote.
22 May 2019
Gerry Schmitz
private void button1_Click( object sender, EventArgs e ) { Timer timer = new Timer() { Interval = 10000 }; timer.Tick += Timer_Tick; timer.Start(); try { using ( PrintDialog pdi = new PrintDialog() ) { if (...
Please Sign up or sign in to vote.
6 Jul 2019
Dave Kreskowiak
You can't. If you think about it, it's pretty obvious why. Until fairly recently, browsers didn't know how to render a PDF file on-screen. The browsers used the MIME type of the content to determine that it was a PDF file and looked up any registered "handler" for that type to decode and...
Please Sign up or sign in to vote.
13 Aug 2019
Richard Deeming
The number after the % is the "zone index" (aka "scope ID") for the address. It's used by the OS to determine which network interface to use when talking to the address. IPv6 address - Wikipedia[^] Why is there a percent sign '%' in the IPv6 address? - Super User[^]...
Please Sign up or sign in to vote.
26 Nov 2019
OriginalGriff
Well ... you read the same data from the DB each time that method is executed - so as long as the DB contains 30 or more items, you will print the first page, tell the system there are more pages to print, and exit. The system will then call you again to print the next page, you will read the...
Please Sign up or sign in to vote.
28 Jul 2020
JANeets
1 alternative  
Before everyone tells me I am mad I know. Who would in their right mind use a dot-matrix printer in 2020. Well, I am! We are trying to use it to print shipping information for transport companies who do not have a digital system to manage their...
Please Sign up or sign in to vote.
30 Jul 2020
Golden Basim
hi, i search for the best way to print barcode label (designed with XtraReport) multi-times. ex- if i have purchases invoice that contains this items. ----- code ---- name ---- Quantity ----- ----- 1234 ---- item1 ---- 5 ----- -----...
Please Sign up or sign in to vote.
26 Jul 2021N
OriginalGriff
What HasMorePages does is tells the PrintDocument that you are finished, or not. If you aren't (HasMorePages == True) then PrintPage gets called again so you can generate the next page. It doesn't "break" the page immediately you set it's value -...
Please Sign up or sign in to vote.
7 Dec 2009
atliens
2 alternatives  
Hi!I have a problem and I need it to be solved! I don´t know anything about programming or how to set up servers etc. So answers need to be very easy to understand. Thank you. My question.I wanna create a website which has only one function. I the webmaster ask a question and people...
Please Sign up or sign in to vote.
7 Dec 2009
Richard MacCutchan
wrote:I have a problem and I need it to be solved! I don´t know anything about programming or how to set up servers etc. So answers need to be very easy to understand.I think you underestimate the effort required to set up such a system. May I suggest you start by studying the basics of...
Please Sign up or sign in to vote.
7 Dec 2009
AspDotNetDev
I recommend hiring a programmer so they can create a website/program for you. Shouldn't take a skilled programmer but a few hours/days (or one out of college a few weeks) to get you up and running. If you can get a quote from a programmer, $500 seems reasonable.
Please Sign up or sign in to vote.
16 Dec 2009
Simbomatic
1 alternative  
Hello Guys,I'm fairly new to software development, but since starting a new job I've been assigned a number of projects to start on. The one I have decied to start with is a printer/tray selection application.Currently the company uses VB macros inside Word to select a printer and...
Please Sign up or sign in to vote.
3 Jan 2010
aswathstorm
4 alternatives  
I am working on a project which is used to print a CHEQUE, the problem which i face now is, since the Size of the cheque is small rectangle i cannot place it horizontally(normal position), i am placing it vertically 90degree rotated.Now the problem i face is . The program which i did...
Please Sign up or sign in to vote.
3 Jan 2010
Christian Graus
How does the printer know what paper is in it ? Does it get set to a certain custom paper size ? If the printer doesn't know what paper is in it, your program isn't going to be able to tell, either.
Please Sign up or sign in to vote.
3 Jan 2010
aswathstorm
i am new to this c# and printing.i am not so experienced. thats why i ask this. is there any way of getting paper size and paper position from the printer.bcz i need that.
Please Sign up or sign in to vote.
3 Jan 2010
Christian Graus
Well, you really should edit your post if you want to add something. Not that you added anything, really. Like I said, if the printer has not been set up to use a special paper size, then it's for certain that it doesn't know the size or location of your cheque, therefore it's impossible for...
Please Sign up or sign in to vote.
5 Jan 2010
Brady Kelly
2 alternatives  
I am trying to get several PC's on a network to connect to my client's new wireless printer, the C4783. I initially installed the whole HP 'tsumami of software' the comes with the printer onto my laptop, connected to the printer over USB, and corrected it's networking config. My laptop now also...
Please Sign up or sign in to vote.
6 Jan 2010
aswathstorm
3 alternatives  
Hi, we are developing a tool for printing cheque . i struggled and atlast i found the way to print the cheque with side feeding printer.but now a new problem arrised , when i try to print with center feeding printer, my print starts from the left corner so, only some portions of the cheque...
Please Sign up or sign in to vote.
6 Jan 2010
Christian Graus
By centering what you print on the graphics object you're passed to print onto ?
Please Sign up or sign in to vote.
6 Jan 2010
aswathstorm
Can you please tell me little clearly.
Please Sign up or sign in to vote.
6 Jan 2010
Christian Graus
I tend to give answers on the basis that the people reading know enough about programming to understand them.Also, PLEASE edit your post to add info, don't post an 'answer' that is another question.I have to guess what you're doing ,given that you never post any code.Here[^] - the...
Please Sign up or sign in to vote.
6 Jan 2010
DABBee
Have you used exactly the same process with the netbooks ?I had a quick look on HP for connection issues and nothing stood out - here's the plain vanilla troubleshooting version by...
Please Sign up or sign in to vote.
6 Jan 2010
Rick Shaub
I installed network printer at home recently (HP 6310). My laptop already had the megaload HP driver suite installed. I was able to just use the "Add printer" utility in windows (Vista 64 bit) to install the printer. Maybe if you install the drivers as if you are running from USB (connection...
Please Sign up or sign in to vote.
9 Feb 2010
Grunge Boy
Hi Richard, thanks for the hint. Actually I solved the problem using interop functions. Your hint helped me to realize that I'm on the wrong way . :)
Please Sign up or sign in to vote.
2 Sep 2017
Xonfused
2 alternatives  
Ok, so here is the thing. I wanna print some text on more pages, text that would be inserted by the user in a textbox (jest to have an image).. I ll give you a simple example of what i am trying to do:on a click of a button i wanna call a print preview dialog (here is how):private void...
Please Sign up or sign in to vote.
30 Apr 2017
css_team
1 alternative  
Hello.My challenge is to intercept all printjobs. Foreach job I want to determine, whether the duplex or the X pages per sheet function was used.I’m trying to solve the solution using C# and the .net Framework.I already found a couple of solutions to get more general information about...
Please Sign up or sign in to vote.
31 Mar 2010
Sivaprasad S Nair
1 alternative  
Hello..I am having a problem.I wrote a virtual printer driver (something like a PDF creator) which has a print processor and a language monitor. I have a UI which is poppedup on each print job to my printer. I am invoking this UI from the print processor. I installed it in a W2003 print...
Please Sign up or sign in to vote.
13 Apr 2010
Goutam Patra
1 alternative  
Dear AllIs there any printer char to relode the paper in a dot matrix printer. Actually after a copy is printed i need to reset the paper on the top of the page to get the next print. ThanksGoutam
Please Sign up or sign in to vote.
13 Apr 2010
CPallini
Do you meand 'Form Feed' [^]? :)
Please Sign up or sign in to vote.
24 Apr 2010
kingmax54212008
Could you please provide some of the source code?You can also send me via email, email: kingmax5421 at msn.com ( at = @)
Please Sign up or sign in to vote.
27 Apr 2010
jeniusj
1 alternative  
Hi,I asked is there any way to print the documents without opening them. print attribute in ShellExecute() do it for you but If we are printing Microsoft Office documents then it first open the particular application and then issue the command to print the document. Can we make all this...
Please Sign up or sign in to vote.
27 Apr 2010
Christian Graus
No. There is no way to print a document that is not loaded. Printing a Word document is done by Word. If Word does not have the document open, it cannot print it. You can perhaps tell Word to not show it's window while it does it ( I do not know if you can ), but you can't stop it appearing...
Please Sign up or sign in to vote.
11 May 2010
Jamal Seyedi
2 alternatives  
Hi everyone.I'm a new software developer.I'm working in a new project that I create some HTML Code.I need my page be printable. because it's a bill.There are some deferences between my web page and my printed page in a paper.How can I make a web page that exactly show in a printed...
Please Sign up or sign in to vote.
28 May 2010
Gregory Gadow
It sounds like your question should be, "How can I retrieve the record I just inserted into the database?" This article[^] covers three SQL objects that might be useful: SCOPE_IDENTITY, IDENT_CURRENT and @@IDENTITY.
Please Sign up or sign in to vote.
30 May 2010
Agrafena
5 alternatives  
Good day! I have a problem with printing image. How I must fill this function?WriteFile(serial_port, (void *)argv[1], file_name_size, &bytes_written, NULL); Please give me an example.
Please Sign up or sign in to vote.
30 May 2010
Cedric Moonen
You shouldn't access the serial port directly. You have to use the higher level functions from Windows to print. They make abstraction of which type of printer is connected (and how it is connected).Take a look at this section[^] on codeproject to look for a suitable article for your needs.
Please Sign up or sign in to vote.
31 May 2010
Agrafena
I'm sorry, but there are not full answer. How can I create a Bitmap object(black/white)-by CreateCompatibleBitmap function? But how I can sent it to print?
Please Sign up or sign in to vote.
2 Jun 2010
Cedric Moonen
Well, you are not clear at all as which technology you are using. Are you using MFC, win32, ... ?Anyway, take a look at this section[^] on CP. You most probably will find something useful.
Please Sign up or sign in to vote.
3 Jun 2010
«_Superman_»
Basically, printing means drawing to the printer's device context.It is exactly the same as drawing to the screen.Most of the time the code to draw to the screen is exactly the same as that used for printing.Only the device context changes from that of the screen to the printer.All GDI...
Please Sign up or sign in to vote.
3 Jun 2010
Niklas L
Some printers have a built-in ftp server, to which you can upload files to be printed, and some are very sofisticated when it comes to understanding and interpret different file formats. However, doing this circumvents any spooler queues i believe. (which can be very useful at the office when...
Please Sign up or sign in to vote.
3 Jun 2010
Richard MacCutchan
If you are using straight C++ without MFC then take a look at this page[^] on MSDN. If you are using MFC then take a look at CPrintDialog()[^].
Please Sign up or sign in to vote.
7 Jun 2010
vivek.chauhan2009
1 alternative  
hi, I'm using the following to get the DC for the printer:CDC dc;if(!AfxGetApp()->CreatePrinterDC(dc)) AfxMessageBox("unable to create dc");But, it always returns FALSE. So please help me out...ThanksVivek Chauhan
Please Sign up or sign in to vote.
8 Jun 2010
Niklas L
One simple way would be to call ShellExecute[^] with the 'print' verb.That requires you to first save your image to a file.
Please Sign up or sign in to vote.
12 Jun 2010
xmikexhx
2 alternatives  
I need to send a binary file to a printer within a C++ program. Is there a way other than the 'system lpr' method? Currently I open a printer as a shared printer (\\computer-name\share-name) and this works ok, but is somewhat cumbersome when printers are added or changed. Looking for a way I...
Please Sign up or sign in to vote.
22 Jun 2010
dartfrog
3 alternatives  
Hi all, i want to know how to print Barcode and Text together. My printer is Epson TM-U220B(thermal one). Is it Possible? i use VB.NET.How to do it? if possible ,pls guide me.Thanks a lot, :doh:
Please Sign up or sign in to vote.
23 Jun 2010
Smithers-Jones
Now really, that is so basic, have you tried to do anything at all? Just learn about printing in VB.NET (every beginner's book covers that) and then do it. You can print whatever you want: text, barcode as image or using a barcode-font, ...edit:In addition to what I wrote earlier: If...
Please Sign up or sign in to vote.
23 Jun 2010
Russ-T
This control will help you generate the actual barcode (assuming it's the same format of barcode as what you're using): Barcode .NET Control[^]Then, as Smithers-Jones said in their response, just have a look in a VB.net book for an intro to printing text and images. It's not overly...
Please Sign up or sign in to vote.
5 Jul 2010
cornelha
The answer is actually much easier than you would expect. I have been battling with this problem for ages until I found an article on sending raw text to the printer here(http://support.microsoft.com/kb/322091/EN-US/[^] )I don't know vb.net although I am sure you would be able to translate...
Please Sign up or sign in to vote.
13 Jul 2010
clore482
2 alternatives  
Right now, I am currently reading in a text file and wrapping the text that is too big for a page. I currently have tabstops set up, but when the text is wrapped, it begins on the left margin again instead of the indent. How would I fix this? Thanks.EDIT: I have tried messing with the...
Please Sign up or sign in to vote.
13 Jul 2010
Christian Graus
You need to start with a tab to create an indent that is further in than the margin. There's no way for the first line to stick further left than the rest, without you calculating how much text fits on a line and then putting the rest after the first line in a new rectangle.
Please Sign up or sign in to vote.
26 Jul 2010
freemanirl
1 alternative  
So, I've wrote a program awhile ago that prints barcode labels. The old version needed the font to be installed in the fonts folder, but that made it a pain for people using the program for the first time, as the program would print the barcode label with a default font. If I load the font...
Please Sign up or sign in to vote.
26 Jul 2010
E.F. Nijboer
I guess "FRE3OF9X.TTF" isn't a valid font family. Look at the msdn example below.http://msdn.microsoft.com/en-us/library/y505zzfw.aspx[^]Good luck!
Please Sign up or sign in to vote.
28 Jul 2010
Stephane RZETELNY
Hello,I have followed instructions in msdn to change at runtime a printer paper size configuration in my application (http://support.microsoft.com/?scid=kb;en-us;140285&x=12&y=8). I have replaced the dmOrientation option by the dmPaperSize to meet my need.All seems to execute fine (no...
Please Sign up or sign in to vote.
1 Aug 2010
MatthysDT
2 alternatives  
HiI'm working on a project in which I have to print PDF reports to specific printers.I've tried a few approaches (including MigraDoc and others) but the only simple solution I could find so far, was opening a copy of Adobe Acrobat Reader with the correct parameters, causing it to...
Please Sign up or sign in to vote.
3 Aug 2010
MatthysDT
Ok. Looks like I've found my problem. So for completeness sake and for the next poor soul to come across this "Local Downlevel Document" problem please read this:If I'm correct in my assumptions, it seems that when Windows (Windows 7 in my case) creates a new Print-Job, the default Document...
Please Sign up or sign in to vote.
4 Aug 2010
Shining Legend
2 alternatives  
I have one or more files in a folder. When i click on Print button in asp.net, I should print all the files from this folder without opening them.How can I do this in ASP.NET.
Please Sign up or sign in to vote.
5 Aug 2010
Shining Legend
I am using below code for printing :protected void btnPrint_Click(object sender, EventArgs e) { string path = Server.MapPath("~/Documents/"); //Get all the files from the Directory string[] docFiles = Directory.GetFiles(path); //Loop through the...
Please Sign up or sign in to vote.
5 Aug 2010
Christian Graus
Please don't push 'answer' to post more questions. Edit your post. As you say, your code can only ever print documents that are on the server, using a printer that is on the server. Given that this is utterly worthless for any sort of web app, and would need to be run inside a local network...
Please Sign up or sign in to vote.
5 Aug 2010
Shining Legend
3 alternatives  
In ASP.NET , how can i give print command on a printer which is configured on local machine but is installed on server machine.
Please Sign up or sign in to vote.
5 Aug 2010
E.F. Nijboer
Simply select the printer and print. A network printer isn't any different than a local printer when they both are installed. The difference most of the time is that you have to walk a greater distance to pick up your printed goods.Good luck!
Please Sign up or sign in to vote.
5 Aug 2010
Dalek Dave
Doesn't each local machine have it's own default printer?The printer control runs from local not server, afaik.
Please Sign up or sign in to vote.
6 Aug 2010
RikPage123
2 alternatives  
I have written a port monitor based on the "Virtual Image Printer" open-source project. It works fine on XP but fails to load the port monitor DLL on Win7, even though the NSIS-based install process has worked and the printer is installed.I suspect the problem is either (a) in the INF or the...
Please Sign up or sign in to vote.
24 Aug 2010
RikPage123
Thank you Jorgen, it works !Certificates and "test certificates" fully implemented.Converting from XP to Windows 7 is a complicated process due to the above, and as the Spooler service process can no longer access the user screen. I begin now the next phase which is to separate the GUI...
Please Sign up or sign in to vote.
29 Aug 2010
Anoop Athreyasa
1 alternative  
Hi all,I'm facing issue with the print button present in the toolbar of IE.Whenever i click the print button, the page's prerender event is called. This happens only in IE. When i try to print with Firefox, this does not happen.I have an iframe in first.aspx page. In the prerender event...
Please Sign up or sign in to vote.
29 Aug 2010
Christian Graus
I doubt you can change IE, so can you make it so that the code works with it behaving as it is ? What is going wrong right now ?
Please Sign up or sign in to vote.
20 Sep 2010
NetMan2012
3 alternatives  
hello,i have made an asp.net website that prints the receipt. Every thing works well in VS Dev Environment. When i published the website and run on client machine, printing is'int working. the printer does'nt even takes the print call from my website. here is my codeprintername =...
Please Sign up or sign in to vote.
20 Sep 2010
E.F. Nijboer
You cannot control the client's printer from code running on the webserver. You have to create print specific elements on the webpage (or simply a popup that shows the receipt) and call the print from javascript to print the page. Your develop machine is the both client and server so it looks to...
Please Sign up or sign in to vote.
20 Sep 2010
NetMan2012
1 alternative  
hello,I am printing receipts in my asp.net website. i want the receipts to cut automatically after printing. I need the code snippet for printer auto cutting.Thanks in Advance,Asfand
Please Sign up or sign in to vote.
20 Sep 2010
Johnny J.
I think you will have to contact the printer manufacturer to get information on how to do that.Normally you have to send an escape charater to the port where you have the printer attached.The manufacturer will most likely be able to supply you with sample code on how to do that...
Please Sign up or sign in to vote.
21 Sep 2010
sola oderinde
Actually I found out that I could append a COLLATE clause to my search text and make my database perform a diacritic-insensitive search.All I needed to do was append the clause 'COLLATE_Latin1_General_CI_AI'Please, note that this may not always work, depending on how the database in...
Please Sign up or sign in to vote.
2 Nov 2010
john8954
1 alternative  
C# print codeHow can I code for print in c# that is customize according to user need.?
Please Sign up or sign in to vote.
2 Nov 2010
pwtc222
1 alternative  
HiI m accessing my aspx page from client-pc.There's a printing function,where it prints crystal report from my aspx page.When i click the print button from client-pc, the printing job must be done at server side.The printer is connected using TCP/IP.How may i do this,any ideas guys?
Please Sign up or sign in to vote.
11 Nov 2010
yummy02
1 alternative  
i have a hp laserjet 1020 printer.. it is shared by multiple users (network printer)..but suddenly, the printer stop printing.. the green led is not blinking (no signs of error)..what should I do? please help me :((
Please Sign up or sign in to vote.
17 Nov 2010
ghprogrammingco
3 alternatives  
I searched the Internet and CodeProject to find help with this subject but I could not find any useful information.I had some documents and I printed them. I have now lost the important documents.However, due to my printer settings, I still have the spooled files (*.spl and *.shd).Is...
Please Sign up or sign in to vote.
19 Nov 2010
ghprogrammingco
Dear strogg625, thank you for your reply.The spl file format is RAW and does not started with %. I am C++ developer and I would appreciate it if you would let me know what functions to use.
Please Sign up or sign in to vote.
24 Nov 2010
Neeil
1 alternative  
i am developing a project in which in my project i have to print a purchase bill.How can i fetch a data and using which which dialog box i can do it........
Please Sign up or sign in to vote.
3 Dec 2010
Abhinav S
You can try going through this[^] or this[^] article.
Please Sign up or sign in to vote.
4 Dec 2010
Subrat Kumar Rautara
2 alternatives  
Hello everybody,Can anyone tell me that how I can print a document to a USB Printer from DOS through VB.Net?Now I am working on a project for a grocery shop application. I want to print a bill through Lipi LTP 200 model printer but the problem is that this printer has a USB port.I...
Please Sign up or sign in to vote.
5 Dec 2010
Goutam Patra
Use a RAW[^] printer instead. You will be able to print directly from your application.
Please Sign up or sign in to vote.
15 Dec 2010
Member 2191406
1 alternative  
we have printer RICHO AFICIO 2045 S/P model. It has faxing feature also (Ricoh LAN-Fax M3). We fax the document the same way as printing document except, we have to set the fax number in the PRINT properties window as we set the number of copies.The problem is we have to fax 1000s of...
Please Sign up or sign in to vote.
7 Dec 2010
Magnus Gudmundsson
1 alternative  
Hello. I'm trying to generate a flowdocument that is made from a view bound to a viewmodel. I have done this earlier, but then I had to bind the view to the viewmodel by hand. At the time it was not a problem, because the viewmodel was really small. But this time... Binding that works...
Please Sign up or sign in to vote.
8 Dec 2010
siang_wu_id
2 alternatives  
dear all programmers,i need help here.. i am about creating invoice form and then i got stuck about printing the invoice. i have save the datagridview into database using dataset.please help me to print the invoice. give me some usefull code. :(( maybe i can print directly from the...
Please Sign up or sign in to vote.
9 Dec 2010
Prerak Patel
If all you want is there in datagridview itself, then this will help you.The DataGridViewPrinter Class[^]
Please Sign up or sign in to vote.
9 Dec 2010
Niraj.sharma4
This code is my.print previw and print.this code is run in my computer.using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Text;using System.Windows.Forms;using...
Please Sign up or sign in to vote.
21 Dec 2010
venlancer
1 alternative  
I would like to change the printing size in crystal report for 8.5 * 12, I am using an Dot matrix printer, tried using Printer setup but nothing worked for me.
Please Sign up or sign in to vote.
24 Dec 2010
RaviRanjanKr
I recommend you move to Google for this question whatever,this Link[^] may help you.
Please Sign up or sign in to vote.
24 Dec 2010
Smithers-Jones
The first result (there are 38,000 more), when googling for "print content of richtextbox", looks promising:Google - learn how to use it.[^] :)
Please Sign up or sign in to vote.
25 Dec 2010
Siddhartha_t69
1 alternative  
Hello I have a panel control in windows forms application which contains a number of datagridviews. The panel also contains a scrollbar. I need to print the contents of the panel which can be multiple paged. Thank you.
Please Sign up or sign in to vote.
25 Dec 2010
OriginalGriff
Printing is never trivial, but there is a lot done for you. See Printing-Using-C-sharp/[^] or Google "Printing c#" which will give you loads of tutorials.We can't explain exactly what to do, that is a complete article, not a quick answer!
Please Sign up or sign in to vote.
27 Dec 2010
C-A-P
1 alternative  
How I can determine toner remain in the laser printer?[Removed C, C++, C# and Windows tags and added "printing" tag]
Please Sign up or sign in to vote.
27 Dec 2010
#realJSOP
Most printers nowadays come with software/drivers that will report that kind of thing. If they don't come with that kind of software, there probably isn't a way to determine that status. You could always contact the manufacturer and see if they have a SDK available, but I wouldn't expect...
Please Sign up or sign in to vote.
4 Jan 2011
George Waddell
1 alternative  
Hi All,I have an application written in VB.net for batch print jobs. As part of the application, the user selects two printer trays to use to print the batch to (one plain paper the other coloured for coversheets and batch seperators) I had this working until we upgraded our systems...
Please Sign up or sign in to vote.
6 Jan 2011
George Waddell
Resolution:W...
Please Sign up or sign in to vote.
11 Jan 2011
#realJSOP
You can probably get the status using WMI. Google is your friend.
Please Sign up or sign in to vote.
20 Jan 2011
bisharbn
1 alternative  
I need to print Arabic through the receipt printer using vb.net and I'm using the RawPrinterHelper to send the file but...the text file I created is not supporting Arabic.I'm using FileOpen to create the file and PrintLine to write to the file. After that, I am passing the file to...
Please Sign up or sign in to vote.
20 Jan 2011
Jamal Seyedi
2 alternatives  
Hi everyone,I used to make documents to be printed by laser printers. Now I need to make a file which must be supported by line printers, the questions are:1. How or where to start?2. Are there any C# libraries for this?thanks in advance.[orig. title]How or Where to...
Please Sign up or sign in to vote.
20 Jan 2011
E.F. Nijboer
Try this article with sourcecode that can help you on your way:Line Printer Class in C#[^]And you could have a look at this:http://support.microsoft.com/kb/322091[^]Good luck!
Please Sign up or sign in to vote.
20 Jan 2011
Yusuf
In addition to E.F. Nijboers asnwer, see alsoLine Printer Daemon in C#[^]http://dotnetforum.lk/forums/p/4115/16251.aspx[^]http://www.dotnetmonster.com/Uwe/Forum.aspx/dotnet-csharp/92603/Line-Printer-Printronix-Epson-in-C[^]
Please Sign up or sign in to vote.
20 Jan 2011
Dave Kreskowiak
I have no idea why you're creating a file. You just send the appropriate printer commands and data directly to the printer.First, your printer has to support the Arabic character set. Then you may have to send a command sequence to the printer in order to tell it to use that set. That is...
Please Sign up or sign in to vote.
28 Jan 2011
Jewel Joy
1 alternative  
Hi .Am buliding a receipt generator application using C#. Now am facing a problem.I created some receipt templates using Graphics.Drawline and it is done perfectly .. but then came the real trouble. Now i want to change my page size . The task ahead of mine is if i select a...
Please Sign up or sign in to vote.
28 Jan 2011
OriginalGriff
Provided that you are using the Width and Height parameters to draw your lines, rather than fixed lengths such as "1000" or "675" you should be fine. If you are using absolute values, then you will have problems.Try it! Use Print Preview (enable it for testing if you don't have it for...
Please Sign up or sign in to vote.
31 Jan 2011
AschB
1 alternative  
Hello,I would like to know if someone knows an (fairly) easy way to create and print documents in Java. These documents must contain multiple tables/images/etc. I've allready tried to print tables using the print method of the JTable, but I find it verry difficult to extend this class so...
Please Sign up or sign in to vote.
4 Feb 2011
nhsal69
1 alternative  
Hi there,for my sins I have been asked to provide a way of accounting for printing jobs presented to all our printers on our 8 print servers...I'm using the Microsoft Log Parser to get the necessary bits out of each event 10 entry on all servers (printer, user doc name etc) and then...
Please Sign up or sign in to vote.
4 Feb 2011
Abhinav S
You might want to use a third party control like this[^] to monitor the printer queue.
Please Sign up or sign in to vote.
15 Feb 2011
Albin Abel
Hi Create a Generic text printer in the pc (Add new Printer...or google it how to add a generic text printer)Look at this article how to send raw data to printer.http://support.microsoft.com/kb/322090[^]using this you can send ESC/POS commands to the printer.For ESC/POS commands...
Please Sign up or sign in to vote.
25 Feb 2011
metti1309
;P :laugh: :) :confused: X| :cool:
Please Sign up or sign in to vote.
17 Mar 2011
_Maxxx_
Well you can build a string containing escape sequences - if you know the number of the character your printer recognises using\unnnnwhere nnnn is the four digit hexadecimal value of the escape characterSo you may be able to just build that into the string you are printing.
Please Sign up or sign in to vote.
18 Mar 2011
JAZ1976
2 alternatives  
My company has several large format printers that we lease from another company. Every month the leasing company asks for the meter readings on these printers. They use these readings to base when a given printer needs to be serviced. The meter reading is the number of square feet of paper that...
Please Sign up or sign in to vote.
18 Mar 2011
vishnulalr
1)http://www...
Please Sign up or sign in to vote.
26 Mar 2011
555336
1 alternative  
Well, I have a textbox and a print button. I want when a user will click on the print button, the pagesetup appears to print the textbox details according to the user.What is the code to do this?
Please Sign up or sign in to vote.
26 Mar 2011
Wendelius
There's a good example of using PageSetupDialog in the documentation: http://msdn.microsoft.com/en-us/library/system.windows.forms.pagesetupdialog.aspx[^]
Please Sign up or sign in to vote.
27 Mar 2011
astuserp
1 alternative  
Dear Developers,I am quite new to ASP.NET web form development.I am currently working with an ASP.NET web form for capturing user's information.There is a button in the form that when the user pressed, it will print out an A4 paper document containing what was entered by the user and...
Please Sign up or sign in to vote.
27 Mar 2011
Abhinav S
This[^] could help you out as a starting guide.
Please Sign up or sign in to vote.
29 Mar 2011
T3mplarKn1ght
1 alternative  
Relevent Code:Imports CrystalDecisions.CrystalReports.EngineImports CrystalDecisions.ReportSourceImports CrystalDecisions.SharedPrivate cr As CrystalInvoiceSinglecr.PrintOptions.PrinterName = CurrentPrinter()cr.PrintToPrinter(1, False, 0, 0)This code runs fine on the...
Please Sign up or sign in to vote.
29 Mar 2011
Wendelius
Just a thought, in your production machine, do you have some printer defined as default printer? I would suspect that if not, CurrentPrinter() would fail...
Please Sign up or sign in to vote.
6 Apr 2011
Member 3892343
1 alternative  
Hello,I am looking for a free activex or other component to print in VB .net 2008 express records from an sql database other than the native vb .net 2008 print or code. Or if possible a link to native print code.Thank youKyriakos
Please Sign up or sign in to vote.
6 Apr 2011
Wayne Gaylard
You don't need any ActiveX control, just study up on the PrintDocument Class and GDI+ API and you should be able to print anything you want.
Please Sign up or sign in to vote.
11 Apr 2011
junlizhang
1 alternative  
When printing multiple copies of the same document in Excel to my Canon Lasershot LBP1120, it prints one page, printer stops, says printing complete, then starts again and so on. In word it will print all pages in one continuous stream. I will write a report system print function. What...
Please Sign up or sign in to vote.
12 Apr 2011
Maciej Los
OK, if you want to print documents in non-continous way in MS Word, you need function like this:Option ExplicitSub NonContinuosPrinting()Dim doc As Document, iCount As Integer, sAnswer As StringOn Error GoTo Err_NonContinuosPrinting'print active documentSet doc =...
Please Sign up or sign in to vote.
13 Apr 2011
Andrei Ramases
3 alternatives  
i have this code that reflects datagrid values in crystal reports by using datasets. i commit error "The Report Has no Tables" thx in advanceDim report As New CrystalReport1 Dim ds As New DataSet 'Take the data and structure from the datagridview and return it as a...
Please Sign up or sign in to vote.
13 Apr 2011
Sandeep Mewara
Tried and looked here[^]:Top few links:Link 1[^]Link 2[^]Link 3[^]BTW, check your implementation with this article. It does not looks correct: Step by Step Creation of Crystal Report using its Features Group, Graph, Cross-Tab and Sub Report[^]
Please Sign up or sign in to vote.
11 May 2011
novice51
1 alternative  
I read the CprintDialogEX Class in http://msdn.microsoft.com/en-us/library/3f1ccd1t(v=vs.71).aspxI followed what it just said..I create a class(CPrinterDlg) and derive CPrintDialogEx. On another Class where CPrinterDlg is included I write thisCPrinterDlg l_PrintDlg(PD_PAGENUMS | PD_ALLPAGES...
Please Sign up or sign in to vote.
11 May 2011
Joan M
Take a look here... I'm sure that this article[^] from Roger Allen[^] will help you to achieve what you want.HTH & Good luck... :thumbsup:
Please Sign up or sign in to vote.
23 May 2011
mojtaba pirveisi
2 alternatives  
Hi everyoneI have a problem in printing farsi character in thermal printer(Bixolon Srp 350 plus).The company provide a class in c# to send string to the printer to print , but when I send farsi character it prints '?' instead of farsi character.They told me that I should change code page to...
Please Sign up or sign in to vote.
23 May 2011
Sergey Alexandrovich Kryukov
You print your Wordpad documents in graphic mode. This is good.How do you know your printer supports Unicode (which is used by .NET) in character mode? I suspect it does not: the whole notion of code page is from the pre-Unicode epoch. However, for compatibility with obsolete encoding and...
Please Sign up or sign in to vote.
26 May 2011
S Houghtelin
PrintQueue.Pur...
Please Sign up or sign in to vote.
6 Jun 2011
meha23
4 alternatives  
Hello,Line having coordinates (0,0) and (1000,1400) would draw the line on these coordinates only, not taking the page margins property of the Page Settings into account,protected void ThePrintDocument_PrintPage (object sender, System.Drawing.Printing.PrintPageEventArgs ev) { ...
Please Sign up or sign in to vote.
7 Jun 2011
BobJanova
As you've discovered, the coordinate space of the paper includes the margins. Use ev.PageSettings.Margins to determine what the margins are, and adjust your line drawing coordinates appropriately.
Please Sign up or sign in to vote.
7 Jun 2011
meha23
Thanks for the reply,I am not getting how to draw the line according so that my right and bottom margin are also set,I think the printable area of the page would be set,How can I do that??
Please Sign up or sign in to vote.
7 Jun 2011
VallarasuS
Try these things, haven't tried this on a sample, perhaps may help you get around a solution.// Either you may have to translate the graphicse.Graphics.TranslateTransform(x, y);// Or you can limit the clipping regione.Graphics.Clip = new...
Please Sign up or sign in to vote.
8 Jun 2011
meha23
Thanks a lotI sete.Graphics.Clip = new Region(e.MarginsBound);and it worked, but the transformation should be done after setting the clip.Thanks
Please Sign up or sign in to vote.
20 Jun 2011
Member 3892343
I have 2 question not very familiar with datagridex, I want to print from an sql server 2008 express database (I will use VC# 2010 express and COM client sent server application, 2 client application, win xp pro both machines local network, I leave the static ip for net purposes connection , wan...
Please Sign up or sign in to vote.
20 Jul 2011
Jordy "Kaiwa" Ruiter
1 alternative  
Hey CodeProject Members,I have a problem that I need help with. For my current project I need to make a Batch Plot application. This application will have around ~2000 AutoCAD drawings that it will need to print.The application needs 5 printers, 1 for each format, going from A4 to A0. No...
Please Sign up or sign in to vote.
20 Jul 2011
Jordy "Kaiwa" Ruiter
Found it. When calling GetPrintQueues you have to pass in an array of EnumeratedPrintQueueTypes. It now returns both my local and network printers (all installed printers).PrintServer m_PrintServer = new PrintServer(@"\\vps01w2k8");PrintQueueCollection m_PrintQueueCollection =...
Please Sign up or sign in to vote.
23 Jul 2011
rolly.maduks@gmail.com
1 alternative  
Hello I am currently working on a project that requires printing reports, I would like to generate reports from any itemscontrol like a grid or list view and specify the columns I wish to print,(by default print all columns).I would also like to generate printable columns for nontext fields...
Please Sign up or sign in to vote.
23 Jul 2011
mahesh__kumar__sharma
The whole idea is that you need to set different behavior of selected columns on print time. hopefully the following link give you some idea....
Please Sign up or sign in to vote.
28 Jul 2011
Joanne0005
1 alternative  
hello, im working on a datagridview print, my code is working but not how i want it to be, i want the position of the datagridview at the bottom of the paper but the code below print it above the paper, please help me. I'm using Visual Studio 2008 ' Code for printing DataGridView ...