From: Rich P on
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 ***
From: Alan on
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...(a)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***

From: Rich P on
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 ***
From: Alan on
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...(a)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***

From: Patrice on
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/library/system.diagnostics.process.startinfo.aspx).

--
Patrice