printing

Printing objects and unicode, what's under the hood ? What are the good guidelines?

Hi, I'm struggling with print and unicode conversion. Here is some code executed in the 2.5 windows interpreter. >>> import sys >>> print sys.stdout.encoding cp850 >>> print u"é" é >>> print u"é".encode("cp850") é >>> print u"é".encode("utf8") ├® >>> print u"é".__repr__() u'\xe9' >>> class A(): ... def __unicode__(self): ... r...

How to apply __str__ function when printing a list of objects in python

Well this interactive python console snippet will tell everything: >>> class Test: ... def __str__(self): ... return 'asd' ... >>> t = Test() >>> print t asd >>> l = [Test(), Test(), Test()] >>> print l [__main__.Test instance at 0x00CBC1E8, __main__.Test instance at 0x00CBC260, __main__.Test instance at 0x00CBC238] ...

vbscript: how to print multiple files with printer selection dialog once

I have to write vbscript that prints all files in a folder. Printer dialog should popup at the very beginning to allow user to select printer to use. Than all files should be send to printer silently How can I do that? Thank you in advance! ...

Algorithms for: printer checker

I want to make a program for checking the printed paper for errors. PDF File: please refer to the second page, top right picture As you see, that system could identify the errors made by printer. I want to know how was it achieved. What are existing documents about this? Or any ideas you have? Thank you ...

Autoprint PDF script on php or javascript

Hello I want to build page that will autoprint pdf document. For examle I can call mypage.html?doc=my.pdf and it will print my.pdf file. How I can do it using javascript or php? best Vladimir ...

Print Visuals with custom paginator

I'm trying to implement my custom paginator to print listbox contents. I use a custom item template which can have different heights. I'm able to add the items on the pages but sometimes the item has to be splitted into two parts. Does anyone know a good splitting algorithm to avoid that text inside this item is splitted horizontally? ...

dynamic paper form generation

currently, i've got an application that needs to fill out a printable form with data. clients send me a form and i create a digital version of it. there are tons of these forms and i often need to customize them and add additional fields, etc for my clients, so they should be really simple to create and modify. i've got a system in p...

Is there any dummy PostScript printer for Windows 7? How can I create an EPS?

Was reading this but then realized this tutorial is pretty old, as Adobe hasn't updated the driver in a long time so it's broken now. ...

PHP why is echo faster than print

In PHP, why is echo faster than print They do the same thing... Why is one faster than the other? Do they do exactly the same thing??? ...

Your most general C macro for printing variable values in different types

Please share with us your favorite, and most general, PRINT or DEBUG macro applicable to all (or almost all) variables in different types and to arrays in C. The macro can have any number of parameters (though 1-3 are preferred); if it increases descriptive power at all, C99 features can be assumed. #define PRINT(var, ...) \ ... L...

Website printing and flash

I have a client who has a flash gallery on most of her pages. When the page loads the gallery starts fading in images in a loop. Now, when someone decides to print the page, browsers other than IE7/8 will print the blank space before fade in instead of the first image, IE7/8 will print the current state of flash regardless. I have trie...

WPF printing complex table

I need to print the complex formatted table in WPF. This is the format I need to print. Is this possible, what function I have to use? http://img833.imageshack.us/img833/6312/tableb.png ...

Java "Printer is not accepting jobs" old Brother printers

Hello, I have client which has a problem with printing from JAVA applications, using old Brother printers. The exception he gets is "Printer is not accepting jobs". Other applications (not java applications) manage to print using these printers. He switched to a new printer (also Brother), without changing the driver and then it worke...

how to print a section of file between two regular expressions only if a line within the section contains a certain string within it

Hi I have a file of events that has multiple multi lined events between <event> and </event> tags. I want to print out the entire event From <event> to </event> only if a line within that event contains either the string uniqueId="1279939300.862594_PFM_1_1912320699" or uniqueId="1281686522.353435_PFM_1_988171542". The file has 100000 eve...

Printing a stackpanel

I have a WPF with content in it, and would like to print it. Using PrintDialog pd = new PrintDialog(); if (pd.ShowDialog() == true) pd.PrintVisual(textStack, "Chinese Pinyin Text"); to print however, means that if I resize my window, some stuff will get cut off. How can I print it and ensure a standard 8.5x11 piece of paper with a...

Print page shows unchanged checkbox in IE with DocType

Hi Guys, Strange problem. I have a simple webform where users can fill in text and check/uncheck some checkboxes. When this is printed to pdf or paper (or print preview) in IE (7 or 8) the checkboxes are printed unchanged. E.g. user sets a check, this is printed unchecked ... or with a pre-checked box with the user unchecked, is printed...

Why does printer changes resolution? User, background, what?

Hi, I am runing a .bat file from a php using exec on a Windwos php server, where php is run using fast-cgi (and nginx). The command line to run this script is pclose(popen("start / ". $cmd, "r")); Where $cmd is somethign like "mybatfile.bat 45 1" When I run the batch file manually it runs a python program to read a database, ...

WPF: Printing FlowDocument without Print Dialog

I am writing a note-taking application in WPF, using a FlowDocument for each individual note. The app searches and filters notes by tags. I want to print all notes in the current filtered list as separate documents, and I only want to show a single Print Dialog at the beginning of the job. I found a good print example in this thread, bu...

Iterative printing over parallel lists to print columns in Python

I have vsort and vsorta, both lists with equal numbers of items that should be right next to each other (about 250 elements per list). I want to print them as parallel columns, like so: >>> for x,y in vsort,vsorta: ... print x, y ... Traceback (most recent call last): File "<stdin>", line 1, in <module> ValueError: too many value...

How to make python 3 print() utf8

How to make python 3 (3.1) to print("Some text") to stdout in utf8 ... or how to output raw bytes.. Test.py TestText = "Test - āĀēĒčČ..šŠūŪžŽ" # this is UTF-8 TestText2 = b"Test2 - \xc4\x81\xc4\x80\xc4\x93\xc4\x92\xc4\x8d\xc4\x8c..\xc5\xa1\xc5\xa0\xc5\xab\xc5\xaa\xc5\xbe\xc5\xbd" # just bytes print(sys.getdefaultencoding()) prin...