printing

Print WPF Visuals with MVVM pattern

My ViewModel has a PrintCommand executing a Method called PrintCalendar(). But the Calendar aka datagrid is in the View, so how do I get my datagrid into the ViewModel? Getting my hands dirty and do all that stuff in code-behind? oh no... PrintDialog printDlg = new PrintDialog(); printDlg.PrintVisual(datagrid, "Grid Printing."); ...

Socket print to Toshiba B-SA4TM

Hi, I should print barcode labels to a Toshiba B-SA4TM printer. I have found a code snippet to print directly by socket http://goo.gl/rm5y But I can't figure out how I should pass commands. Does someone have some example please. Thank you very much. Kindly Elvisd ...

Difference between returns and printing in python?

In python I don't seem to be understanding the return function. Why use it when I could just print it? def maximum(x, y): if x > y: print(x) elif x == y: print('The numbers are equal') else: print(y) maximum(2, 3) This code gives me 3. But using return it does the same exact thing. def maximum(x, ...

Cancel documents in the printer queue from java in windows

Is it possible to cancel a print job once it has already been put into the document queue in windows with java code? ...

DocumentPaginator that works with any Visual?

Printing any visual is easy. Printing one that is larger than a single page is hard. I'm stuck. The docs are scarce and I've gotten as far as I can. I'm wondering if anybody has a class which extends DocumentPaginator that can take any visual (or even a UIElement) and split it across multiple pages. I attempted to create one, but I ...

Grails: How do I print in the cmd console??

I wanna print a few values in the console, how do I do this? Every time I get into a function, I want it to print a line with whatever text, I just wanna know if I'm getting into the function, and for some if-else statements. Mostly for debugging. ...

How can I print "Done" or "Fail" at the end of line to stdout in Perl?

I just have begun with Perl and I want to write my own script to scan a document and convert the resulting TIFF file to a PDF file. If the conversion succeeds (using tiff2pdf), I want to print "Done" at the end of the line, but I can't seem to find a hint to do this on the Web. My guess is that I have to get the geometry of the terminal...

How to read OutputStreamBitWriter object in Java?

I have the following code: OutputStreamBitWriter writer = new OutputStreamBitWriter(System.out); writer.writeBit(1); If I want to print the value or store it in a String, how do I do that? ...

Maintaining print CSS stylesheet files

How do you usually handle changes to screen and print CSS files? I typically have one screen CSS and one print CSS file and for the most part the I would copy the contents of screen CSS to print CSS file and then modify some properties, classes or ids, maybe set some display:none to certain classes etc. The problem is, while working on...

ASP.NET MVC VS2010 Crystal Reports Beta 2 Can't Print, Export, Zoom, or Change Pages

I just upgraded to the beta 2 of Crystal Reports for Visual Studio 2010 and I'm not able to print, export, zoom, or change pages while using the web control in an ASP.NET MVC application. I can get the report to run and display just fine on the webpage. All of the buttons have images, and the report data looks exactly as it should on t...

python : get the print output in an exec statement

i've got a little problem here is my code : code = """ i = [0,1,2] for j in i : print j """ result = exec(code) how could i get the things that print outputed ? bref here how can i get in something : 0 1 2 regards and thanks Bussiere ...

How to achieve service discovery like "Printer Discover" on android?

Hi, I would like to know about the 'service discovery' mechanisms supported by android - particularly, Printer Discovery. Does android provide such a discovery option? example : support for snmp broadcast? I tried out an application "PrinterShare" link : http://www.printeranywhere.com/mobile.sdf where Printer Discovery is achieved thro...

How to enable direct printing capabilities for web based application ?

Hi, I'm developing a web application where user require to print a particular form with a single click. Based on my findings I understand that we need to create a printable version of the form and then send it to the printer. But still I could not find out a way to send such printable version of the form directly to printer without di...

CSS formatting multi-page print

I've got the following code and I'm trying to use CSS2 or CSS3 to make it so the content appears below the header on each page when in print preview. Is this possible? It seems to work correctly on the first page but then every page after that the header sits on top of my content. <!DOCTYPE html> <html><head> <style> @media print { h1...

PHP - Check if something was print in the browser

How can I check if something was print in the browser? I've tried headers_sent but it's for headers... If nothing was printed i want to download a file: public function download() { $file = null; $line = null; if(headers_sent($file, $line)) { /* generic exception... change that... */ throw new Exception('Hea...

Is there such a thing like a Printer-Markup-Language

I like to print a document. The content of the document are tables and text with different colors. Is there a lightwight printer-file-format which i can use like a template? PS, PDF, DOC files i think are to heavy to parse. May there exist some XML or YAML file format which i can Easy create (maybe with a WYSIWYG-Editor) Can parse and...

WPF Printing - Multipage Invoice Via Flowdocument, Paginator and FixedDocument

Hi Everyone, We're currently using WPF to create a multi-page invoice document, to then be printed / exported via XPS. The route we've taken to achieve this is to create a UserControl containing a standard ListBox etc displaying the Invoice lines, this is then included in a FlowDocument inside BlockUIContainer tags. When this FlowDocu...

Silverlight 4 Printing API

Within Silverlight 4 printing with the printing API will it "auto-scroll" covered areas? Excuse me if I'm not using the right terminology. For example, If I have a DataGrid and it has 10 items shown and 40 not revealved (but you could scroll to). Is there a way to print the whole DataGrid, rather than just the "screen shot" view. ...

Printing a formatted HTML page in C#

I am looking for a way to print a formatted html file in landscape mode in c# (primarily wpf). Print dialog would be nice in order to set the page setting to landscape. I tried using Microsoft's html to xaml converter and it destroyed the formatting. I find it quite amazing that there is no method or grabbing a file and sending direct...

qt : Printing a WebView -- lp error : no default destination available

I am trying to print a webpage by calling the print() function of class WebView. The steps were : QPrinter printer; QPrintDialog setup1(printer); setup1.exec(); browser.print(printer); // browser is a QWebView object The above are not the exact code, just the steps.When the QPrintDialog shows up, the name of the printer is not there ...