printing

How can I print syntax-highlighted Ruby code?

I use TextMate for my Ruby editing, but when printing files, the code isn't syntax highlighted. Are there any good programs for printing out well-formatted color-highlighted Ruby code? ...

Registry Printer hack to change dialog box Print Range default from "all" to "selection"?

I have to regularly print a page from a browser; in XP the dialog box for printing, "Print range" defaults to "Print All" which I keep accidentally OK-ing. I'd really like for "Selection" to be the default -- I've hunted around the registry -- and the internet! -- for answer to no avail. Any ideas? ...

How to pass dymanicaly generated reults into a print friendly new window

So I have a quiz users take, and at the end they obviously get results. There is a "Print Results" feature which the client wants to load into a new window with new css etc... My question is, how do I pass the results to a new window using javascript? Normally I would do this all with session, but the quiz and results were all done wi...

What is the file path, as a string, of a file in the application's resources?

The reason I ask is that I want to print, at run-time, a file in the application's resources, like this: Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim printProcess As New Process printProcess.StartInfo.CreateNoWindow = True printProcess.StartInfo.FileName = "C:\Users\Ge...

Python Qt: Qprinter not defined

Hi Everybody, I am trying to put the printer to run the output from an html document. Here is a small function to do that: def callPrinterHtml(self,document): self.printer = QPrinter() self.printer.setPageSize(QPrinter.Letter) dialog = QPrintDialog(self.printer, self) if dialog.exec_(): document.print_(self.pr...

How to get model of a printer in javax.print?

Hello, I use Windows XP Professional. How can i get model of printer in package javax.print.* ? For examples: HP LaserJet M1319f MFP, HP LaserJet 3050 Series PCL 6, ... Here is how i get print services PrintService[] services = PrintServiceLookup.lookupPrintServices(DocFlavor.SERVICE_FORMATTED.PRINTABLE, null); Thank you!, Minhbt...

Drag and drop printing, pixel perfect

Hi, I have a bunch of specialised medical forms that I need to print information onto. The user needs to be able create the windows forms (this data is saved in the database) i.e.: 2 text fields and a checkbox. Once the windows form is created the user ideally needs to be able to create the printable report by dragging and dropping the ...

How to hide the URL address which shows on the bottom of the papers when printing something from a website?

Is there away to make a web page print without showing the URL at the bottom of the printed pages? Or if possible to hide the page numbers which shows at the top? ...

Print CMYK Tif from Windows-PC

Hello, I need to print a CMYK Tif from Windows to a HP Color LaserJet 5550 (PCL and PS driver installed), best via CMDLine util. When using built-in Print-/Fax viewer, the Tif prints, but I see no difference between mixed black of CMY and pure black of K. I can verify the Tif is CMYK by seperating channels with ImageMagick (convert cmyk...

Printing in (Parallel Port) Dot Matrix over C#

For the needs of a project, i want to print over the LPT1 in specific locations, this will print a document in a dot matrix printer where i should print values in the places they should go. I really hate going back, and i don't have any idea where to start. Internet has no specific information about printing in LPT port with C# and espec...

When exporting as PDF, Firefox clips bottom div intended to provide copyright message on every page

I need to output a PDF of this page – http://mpkb.org/doku.php/home:1 – and have it make a copyright statement on the bottom of every page. The problem is that that statement is clipped when I export as PDF from Firefox for Mac. (I just have to do this once a month, so I don't necessarily care if this doesn't work in other browsers.) Us...

What is the most straightforward way to produce an XPS document (for printing) that has one picture/page?

I am trying to print captured images from a WPF application - it seems the approach to take is to create an XPS document and then send that to the printer. I have found some samples that involve using a DrawingVisual and adding that to the document, but after that I am unsure of how you set pagination, etc. Another example I have seen i...

simultaneous connections in XP/Vista/Win7

IIS 7 on Vista does not limit the number of allowed connections as IIS on XP did but limits concurrent requests to 10 (Windows Vista Ultimate, Business, and Enterprise Editions) or 3 (Vista Home Premium). Additional requests are queued which hampers performance but they are not rejected as with XP. This is what I got from wiki, but I wo...

What is the simplest way to print a series of full-page images from a WPF application?

I have a series of images (just stored locally on disk) that I would like to print, one-per-page, possibly scaled up/down if necessary and centered. What is the most straightforward method of doing this from a WPF application? Is it to somehow create an XPS document and if so then how? If not, what other possibilities are there? (e.g...

Choosing Correct papersize when printing with .NET PrintDocument

When I am looping through each page I need to decide the size of a page and choose what size to print it in. is there an easy way to determine what size they are suppose to be? right now i was going by the ratio of width and height. If ratio >= 1.64 && ratio <= 1.65 Then Legal Size, If ratio >= 1.29 && ratio <= 1.30 The Letter Size. b...

Raising an exception vs printing?

Whats the difference between raising an exception and simply printing an error. For example, whats the benefit of using the following: if size < 0: raise ValueError('number must be non-negative') instead of simply: if size < 0: print 'number must be non-negative' I'm a newbie, please take it easy on me. :) ...

Is there a way to track if a user prints a web page?

Is there a way to track if a user prints a web page? Thanks, Graham ...

Excel: How to get a locale-independent printer name?

There's a PrintOut method in Excel that prints stuff. It accepts a printer name as a parameter, and that printer name is not just a system printer name, but a combination of both system printer name and port to which the printer is connected. .PrintOut ActivePrinter:="MyPrinter" & " on " & "Ne00:" If you only provide a system name, Ex...

How do I detect the end of a page in a fixed document

How do I detect the end of a page in a fixed document in WPF? I want to be able to print a list of customers, but I'm not sure how to tell when to create a new page. Do I guess? i.e. If i think that 50 customers will fit on the page then I only get the first 50 and then create a new page and display the rest on the second page. Also, w...

Print different sizes pages in Java with Java Print Services

I am trying to print different sized pages in JPS using a Book object. I create a custom PageFormat and I have a custom print() method in the SwingComponent. I can see that the PageFormat is correct, but the actual printed page always takes the size of the first page, not the page size for each PageFormat. Any suggestions on how I can ...