473,721 Members | 2,186 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

PrintDocument to Acrobat PDFWriter print driver

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.Dra wString(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.DrawIm age 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
4 5890

"William LaMartin" <la******@tampa bay.rr.com> schrieb im Newsbeitrag
news:u9******** ******@TK2MSFTN GP14.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.Dra wString(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.DrawIm age 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
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************ *************@g mx.de> wrote in message
news:Og******** ********@TK2MSF TNGP10.phx.gbl. ..

"William LaMartin" <la******@tampa bay.rr.com> schrieb im Newsbeitrag
news:u9******** ******@TK2MSFTN GP14.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.Dra wString(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.DrawIm age
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
The problem was solved by purchasing Acrobat 7.0 Professional.

"William LaMartin" <la******@tampa bay.rr.com> wrote in message
news:u9******** ******@TK2MSFTN GP14.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.Dra wString(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.DrawIm age
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
Try

Reference the AcroPDFLib

AxAcroPDF1.Load File(Applicatio n.StartupPath() & "\Output.pd f")
AxAcroPDF1.prin tAll()

"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.Dra wString(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.DrawIm age 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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1923
by: Andrew | last post by:
My VB Application opens an Access Report and has an option to generate the report in PDF once the report is closed. This is accomplished by: - Switching over to the Acrobat Printer ( i.e. PDFWriter ) from the default printer. - Setting a string type sub key ( PDFFilename ) in the registry HKEY_CURRENT_USER\Software\Adobe\Acrobat PDFWriter ) to store the PDF in a user selected directory with a filename that's determined by VB codes. -...
4
7336
by: Andrew | last post by:
My VB Application opens an Access Report and has an option to generate the report in PDF once the report is closed. This is accomplished by: - Switching over to the Acrobat Printer (i.e. PDFWriter) from the default printer. - Setting a string type sub key "PDFFilename" in the registry "HKEY_CURRENT_USER\Software\Adobe\Acrobat PDFWriter" to store the PDF in a user selected directory with a filename that's determined by VB codes.
1
6574
by: Nicole | last post by:
Like many before me, I am tearing my hair out trying to get Acrobat 6.0 to work with VBA. I am getting close, and the error I am getting now seems like it should be easy to surmount. So why am I stumped?! ;) This code is in the middle of a large module in an ADP that takes web data and ports it to an MS Word form that is dynamically generated based on the data. Near the end, the Word doc needs to print to PDF and save both the Word...
6
5267
by: jdph40 | last post by:
We recently had to upgrade the computers in our company. Now our office's website on our company intranet no longer recognizes reports saved in snapshot format. We get an error message that the file we are downloading "cannot be opened by the default program. It is either corrupted or it has an incorrect file type." We had no problem until our upgrade, but our IT department says there's no fix. My question is concerning Adobe Acrobat....
2
4363
by: BikeToWork | last post by:
I found code online which uses Windows API's to save Access reports to pdf format files. I'm using the full version of Adobe Acrobat Professional 7.0. The problem is that regardless of what I put in the code as a filename it automatically saves the report based on the report name instead of the string passed to the registry key. The code is as follows: '****************************************************************** 'Setting value...
3
6313
by: Mika M | last post by:
Hi all! I have made an application for printing simple barcode labels using PrintDocument object, and it's working fine. Barcode printer that I use is attached to the computer, and this computer has drivers installed for this printer, and this printer is shared for the network. Question 1:
2
6621
by: bp | last post by:
Hi, I try to use my own PreviewDialog with a PrinPreviewControl, to preview a document of type MyPrintDocument, and I want to implement the PrintRange functionnality (print some pages between 2 values). I noticed that we can specified the PrintRange, FromPage and ToPage properties of the PrintDocument.PrintSettings object, but, as said in MSDN : "The FromPage, ToPage and PrintRange can also be set programmatically,
1
11190
by: kig25 | last post by:
Hello, When using the VB.NET PrintDocument class, I seem to be encountering an issue where the sub pd_PrintPage handles PrintDocument.PrintPage (upon continuing if HasMorePages = true) will paint the next page on top of the original page. In a sample data case where the source is long enough to fill three pages, I end up with four calls to pd_PrintPage which render onto two printed sheets. Historical posts in this forum from 2003 and...
7
11404
by: pamela fluente | last post by:
hi, What is the cleanest and effective way to use the PrintDocument object to print directly to a pdf file "myfile.pdf" (with no prompt to the user: just print to file and make pdf) ? Does anyone have a simple code snippet? Either VB or C# will be perfect.
0
8840
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
9215
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...
0
9064
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
8007
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
5981
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4484
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3189
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
2576
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2130
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.