473,403 Members | 2,338 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,403 software developers and data experts.

Printing to a file

Hi

How can I redirect a print job to a file? There is a
checkbox in the print dialog, but I would like to do it
in code indicating a filename.

Thanks
Bruno Hardmeier
Nov 20 '05 #1
6 1883
You can use a fprintf typing in the file buffer and the
filename.
-----Original Message-----
Hi

How can I redirect a print job to a file? There is a
checkbox in the print dialog, but I would like to do it
in code indicating a filename.

Thanks
Bruno Hardmeier
.

Nov 20 '05 #2

How can I do that in VB?
-----Original Message-----
You can use a fprintf typing in the file buffer and the
filename.
-----Original Message-----
Hi

How can I redirect a print job to a file? There is a
checkbox in the print dialog, but I would like to do it
in code indicating a filename.

Thanks
Bruno Hardmeier
.

.

Nov 20 '05 #3
* "Perilmind" <an*******@discussions.microsoft.com> scripsit:
You can use a fprintf typing in the file buffer and the
filename.


That's a function of the C runtime...

;-)

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
<http://www.mvps.org/dotnet>

<http://www.plig.net/nnq/nquote.html>
Nov 20 '05 #4
My question is still open:
How can I redirect a print job to a file? There is a
checkbox in the print dialog, but I would like to do it
in code indicating a filename.
Thanks
Bruno Hardmeier
-----Original Message-----
* "Perilmind" <an*******@discussions.microsoft.com>

scripsit:
You can use a fprintf typing in the file buffer and the filename.


That's a function of the C runtime...

;-)

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
<http://www.mvps.org/dotnet>

<http://www.plig.net/nnq/nquote.html>
.

Nov 20 '05 #5
* <an*******@discussions.microsoft.com> scripsit:
My question is still open:
How can I redirect a print job to a file? There is a
checkbox in the print dialog, but I would like to do it
in code indicating a filename.


Sorry, I don't know how to do that...

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
<http://www.mvps.org/dotnet>

<http://www.plig.net/nnq/nquote.html>
Nov 20 '05 #6
PrinterSettings.PrintToFile

This property is used by the PrintDialog when the user selects the Print
to file option. In such a case, the output port is set to "FILE",
causing the Windows printing subsystem to prompt the user for a file
name when the PrintDocument.Print method is called.

Note: The PrinterSettings.PrintToFile property can only be set by the
System.Windows.Forms.Printing.PrintDialog class. The Print to file
option only appears on the System.Windows.Forms.Printing.PrintDialog
when the System.Windows.Forms.Printing.PrintDialog.AllowPri ntToFile
property is set to true. For more information, see the KB article
"'PrintDocument Class' Does Not Implement The PrintToFile Feature
(820644)" on Microsoft TechNet, at http://www.microsoft.com/technet .

ms-help://MS.VSCC.2003/MS.MSDNQTR.2003OCT.1033/cpref/html/frlrfsystemdrawingprintingprintersettingsclassprin ttofiletopic.htm

ms-help://MS.VSCC.2003/MS.MSDNQTR.2003OCT.1033/cpref/html/frlrfsystemdrawingprintingprintersettingsmembersto pic.htm
an*******@discussions.microsoft.com wrote:
My question is still open:
How can I redirect a print job to a file? There is a
checkbox in the print dialog, but I would like to do it
in code indicating a filename.
Thanks
Bruno Hardmeier

-----Original Message-----
* "Perilmind" <an*******@discussions.microsoft.com>


scripsit:
You can use a fprintf typing in the file buffer and
the
filename.


That's a function of the C runtime...

;-)

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
<http://www.mvps.org/dotnet>

<http://www.plig.net/nnq/nquote.html>
.



Nov 20 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Jody Gelowitz | last post by:
I am having a problem with printing selected pages. Actually, the problem isn't with printing selected pages as it is more to do with having blank pages print for those pages that have not been...
9
by: Jody Gelowitz | last post by:
I am trying to find the definition of "Safe Printing" and cannot find out exactly what this entitles. The reason is that I am trying to print contents from a single textbox to no avail using the...
0
by: DotNetDummy | last post by:
Hi all, I am trying to set the printing setting e.g duplex mode etc. on a default printer when I.E object started printing a particular html doc. Here's the partial code, any help would be...
5
by: Patrick De Ridder | last post by:
How can I turn what I want to print 90 degrees using the logic below? Please tell me the code with which to make the modification. Many thanks, Patrick. using System.ComponentModel; using...
4
by: Rob T | last post by:
I have a small VB program that has a printing module...very simple....and works great. However, If I try to print to a generic printer, I get the following error: "The data area passed to a...
1
by: hamil | last post by:
I am trying to print a graphic file (tif) and also use the PrintPreview control, the PageSetup control, and the Print dialog control. The code attached is a concatination of two examples taken out...
8
by: Neo Geshel | last post by:
Greetings. BACKGROUND: My sites are pure XHTML 1.1 with CSS 2.1 for markup. My pages are delivered as application/xhtml+xml for all non-MS web clients, and as text/xml for all MS web...
2
by: coldblood22 | last post by:
Well in my Application i am using the java Printable interface to print the GUI. The printing is done fine but once done with the printing my program breaks off with the database file without. Well...
18
by: Brett | last post by:
I have an ASP.NET page that displays work orders in a GridView. In that GridView is a checkbox column. When the user clicks a "Print" button, I create a report, using the .NET Framework printing...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.