By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
445,813 Members | 1,236 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 445,813 IT Pros & Developers. It's quick & easy.

PrintDocument to Acrobat PDFWriter print driver

P: n/a
I have a vb.net win form where I want to output some text to a printer.
Everything works fine when printing to my laser or inkjet printers. However
when I print to the Acrobat PDFWriter printer driver, I get correct
formatting but the text is gibberish.

I am using ev.Graphics.DrawString(line, printFont, Brushes.Black,
leftMargin, yPos, New StringFormat) , where line is the text that I wish to
print on each line, to print the text.

The DrawLine method, however produces true results for drawing lines. Also
printing a picture from inside the program using graphics.DrawImage prints
correctly using the Acrobat print driver.

Is there some setup of the printdocument that should be done if printing to
the Acrobat print driver? Has anyone successfully printed a printdocument
containing text to the Acrobat PDFWriter?
Nov 21 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a

"William LaMartin" <la******@tampabay.rr.com> schrieb im Newsbeitrag
news:u9**************@TK2MSFTNGP14.phx.gbl...
I have a vb.net win form where I want to output some text to a printer.
Everything works fine when printing to my laser or inkjet printers. However when I print to the Acrobat PDFWriter printer driver, I get correct
formatting but the text is gibberish.

I am using ev.Graphics.DrawString(line, printFont, Brushes.Black,
leftMargin, yPos, New StringFormat) , where line is the text that I wish to print on each line, to print the text.

The DrawLine method, however produces true results for drawing lines. Also printing a picture from inside the program using graphics.DrawImage prints
correctly using the Acrobat print driver.

Is there some setup of the printdocument that should be done if printing to the Acrobat print driver? Has anyone successfully printed a printdocument
containing text to the Acrobat PDFWriter?

Hi William,

i use Crystal Report and export each document to pdf or PDFCreator as
printer device.
PDFCreator is freeware!!!

Sorry.

Greeting

Thomas
Nov 21 '05 #2

P: n/a
The idea here is not to use Crystal Reports. That way I can supply the
application's executable file only and not have to provide an installation
package as would be the case if I used CR.

Printing to the Acrobat PDFWriter driver was an afterthought (most people
don't even have it on their computers since they have only the Acrobat
Reader). However, after getting nice results with my printing routine when
printing to various printers in house, I decided to try printing to the
Acrobat PDFWriter driver and then noticed the garbled text. So I was just
curious why this driver produces different results from other printers.

Certainly someone else has tried to print a print document in VB.Net to the
Acrobat PDFWriter driver and noticed the result--and may have a solution.
"Thomas Wenning" <no*************************@gmx.de> wrote in message
news:Og****************@TK2MSFTNGP10.phx.gbl...

"William LaMartin" <la******@tampabay.rr.com> schrieb im Newsbeitrag
news:u9**************@TK2MSFTNGP14.phx.gbl...
I have a vb.net win form where I want to output some text to a printer.
Everything works fine when printing to my laser or inkjet printers.

However
when I print to the Acrobat PDFWriter printer driver, I get correct
formatting but the text is gibberish.

I am using ev.Graphics.DrawString(line, printFont, Brushes.Black,
leftMargin, yPos, New StringFormat) , where line is the text that I wish

to
print on each line, to print the text.

The DrawLine method, however produces true results for drawing lines.

Also
printing a picture from inside the program using graphics.DrawImage
prints
correctly using the Acrobat print driver.

Is there some setup of the printdocument that should be done if printing

to
the Acrobat print driver? Has anyone successfully printed a printdocument
containing text to the Acrobat PDFWriter?

Hi William,

i use Crystal Report and export each document to pdf or PDFCreator as
printer device.
PDFCreator is freeware!!!

Sorry.

Greeting

Thomas

Nov 21 '05 #3

P: n/a
The problem was solved by purchasing Acrobat 7.0 Professional.

"William LaMartin" <la******@tampabay.rr.com> wrote in message
news:u9**************@TK2MSFTNGP14.phx.gbl...
I have a vb.net win form where I want to output some text to a printer.
Everything works fine when printing to my laser or inkjet printers.
However when I print to the Acrobat PDFWriter printer driver, I get correct
formatting but the text is gibberish.

I am using ev.Graphics.DrawString(line, printFont, Brushes.Black,
leftMargin, yPos, New StringFormat) , where line is the text that I wish
to print on each line, to print the text.

The DrawLine method, however produces true results for drawing lines.
Also printing a picture from inside the program using graphics.DrawImage
prints correctly using the Acrobat print driver.

Is there some setup of the printdocument that should be done if printing
to the Acrobat print driver? Has anyone successfully printed a
printdocument containing text to the Acrobat PDFWriter?

Nov 21 '05 #4

P: n/a
Try

Reference the AcroPDFLib

AxAcroPDF1.LoadFile(Application.StartupPath() & "\Output.pdf")
AxAcroPDF1.printAll()

"William LaMartin" wrote:
I have a vb.net win form where I want to output some text to a printer.
Everything works fine when printing to my laser or inkjet printers. However
when I print to the Acrobat PDFWriter printer driver, I get correct
formatting but the text is gibberish.

I am using ev.Graphics.DrawString(line, printFont, Brushes.Black,
leftMargin, yPos, New StringFormat) , where line is the text that I wish to
print on each line, to print the text.

The DrawLine method, however produces true results for drawing lines. Also
printing a picture from inside the program using graphics.DrawImage prints
correctly using the Acrobat print driver.

Is there some setup of the printdocument that should be done if printing to
the Acrobat print driver? Has anyone successfully printed a printdocument
containing text to the Acrobat PDFWriter?

Nov 21 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.