PC Review


Reply
Thread Tools Rate Thread

Can anyone recommend a print contol library please?

 
 
Alan
Guest
Posts: n/a
 
      24th Mar 2010
Hello,

Can anyone recommend print control libraries for VB .Net please? I'm
writing an app to print the attachments of mail messages and it's
difficult to handle PDF, Office and any possible graphic file format
via the standard printprocess. Ideally, I'd just like to save the
attachments to disk and and then pass the filenames to a control,
which would popup the standard print dialog or just print.

Thanks,

- Alan.
 
Reply With Quote
 
 
 
 
Rich P
Guest
Posts: n/a
 
      24th Mar 2010
If I am reading your question correctly, you are trying to print the
contents of an email attachment from your .net app -- bypassing having
to open the attachment. If you are reading the contents from your code
you can then place these contents into a .Net report control (rdlc file)
and then use emf to print that out.

Here's a link where you can print using EMF with a .rdlc file:

http://msdn.microsoft.com/en-us/libr...g.winforms.cre
atestreamcallback(VS.80).aspx

Rich

*** Sent via Developersdex http://www.developersdex.com ***
 
Reply With Quote
 
Alan
Guest
Posts: n/a
 
      24th Mar 2010
Thanks Rich.

Yes, I'm saving the attachments to a temp directory, then printing
them out. Problem is that the different potential types need to be
handled differently, e.g, PDF vs Word.

First time I've heard of EMF so I'll check it out...

On Mar 24, 8:12*pm, Rich P <rpng...@aol.com> wrote:
> If I am reading your question correctly, you are trying to print the
> contents of an email attachment from your .net app -- bypassing having
> to open the attachment. *If you are reading the contents from your code
> you can then place these contents into a .Net report control (rdlc file)
> and then use emf to print that out.
>
> Here's a link where you can print using EMF with a .rdlc file:
>
> http://msdn.microsoft.com/en-us/libr...g.winforms.cre
> atestreamcallback(VS.80).aspx
>
> Rich
>
> *** Sent via Developersdexhttp://www.developersdex.com***


 
Reply With Quote
 
Cor Ligthert[MVP]
Guest
Posts: n/a
 
      25th Mar 2010
Alan,

You can use Crystal Reports or a 3th party tool.

For your problem I would probably take the Visual Basic powerpack and follow
the Print part of that.
(If it is not PDF otherwise I would probably simple create an application
start with the PDF in it, and then it)

Cor

"Alan" <(E-Mail Removed)> wrote in message
news:f8b25ed4-681e-43da-8081-(E-Mail Removed)...
> Thanks Rich.
>
> Yes, I'm saving the attachments to a temp directory, then printing
> them out. Problem is that the different potential types need to be
> handled differently, e.g, PDF vs Word.
>
> First time I've heard of EMF so I'll check it out...
>
> On Mar 24, 8:12 pm, Rich P <rpng...@aol.com> wrote:
>> If I am reading your question correctly, you are trying to print the
>> contents of an email attachment from your .net app -- bypassing having
>> to open the attachment. If you are reading the contents from your code
>> you can then place these contents into a .Net report control (rdlc file)
>> and then use emf to print that out.
>>
>> Here's a link where you can print using EMF with a .rdlc file:
>>
>> http://msdn.microsoft.com/en-us/libr...g.winforms.cre
>> atestreamcallback(VS.80).aspx
>>
>> Rich
>>
>> *** Sent via Developersdexhttp://www.developersdex.com***

>

 
Reply With Quote
 
Alan
Guest
Posts: n/a
 
      25th Mar 2010
Thanks Cor.

Just to be clear, I don't want to display the files or make any
reports. All I want to do is basically pass the filename and get it
printed out, regardless of whether it's a TIF, DOC or XLS file.

PrintForms will handkle that?

If not, can you name any 3rd party components pls? Thanks.


On Mar 25, 8:57*am, "Cor Ligthert[MVP]" <Notmyfirstn...@planet.nl>
wrote:
> Alan,
>
> You can use Crystal Reports or a 3th party tool.
>
> For your problem I would probably take the Visual Basic powerpack and follow
> the Print part of that.
> (If it is not PDF otherwise I would probably simple create an application
> start with the PDF in it, and then it)
>
> Cor
>
> "Alan" <bru...@gmail.com> wrote in message
>
> news:f8b25ed4-681e-43da-8081-(E-Mail Removed)...
>
> > Thanks Rich.

>
> > Yes, I'm saving the attachments to a temp directory, then printing
> > them out. Problem is that the different potential types need to be
> > handled differently, e.g, PDF vs Word.

>
> > First time I've heard of EMF so I'll check it out...

>
> > On Mar 24, 8:12 pm, Rich P <rpng...@aol.com> wrote:
> >> If I am reading your question correctly, you are trying to print the
> >> contents of an email attachment from your .net app -- bypassing having
> >> to open the attachment. *If you are reading the contents from your code
> >> you can then place these contents into a .Net report control (rdlc file)
> >> and then use emf to print that out.

>
> >> Here's a link where you can print using EMF with a .rdlc file:

