473,320 Members | 1,961 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,320 software developers and data experts.

Printing proprietary formats

Dan
We are running into trouble when trying to print
proprietary formats (ie; .pdf, .xls, .doc, etc.) from our
VB.NET application.

Binary files generate garbage when printed.

We have no trouble printing text files using .NET objects
such as System.Drawing.Printing.PrintDocument and would
like to do the same thing with binary files without having
to go through multiple APIs.

Does anyone have any suggestions or ideas about this?

Thanks in advance for any assistance.
Nov 20 '05 #1
2 1140
Text files are a known format. All the file formats you mentioned have application-specific information embedded with the actual data, so you can't just tell them to print like a text document and expect to get any kind of intelligible output

You either have to use the application's libraries to print with (like starting an instance of Word, loading your .doc file and printing it. This would require Word to be installed on the machine running the app), become familiar with the file format to the point where you can reliably pull the data you want out of it, or purchase or otherwise aquire third party software that allows you to print these formats

That sort of goes along with the concept of a proprietary file format. This is exactly the reason XML is so popular today. It gets rid of all these sorts of problems, at the expense of file size and speed, among other things.
Nov 20 '05 #2
* "Dan" <an*******@discussions.microsoft.com> scripsit:
We are running into trouble when trying to print
proprietary formats (ie; .pdf, .xls, .doc, etc.) from our
VB.NET application.

Binary files generate garbage when printed.

We have no trouble printing text files using .NET objects
such as System.Drawing.Printing.PrintDocument and would
like to do the same thing with binary files without having
to go through multiple APIs.


That's not possible.

You can start the associated application with the print verb:

\\\
Dim p As New System.Diagnostics.ProcessStartInfo()
p.Verb = "print"
p.WindowStyle = ProcessWindowStyle.Hidden
p.FileName = "C:\filename.htm"
p.UseShellExecute = True
System.Diagnostics.Process.Start(p)
///

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
Nov 20 '05 #3

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

Similar topics

6
by: Alec | last post by:
Hi, I am trying to print an HTML page from Internet Explorer and it always put the page title and page count at the top of the page. How can I disable printing page title and page count? Thanks.
1
by: Tony Williams | last post by:
I have a 4 Page report , the second page is in two column format. At the moment I have to print page 2 as a separate report and then collate it with the other pages. Is there any way to print a...
8
by: Christopher Kurtis Koeber | last post by:
Dear All, Recently I created a thread about trying to load a particular ICON image that GDI plus could not load. I realized that GDI plus definitely does not support it because it had a certain...
0
by: nikhilgargi | last post by:
Requirement: I need to provide printing capability in a C# desktop application that I am developing The documents that need to be printed can be in Rich Text Format (RTF) or HTML. Custom...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

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.