printing

gtk+ printing list of image

Hello, In my gtk+ application i have list of images and i need to print it. I have code for printing one image: static void draw_page (GtkPrintOperation * oper, GtkPrintContext * context, gint nr, gpointer user_data) { MainWin* mw = (MainWin*)user_data; GdkPixbuf* pixbuf = gdk_pixbuf_new_from_file(...

How can I use WPF bindings while printing?

It seems not all bindings are to evaluated when printing. For example, in the code below, only the first button has content = "100", other buttons have content = "0". var doc = new XpsDocument("test.xps",FileAccess.Write); var writer = XpsDocument.CreateXpsDocumentWriter(doc); var collator = writer.CreateVisualsCollator(); collator.Be...

How to get the Computer Name and IP to which a Printer is Connected in LAN

In a LAN normally printers are shared, and we can add these shared computers in the LAN to our machine through Windows "Add Remote Printer". I want to get the list of added printer like this, and there online status and printer settings through C#. The list of added printers could be obtained by System.Drawing.Printing.PrinterSettings.I...

TIFF image prints fuzzy (but works fine from Paint.Net)

I have created a TIFF image from several lines of text, and it's quite large at 300DPI. The image itself looks pretty good. The font is set as followings when drawing the string to the image: drawing.SmoothingMode = SmoothingMode.Default; drawing.TextRenderingHint = System.Drawing.Text.TextRenderingHint.SystemDefault; When I print t...

Using COM RPC from within CView::OnBeginPrinting

I've inherited maintenance for a program which currently queries an ADODB database from within its CView::OnBeginPrinting override. However, when the ADODB database handle is a proxy for an out-of-process database connection, this crashes frequently - apparently, while waiting for an RPC response, a paint message causes it to reenter CVi...

Getting rid of the printer spooling dialog box during programmatic printing

The following is the CScript script I use for the programmatic printing of a Word document. var err = 0; var app = WScript.CreateObject("Word.Application"); try { var filename = WScript.Arguments(0); var enc = (filename.toLowerCase().indexOf(".txt") >= 0) || (filename.toLowerCase().indexOf(".htm")) ? 65001 : 1252; var objDoc = app...

Flex: Load PDF into Sprite for printing

I have pre-existing PDF files which I would like to send to a PrintJob in Flex 3. I can load the files fine with UrlRequest, but I need to somehow get the data into a Sprite to be included into a PrintJob. Is there a way to do this, or should I go another route? (I've seen the hidden iFrame example, but I was hoping for a way to do thi...

Displaying data using BIOS in C

Is there any way to print data using bios in c. I know in assembly you can use int 0x10, but is there any equivalent for C? ...

Java unicode characters error in cmd

I have the following class in Java which prints "Hello World" in portuguese: public class PrintUnicode { public static void main(String[] args) { System.out.println("Olá Mundo!"); } } I am using Eclipse, so I exported the project to a Runnable Jar File. After that, I went to cmd (Windows 7) and ran the generated jar fi...

Linux C: Easy & 'pretty' dump/printout of structs (like in gdb) - from source code?

I am having a slight problem with some structs in a kernel module I'm building, so I thought it would be nice if there was an easy way to print out structs and their values - and below is a small userland example of what I mean. Say we have the simple C example as below (given in form of a bash commands): FN=mtest cat > $FN.c <<EOF #i...

Print Job Accepting and routing Software

I want to create a software which can accept Print Jobs from other computers, and then route those print jobs to PCs on LAN with printers attached. How it's going to happen -> 1- When that software called "Virtual Printer" is installed on a computer "X", Windows should think that it is a print driver/attached printer to that computer. ...

Print datagrid values

in C# win app i displayed the data's in datagridview, in that i need to print the datagrid values same form without using report or crystal report if any codes ...

Should I use System.out.println() or something else?

I've been casually programming in Java for a while, but I still have a few burning questions on the fundamentals. I've heard that I should use System.out.println() to display data from some people, and others have given me different ideas (like PrintStream or something else). What's the best way to print to console in Java? ...

C++ alternative to perror()

I know we can use perror() in C to print errors. I was just wondering if there is a C++ alternative to this, or whether I have to include this (and therefore stdio.h) in my program. I am trying to avoid as many C functions as possible. Thanks! ...

Creating and Printing Bitmaps from Visuals

I am trying to find an reusable and elegant way to create bitmaps from a visuals in WPF and then print the bitmap to a TLP-2844 zebra printer. The bitmap image needs to be 203 DPI since this is what the Zebra printer supports. I have tried everything I can think and I have to be missing something either completely obvious or what I am ...

Generate a space with HTML that a printer will ignore

I have some code that generates bills for multiple customers on one web page. I use the div element style="page-break-after:always" so the user can print every customers bill at once, and the bills for unique customers will all be printed on a separate sheet of paper. My issue is that I want the bills to be a little more readable on th...

How would one retrieve a PrintDocument object from a WebBrowser object?

I want to show a print preview dialog for a WebBrowser control that I have in a WinForms application. I am using .NET framework 3.5. I am aware that I can show a print preview dialog as follows: webBrowser1.ShowPrintPreviewDialog(); But I would like to perform some operations on that dialog, namely specify its size. In order to do this...

Infinite loop in IE6 Print Preview

I work on a web application hosted at over a hundred large sites that has as one of its requirements support for Internet Explorer 6 - not supporting IE6 is not an option as the organisations that use it are huge and that decision is out of my hands. Users have discovered that printing certain pages is not possible, and having simplifie...

Picture to Canvas printing service with Developer API

Hi there, I'm looking for an on-line service that provides a picture to canvas service offering a reseller program with developer API. Services examples would be- although this ones do not offer an API: canvaspop uprinting Any pointers?! ...

How to configure the printer to stop after the page content is finished , irrespective of the page setup?

Hi, I'm printing an invoice from the browser and the invoice size may vary. I've set a page size of 6 inches width and 5 inches height.. Even if my invoice is just 2 lines it would take up the whole 5 inches height of paper and roll out.. Can i configure it to just stop rolling paper once the print content is finished, so that i can ...