printing

Java Exception printing twice

I know the exception is kind of pointless, but I was trying to learn how to use / create exceptions so I used this. The only problem is for some reason my error message generated by my exception is printing to console twice. import java.io.File; import java.io.FileNotFoundException; import java.io.PrintStream; import java.util.Scanner; ...

[iPhone]: How send output stream via wireless network?

I want to write an app for a certain type of printer to print some text via wifi for iPhone. iPhone can join an existing wifi network by the Settings app, but how to create an output stream for the network so that the app can use it to send command to printer? I mean the wifi connection is set up already, how to get something like NSOu...

How to program a POS Printer using USB on Visual Basic 6

How to program a POS Printer using USB on Visual Basic 6 ...

PrintCapabilities seemingly not returning all available capabilities

I'm trying to do some automated printing by using the PrintQueue class and printing XPS documents I have converted from word. Everything works fine, except for the fact that when I check the capabilities of the PrintQueue it returns NO stapling capabilities. This is not correct, as it is possible to open a word document and print it wi...

print.css Issues

I was just recently asked to add a print stylesheet to a site I've coded out and am baffled as to why Firefox is mangling the output. A print preview of the following page reveals what I'm referring to: http://webreviewportal.com/ethicalmovers/newsite/aaem-customer-testimonials.php When you try to print that page in Firefox, you get t...

Looking for lightweight document description language for printing

I'm looking for a very lightweight document description language, which can be easyly parsed in C. The purpose is printing of small documents or labels similar to cash register receipts. I need only basic formatting features for font settings, alignment and insertion of predefined variables. Any ideas? Would using of some subset of rtf ...

Way to default the name of the generated XPS file?

If a user prints a report, and they happen to be using the Microsoft XPS printer, i would like the default the filename to something meaningful. i would have thought that the XPS printer would take the name of the print job, and use that as the default filename - but it doesn't. Is there some other, programatic, way to default the name...

Issues with XPSDocumentWriter and PrintDialog.PrintDocument

Our company is developing an application (WPF, targeted to .NET 3.5) with the WPF Diagramming Components from MindFusion.Apparently, printing and saving XPS Documents results in various errors on different systems. I reduced the problem to a single sample XPS Document created from our application.I'll first give an overview of the conce...

Need to either convert RAW print data to ps/pdf or print it from Java.

Our application is a client/server setup, where the client is a standalone Java application that always runs in Windows, and the server is written in C and can run on either a Windows or a Unix machine. Additionally, we use Perl for doing various reports. Generally, the way the reports work is that we generate either a text file or an ...

How do I print the source code of a bash script (on paper)?

I need to print some Bash script on paper. Any recommendations on how to get a nice output with syntax highlighting and all that? I've tried TextMate, but the output had huge fonts (and no syntax highlighting, no colors). ...

how to print database diagram sql

Hi I would like to print the database diagram in sql. I'm using SQL Server Management Studio. What I did I right click on it, and select "View Page Breaks". I wanted to have the diagram in A3 Format. But when I tried to print it, I had 4 pages. Is there a way where I can print the whole diagram in just one page? Thanks ...

How can I get a printers device context?

I'm on Windows and trying to print an Enhanced Metafile (EMF) using PlayEnhMetaFile(). I'm currently displaying it using a device context for a window on the screen, but now I want to send it to a printer. How can I get a device context for the printer and pass it into this function properly? ...

Why print your code?

What benefits can be gained by printing out code as opposed to reading it on screen? Do you print your source code? If so why? ...

Options to print label with barcode?

Hello I bought an entry-level Brother label printer, and I need to print this type of label from Delphi: http://img54.imageshack.us/img54/3557/delphiclothlabel2.jpg (The barcode was simply created using the free 3of9 TTY font, although some VCL components are available to create a barcode directly.) I read that the standard way is to...

View print CSS in IE7 or IE8

I'm debugging a site that has problems with element positioning when printing (I have a separate print.css file linked by a link element with the media="print" attribute). This problem only occurs in IE7 and IE8. What I'm looking for is a way to view the page using the print media type, but while still having IE8's developer tools avail...

Resizing JPanel to prepare for printing without removing it from its original position

In my program I frequently need to print various JComponents (generally JPanels) and I like them to be full-page. The way I do it now is by using the following code: g2d.scale(pf.getImageableWidth()/componentToPrint.getWidth(), pf.getImageableHeight()/componentToPrint.getHeight()); but this often stretches or otherwise deforms whatev...

How can i print a dbgrid?

I'm working with delphi2009 and i really need to create a button that can print all my data in a dbgrid. I appreciate all the help i can get. ...

Perl Print buffering flush

Hi, I have the following Perl code: STDOUT->autoflush(1); foreach(...) { ... foreach(...) { print("Processing $folder"); $|=1; process($folder); } ... } but the print statement works only in the first iteration of the loop and does not print anything after that. Any idea why? EDIT: I fou...

Can I use printComponent without having to draw component to screen first?

I have been using the printComponent that was shown in another question. It works great for printing a JPanel if I first add that JPanel to a JFrame and draw that JFrame to screen. But if I don't do that before I print, I get a blank page printed. Why is this? Thanks in advance for any help. ...

How do I print an existing PDF from a code-behind page?

I've seen a few questions like this around SO but couldn't find anything that's right for me. The chain of events that I would like to occur is as follows: User clicks an ASP.NET button control This fires that button's onclick event, which is a function foo() in the C# codebehind foo() calls some other (unimportant) function which crea...