473,785 Members | 3,349 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Printing a pdf stream?

I am retrieving a pdf file from a database blob field. I want to be
able to print it out on a printer now. There doesn't seem to be a way
to do this. I've seen the RawPrinterHelpe r class on MSDN but it
doesn't work with pdf's since they are in postscript and not RAW
format. Also the pdf.ocx print method requires you to load a pdf from
disk, which I'm not doing here. I've also tried the ShellExecute
method but once again it requires the pdf to be loaded from the disk.
I've looked at a ton of third party controls but none of them handle
printing in this way, they all require you to load from the disk first
or they only spit out pdfs for you and its up to you to handle
printing them.

Thanks

Craig

p.s. my email shown is not correct, please don't reply to it.
Nov 15 '05 #1
3 6570
can you save the pdf to disk first?
"craigg75" <cr****@gasulli van.com> wrote in message
news:45******** *************** ***@posting.goo gle.com...
I am retrieving a pdf file from a database blob field. I want to be
able to print it out on a printer now. There doesn't seem to be a way
to do this. I've seen the RawPrinterHelpe r class on MSDN but it
doesn't work with pdf's since they are in postscript and not RAW
format. Also the pdf.ocx print method requires you to load a pdf from
disk, which I'm not doing here. I've also tried the ShellExecute
method but once again it requires the pdf to be loaded from the disk.
I've looked at a ton of third party controls but none of them handle
printing in this way, they all require you to load from the disk first
or they only spit out pdfs for you and its up to you to handle
printing them.

Thanks

Craig

p.s. my email shown is not correct, please don't reply to it.

Nov 15 '05 #2
Yes I can. That's my solution for now. Save to disk then read from
disk to print. Kind of a kludge. Was hoping for a cleaner way of doing
it with in memory streams. Thanks for the reply.

"Leo Lin" <le*****@hotmai l.com> wrote in message news:<ev******* *******@TK2MSFT NGP12.phx.gbl>. ..
can you save the pdf to disk first?
"craigg75" <cr****@gasulli van.com> wrote in message
news:45******** *************** ***@posting.goo gle.com...
I am retrieving a pdf file from a database blob field. I want to be
able to print it out on a printer now. There doesn't seem to be a way
to do this. I've seen the RawPrinterHelpe r class on MSDN but it
doesn't work with pdf's since they are in postscript and not RAW
format. Also the pdf.ocx print method requires you to load a pdf from
disk, which I'm not doing here. I've also tried the ShellExecute
method but once again it requires the pdf to be loaded from the disk.
I've looked at a ton of third party controls but none of them handle
printing in this way, they all require you to load from the disk first
or they only spit out pdfs for you and its up to you to handle
printing them.

Thanks

Craig

p.s. my email shown is not correct, please don't reply to it.

Nov 15 '05 #3
hi

From http://www.developmentnow.com/g/36_2...pdf-stream.htm

Posted via DevelopmentNow. com Groups
http://www.developmentnow.com
Nov 17 '05 #4

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

Similar topics

14
7905
by: Steven T. Hatton | last post by:
I'm trying to write a program like hexel. I guess I could fish out the source for hexel and look at that, but for now I'm trying to figure out how I can do with with std::stringstream and std::string. I had something working with std::string. I simply treated it as an STL container, and iterated over its elements. The results were a bit confusing to me. Some of the stuff was printing out as 1 or 2 characters hex numbers, as I...
0
925
by: notregister | last post by:
Ji, i tried to use tcpclient to send a series of PCL command to a printer, but after going thru this, it print out a series of junk...the same series work well with another code i written for parallel...pls advise?? Public Function PrintChunkTCPIP(ByVal Chunk As String) As Long Dim x As Integer Dim client As New System.Net.Sockets.TcpClient("169.254.192.155", 9100)
2
3702
by: Beginner | last post by:
I have to print a Fedex shipping label on a Zebra(thermal) printer. I initially had the label information in a base64 string which I decoded into a memory stream. Now I need to send this memory stream to a thermal/label printer. How do I do this? Thanks for any help.
6
4088
by: Siv | last post by:
Hi, I am getting into printing with VB.NET 2005 and want to implement the usual capability that a user can select a selection of pages. I have a report that is generated by my application that if the user wants all pages will produce 3 pages. I want to offer the user the ability to select via the print dialog that only pages 1 and 2 of it are printed or possibly pages 1 and 3 but not 2. At the moment I can produce all three pages...
0
1503
by: Davy | last post by:
Hi, i'm writing a .Net application for printing barcodes to my climbing club. For simplicity reasons, i've embedded my barcode font as a ressource file. When loading my font as a private font i am able to use it in labels, textboxes, etc... but not in printing controls, like printpreviewdialog Could you please help me ?
8
41890
by: Microsoft News | last post by:
Greetings community at large. I have a c# app that generates a PDF file. I have a printer that prints PDF natively. But I cannot figure out how to programatically print in C# ... I can generate the PDF as a file or a stream .. but cannot figure out how to send either to the printer. the only events I can use seem to be e.Graphics.DrawImage( ) or
0
1242
by: Iain Wilson | last post by:
I am pulling my hair out trying to print various objects from a .net web page My apologies for cross posting but I need an answer and my previous post has attracted no interest. ASP.Net 2.0 using C# This is a simple web page on our intranet (written as a test) and all I am trying to do is print a document to a named printer. If I use a StreamReader then I get an output to the printer. This
7
2571
by: Iain Wilson | last post by:
I am pulling my hair out trying to print various objects from a .net web page My apologies for cross posting but I need an answer and my previous post has attracted no interest. ASP.Net 2.0 using C# This is a simple web page on our intranet (written as a test) and all I am trying to do is print a document to a named printer. If I use a StreamReader then I get an output to the printer. This
7
1922
by: SpaceMarine | last post by:
hello, i have an application that builds up a large "incident report" for a law enforcement agency. In the end this is represented in a large object containing many properties and collections related to the incident. we now need a way to produce a PDF for printing. what are common ways to do this?
1
13773
by: Glenn | last post by:
I am writing a program for field work that will use a receipt printer. I need to be able to adjust the page settings prior to printing depending on how much needs to be printed. I have been able to print to this printer but cannot figure out how to overwrite the page settings. Below is the code so far: Private Sub m_PrintDocument_PrintPage(ByVal sender As Object, ByVal e As System.Drawing.Printing.PrintPageEventArgs) Handles...
0
9643
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10319
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10147
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10087
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9947
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8971
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5511
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4046
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3645
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.