>
> >>http://msdn.microsoft.com/en-us/libr...g.winforms.cre
> >> atestreamcallback(VS.80).aspx

>
> >> Rich

>
> >> *** Sent via Developersdexhttp://www.developersdex.com***


 
Reply With Quote
 
Rich P
Guest
Posts: n/a
 
      25th Mar 2010
Quick Note on the EMF printing idea: you set up an rdlc file (drag a
report control onto a form and it will automatically create an rdlc
file). In the rdlc you add the controls that you want to print content
from - like an image control for a picture, or a textbox for text, etc.
With the emf technique -- you don't display the report control or
contents ... it just prints out the contents to the printer. Go to the
link above and check it out.

Rich

*** Sent via Developersdex http://www.developersdex.com ***
 
Reply With Quote
 
Alan
Guest
Posts: n/a
 
      26th Mar 2010
Thanks Rich.

I checked the link but how does it know if it's a text file or a Word
doc or an image or PDF? Do I have to explicitly use a SELECT .. CASE
with every possible file extension?

Sorry for the trouble. This is really something difficult to me.

On Mar 26, 12:32*am, Rich P <rpng...@aol.com> wrote:
> Quick Note on the EMF printing idea: *you set up an rdlc file (drag a
> report control onto a form and it will automatically create an rdlc
> file). *In the rdlc you add the controls that you want to print content
> from - like an image control for a picture, or a textbox for text, etc.
> With the emf technique -- you don't display the report control or
> contents ... *it just prints out the contents to the printer. *Go to the
> link above and check it out.
>
> Rich
>
> *** Sent via Developersdexhttp://www.developersdex.com***


 
Reply With Quote
 
Rich P
Guest
Posts: n/a
 
      26th Mar 2010
Hi Alan,

Well, you will have to write a little bit of code here. When reading
your document, you would read text to some string var and then set the
text property of a textbox to the string var. If it is a pdf (I haven't
tried this yet) but I believe you can embed the pdf file into the rdlc
into a control and print that control. Basically, you would have to
detach the pdf and then pass the location to the rdlc and then print the
rdlc. I am not sure what control would take a pdf. It should be in the
link I posted above. The specific section of the link is just for
printing but the rest of the sections pertain the the report control.

So you would detach the pdf, pass the location to the rdlc, print the
pdf, and then delete the pdf from the location. That should be seamless
to the user.

If the PDF is just pure text, you could read the contents and then pass
that to the rdlc and print that -- just to give you some ideas.

Rich

*** Sent via Developersdex http://www.developersdex.com ***
 
Reply With Quote
 
Alan
Guest
Posts: n/a
 
      20th Apr 2010
Finally tried using PrintForms in VSS2008. It was going well until I
discovered that a single form was too small for A4 paper.

Why oh why is printing so complicated in VB .Net?

On Mar 27, 12:53*am, Rich P <rpng...@aol.com> wrote:
> Hi Alan,
>
> Well, you will have to write a little bit of code here. *When reading
> your document, you would read text to some string var and then set the
> text property of a textbox to the string var. *If it is a pdf (I haven't
> tried this yet) but I believe you can embed the pdf file into the rdlc
> into a control and print that control. *Basically, you would have to
> detach the pdf and then pass the location to the rdlc and then print the
> rdlc. *I am not sure what control would take a pdf. *It should be in the
> link I posted above. *The specific section of the link is just for
> printing but the rest of the sections pertain the the report control.
>
> So you would detach the pdf, pass the location to the rdlc, print the
> pdf, and then delete the pdf from the location. *That should be seamless
> to the user.
>
> If the PDF is just pure text, you could read the contents and then pass
> that to the rdlc and print that -- just to give you some ideas.
>
> Rich
>
> *** Sent via Developersdexhttp://www.developersdex.com***


 
Reply With Quote
 
Patrice
Guest
Posts: n/a
 
      20th Apr 2010
Hi,

A know method is to use the "Print" "verb" :

"If the file name involves a nonexecutable file, such as a .doc file, you
can include a verb specifying what action to take on the file. For example,
you could set the Verb to "Print" for a file ending in the .doc extension.
The file name specified in the FileName property does not need to have an
extension if you manually enter a value for the Verb property. However, if
you use the Verbs property to determine what verbs are available, you must
include the extension."

(from
http://msdn.microsoft.com/en-us/libr...startinfo.aspx).

--
Patrice



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: Recommend a vista 64 compatible wireless print server! Cari \(MS-MVP\) Windows Vista Print / Fax / Scan 1 30th Mar 2010 01:19 PM
print - cannot load library lxbcprp.dll error 126 walleyeboy Microsoft Outlook Discussion 2 19th Feb 2009 06:37 PM
Can anyone recommend a third-party printing components library? Alan Microsoft VB .NET 1 26th Jan 2009 10:50 PM
Print Error - Could not load language library =?Utf-8?B?TWF0dA==?= Windows XP Print / Fax 4 6th Mar 2007 08:24 PM
How do I print my entire font library samples? dootbox1 Windows XP Print / Fax 3 17th Sep 2003 08:16 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:25 PM.