printing

Using PrintDlg on Vista x64 does not work, works fine on 32 bit and XP

We've got an app with some legacy printer "setup" code that we are still using PrintDlg for. We use a custom template to allow the user to select witch printer to use for various types of printing tasks (such as reports or drawings) along with orientation and paper size/source. It works on XP and 32-bit Vista, but on Vista x64 it gets a...

Can I print html files (with images, css) from the command-line?

I want to print styled html pages with their images from a script. Can anyone suggest an open-source solution? I'm using linux (Ubuntu 8.04) but would be also be interested in solutions for other operating systems. ...

Can I programatically control the 'Rotate 180 Degree checkbox' option in HP Printer Driver settings with VBA ?

I'm trying to switch on and off the Rotate 180 degree setting for a HP Laser jet printer (4200/ 4350) using a duplexer unit. The Business has a requirement to "print on both sides", for maximum control I'd like to be able to manipulate at print time (through print macros) whether or not duplex printing is enabled for each of the differe...

Print from a windows App - data from an Oracle DB on Linux

We have an Oracle DB running on Linux. When data is ready to report, a value is placed in a table in the DB. Presently an app is scheduled to run every 10 seconds to check for the value and if it's there it prints out the report. NOT prety. How can I make this pretty? I sort of envision the Oracle DB somehow triggering the windows s...

Print Report without ReportViewer in ASP.NET

Hi, I am using Business Intelligent reporting servicess to reporting some data from My MS SQL Database. In ASP.NET I create new Reporting Viewer that take data from BI and display the report then I can Print it. My Question is How can I print the report without report viewer? thanks in advance :) ...

How to get Printer Info in .NET?

In the standard PrintDialog there are four values associated with a selected printer: Status, Type, Where, and Comment. If I know a printer's name, how can I get these values in C# 2.0? ...

How do you use printer to improve your productivity?

I was very surprised to find out that printer could help a lot for some programming tasks. But first it was very unusual and I had to think a lot on how it could help. So how do you use printer to improve your productivity? P.S. I post my answers below. ...

Capturing Print Event via jQuery

I would like to be able to manipulate the DOM just before my page is sent to be printed. Internet Explorer has an event on the window object called "onbeforeprint" but this is proprietary and isn't supported by other browsers. Is it possible to do this via javascript (jQuery in particular, if possible)? Before you ask, I can't easily us...

Are There Easy Ways To Print Data on Specific Area

I'd like to print some data to specific area on A4 paper. Are there any easy way to do like that? It's very difficult for me to find coordinate of X and Y. Below is my sample code in VB.NET to print the data. Private Sub PrintDocument1_PrintPage(ByVal sender As Object, ByVal e As System.Drawing.Printing.PrintPageEventArgs) Handles Print...

Best way to print Invoices, Pick Tickets etc...

Well, heres my scenario. Client/Server winforms application with SQL Express as the DB. I need to be able to print invoice, packing slips etc.. i would like the customer to be able to modify the invoices. ie. be able to put their logo or change font sizes etc...basically format the display. Things i have considered so far are. 1) Use...

SQL Reporting Services 2005 - Printing in FireFox

Printing button is not shown in the report toolbar when they are opened in FireFox. Is there any solution for print button not showing in FireFox ? Can it be enabled or there is no workaround for this? ...

Height of string measured with MeasureString in PrintPreviewDialog differs from that in actual printing.

Hello! I'm trying to measure height of some text for table printing purpose. Here's the code. In my case it prints different numbers in preview and on actual page. I can't try on any printers other than Microsoft Office Document Image Writer right now, but I'm pretty sure it isn't a printer issue. Perhaps somebody have found a workaro...

One or more parameters required to run the report have not been specified.

I'm trying to print a RDLC file directly without showing Microsoft Report Viewer, I have followed the MSDN's example but now, every time I call the "Render" method of my instance of LocalReport class it throws the "One or more parameters required to run the report have not been specified." exception. Can anyone tell me which parameter i...

Number of printed copies in Windows Server printer logs

I have a Windows 2008 Print Server with turned on logging spooler events. When somebody prints a document, I can see log entry with user name, document name, number of pages, but there is no information about number of copies. When an user prints many copies or only one - the same log entry is created. Is it possible, using build in Win...

C++ format macro / inline ostringstream

I'm trying to write a macro that would allow me to do something like: FORMAT(a << "b" << c << d), and the result would be a string -- the same as creating an ostringstream, inserting a...d, and returning .str(). Something like: string f(){ ostringstream o; o << a << "b" << c << d; return o.str() } Essentially, FORMAT(a << "b" ...

How do I flush the PRINT buffer in TSQL?

I have a very long-running stored procedure in SQL Server 2005 that I'm trying to debug, and I'm using the 'print' command to do it. The problem is, I'm only getting the messages back from SQL Server at the very end of my sproc - I'd like to be able to flush the message buffer and see these messages immediately during the sproc's runtime...

Java printing directly to a Postscript network printer

I've got Postscript code/data (?) in memory (in a Java Tomcat webapp) that I'd like to send directly to a networked PS printer. Is there an easy way (i.e. just popping open a port and sending the text) to print this, bypassing all of the O/S-specific drivers and stuff (and hopefully not even requiring extra jars)? A link to example cod...

Printing from the web at client side

How can we print using print document so that we can control the printer paper size? It must be controlled after web hosting is done without the print dialog popup or javascript popup. It should print on the client's printer after webhosting without the print dialog option and setting the paper size. It should be done in C# .net ...

Safe Width in Pixel for Printing Web Pages?

What is the safe width in pixel to print a web page? My page includes large images and I want to make sure they will not be cut of when printed. I know about different browser margins and US Letter / DIN A4 paper sizes. So we got standard letter sized and some default DPI values. But can I convert these into pixel values to specify in...

HP Universal Printer Driver- any thoughts/advice?

We, like most companies enforce a branding policy on our outgoing literature. This involves using different paper types etc, so we need to control the print process using a shared set of VBA routines stored in addin templates. One of the main problems we face is the nuances (such as hard coded tray enumerations) between different models'...