554
голосов
9ответов
819799 просмотров

How to print instances of a class using print()?

I am learning the ropes in Python. When I try to print an object of class Foobar using the print() function, I get an output like this: <__main__.Foobar instance at 0x7ff2a18c> Is there a way I can set the printing behaviour (or the string representation) of a class and its objects? For ...

9
голосов
7ответов
10104 просмотров

How can I print to a variable instead of a file, in Perl?

How can I print to a variable with Perl? I've been working on a program for a while which logs its iterative progress in a highly verbose fashion... print $loghandle $some_message; However, I'd like to also selectively print some of the messages to a different file. Naturally, I could sprinkl...

1
голосов
2ответов
583 просмотров

Is there a way to determine in .Net (or WMI) if a print driver will print to PCL or PostScript format when printing to a file?

Is there a way to determine in .Net (or WMI) if a print driver will print to PCL or PostScript or XPS format when printing to a file?

1
голосов
1ответов
1572 просмотров

Printing in C#/.NET, scaling on a whole page

I am wondering how to do the following ( couldn't get google to help me here ): I got a .jpg file of about 250px*250px in scale.. I want this image on a DIN-A4 page as often as possible I need an "overlay" for every image on the page with a unique code ( lets say a unique barcode for example ) ...

7
голосов
4ответов
4038 просмотров

How would one implement bash-like tab completion?

I'm trying to determine how the system prints characters to standard input -- that is, how it prints characters which the user can delete and which are considered input if the user hits "Enter." I happen to be using C, but I would be very surprised if the solution were language-dependent. Thank...

21
голосов
22ответов
46590 просмотров

How to print a list more nicely?

This is similar to How to print a list in Python “nicely”, but I would like to print the list even more nicely -- without the brackets and apostrophes and commas, and even better in columns. foolist = ['exiv2-devel', 'mingw-libs', 'tcltk-demos', 'fcgi', 'netcdf', 'pdcurses-devel', 'msvc...

2
голосов
1ответов
796 просмотров

Generic printing using a USB port

I am developing on a device that has no printer support natively. I need to print to any printer using a USB port. Is this feasible? Is there any generic standard for all printers to print via USB? The device runs on Linux/PowerPC.

1
голосов
4ответов
165 просмотров

Can an email be printed as soon as it enters the Inbox?

We are working on an online food ordering application. When the user orders something from any restaurant, an email is sent to the restaurant's email address mentioning the order details. However, our client wants that an order print out should be generated automatically as soon as a new order is...

0
голосов
2ответов
1295 просмотров

printing a document programmatically

If I have adobe reader installed, is it possible to programmatically print the document to a specific printer without having adobe reader or the printer dialog display (no user intervention)? Any code snippets or sugestions are helpful. I can use any version of the .net framework to accomplish t...

1
голосов
5ответов
4110 просмотров

How to create a link that triggers printing of a file?

I have some small images and each has a "print larger image" link. For example: <img src="thumb.jpg"> <a href="#">Print Larger Image</a> When the user clicks the "print larger image" link, my goal is to trigger the printing of "big.jpg". How can this be done? EDIT: ANTHONY...

0
голосов
2ответов
283 просмотров

Server generated printing printing to printer closest to user

We have a SAAS application where reporting and other print jobs are generated on our application servers and then sent to CUPS print queues. The queue prints to printers at the client sites via IP printing; so far everything works fine. However, we have a new requirement with a new customer. ...

3
голосов
2ответов
4659 просмотров

C# Printing form - image blurry

I'd like to print my form but printed image is very blurry. Actually it is so blurred that I can't read it. First, I capture my form: [System.Runtime.InteropServices.DllImport("gdi32.dll")] private static extern long BitBlt(IntPtr hdcDest, int nXDest, int nYDest, int nWidth, int nHeight,...

0
голосов
1ответов
5018 просмотров

Retrieving Client's Printer Collection in asp.net

I am working on web application .net 3.5,asp.net,C#. In that i need to provide list of available printer at client side. I have knowledge of how to get server side printers using [1] System.Drawing.Printing.PrinterSettings.InstalledPrinters [2] System.Management.ManagementObjectSearcher [usi...

1
голосов
2ответов
2759 просмотров

Printing from C#

I need to print to different positions on an A4 paper from C#. What are my options for this?

0
голосов
2ответов
3720 просмотров

How to print a C# Windows form as a word doc would be printed?

How to print a Windows form as a word doc would be printed? I do have a windows form, the content of which, including labels and textbox values, i want to print. I did have the thought of using reports, but it would be very hard to create it, so i'm asking for a simple way of doing it (the print...

0
голосов
2ответов
1420 просмотров

PCL and 1200 DPI

Is it possible to send the PCL Set resolution command with 1200 dpi (and higher) as parameter? I've been looking at the spec sheets for HP PCL and it tells me that the only valid values for it are 75, 100, 150, 200, 300, 600. I am trying to print to a non-HP machine claiming to support HP PCL5...

6
голосов
4ответов
22741 просмотров

How to remove a black background from PDF text before printing

I have a PDF with a black background and white/yellow text. How can I remove the black background before printing and invert the color of the text?

2
голосов
2ответов
2936 просмотров

Print simple numbers on label printer (Brother, Dymo, etc) from C# (.NET)

As part of a project I'm working on, I need to automate a label printer. It will be one of those inexpensive USB printers from Brother or Dymo (open to other suggestions). All it needs to do is print two numbers on one label. The challenge is that I'm hoping to keep it ultra-simple in C#. It see...

0
голосов
2ответов
195 просмотров

How to force a link/image on a webpage to open in a separate program?

I'm using a CMS to create an ID-badge system. It takes the user's picture and creates a whole fancy image (PNG, if it makes any difference) around it, sized to print out on this nifty badge printer I have sitting next to me. Right now I save the image to my computer, then open it in an image ...

0
голосов
2ответов
2613 просмотров

print a jpg

I've been trying to print a dynamically loaded jpg and for some reason it's never printing to scale, not sure what I'm doing wrong so here's what I've done so far var request:URLRequest = new URLRequest(getAbsPath("pages/" + pagePrint + "_big.jpg")); var loader:Loader = new Loader(); loader.load...

0
голосов
4ответов
153 просмотров

Firefox CSS Against me??

I am a Programmer and not a Designer. My boss asked me to modify the print.css I modified the print.css 10 Hours, nothing nothing and nothing happened. If with IE everything looks good, in FF it looks horrible. If with FF everything looks good, in IE it looks horrible. What did i wrong? Pls hav...

5
голосов
1ответов
8121 просмотров

How to recover the INF file from an installed XP printer driver?

I am trying to build a utility to export an installed printer driver from a Windows machine. All is well and good on Vista and higher, because the InfPath entry in the driver's registry key points at the INF file. However, on previous versions of Windows, this doesn't exist. Sometimes I can find...

-1
голосов
2ответов
185 просмотров

How to print thousands of personalized documents over the web

I need to generate thousands of personalized letters from more than 800 workstations in diverse locations. While we had only a dozen of customers per location, we used Crystal Reports over the web and its PDF/Word export function to produce multi-page document for print. With thousand of custom...

1
голосов
1ответов
209 просмотров

How do I correctly space multiple string fragments within a single bounding rectangle when priting with c#?

I am writing a function that applies special formatting to predetermined keywords when printing a string. For example, in the string - "Why won't this work?" I might need to print the word "Why" underlined and in blue. I've had to implement this in pieces, printing each segment of a string with...

8
голосов
4ответов
17441 просмотров

print a txt to the default printer with c#

Is there a way to send a .txt to a printer using c#? something like string doc = "c:\temp.txt"; sendToPrinter(doc);

0
голосов
2ответов
8311 просмотров

Dynamics AX 2009 How to change customer invoice layout/printing?

I'd like to change the default customer invoice print to something else. Add an image to the head, change the layout, change the columns, well everything in fact. Can someone explain how to start this, or maybe point me to some tutorial or reference about this? So far all I found was ways to cr...

3
голосов
5ответов
11380 просмотров

How to "print" to a paper in PHP?

What I mean is, lets say I have a content: "Stackoverflow is the best, bla bla bla..." I want to print the content in a paper, not computer monitor, how to do that? I saw a lot of CMS using php, have a print icon, and able to print it? (Well, I am not creating a CMS, just wondering how the pri...

1
голосов
2ответов
3949 просмотров

Windows print spooler limitations?

Is there a limit on how many print jobs can be queued up in the Windows Print Spooler?

1
голосов
6ответов
4079 просмотров

Print all combinations from 0000 to 9999 in C#

just wondering if anyone had an algorithm lying around that printed all possible combos from 0000 to 9999 (trying to crack code into old phone and new to learning C#)...Million thanks. Bela

1
голосов
1ответов
497 просмотров

C# 2008 Printing to Preexisting Page Template

I'm doing some work for a Laboratory, helping with an application that prints all the tests results. The results are printed on a "pre-printed" form, this is a custom form they had made, I believe they already have several boxes of this form. I need to figure out how to print on top of it and...