Solved

Print a Word doc. in pdf format

Posted on 2002-03-06
8
200 Views
Last Modified: 2010-04-05
Hi all,

I'm running Win2000 + MS-Office 2000 + Delphi5 + Adobe Acrobat Writer driver.

I would like to print some Word files in pdf format but I don't know how to select the driver name and to give the filename(.pdf) to the driver

Could you please help ?

Thanks,

Pascal
0
Comment
Question by:F31203
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
8 Comments
 
LVL 3

Expert Comment

by:lopem
ID: 6844992
Pascal,

You dont have to define the printer driver from delphi. You can do it from windows printer manager... But
to print a word is not just a matter of sending it to the printer. You have to understand (from delphi), how the internal format of Word documents works).

On the other hand, there are some components... (i think are commercial all of them)... try

http://forum.planetpdf.com/archive/4225.htm

Hope this help
Manuel Lopez (lopem)
0
 
LVL 45

Expert Comment

by:aikimark
ID: 6845491
Pascal,

Do you really mean "save some Word files in pdf format"?

If so, the Word (automation) document object SaveAs method allows you to specify the converter.  

You will need to iterate through the word.application.fileconverters collection to find the Adobe Writer.  The Adobe file converter's value is the one you'll use with the SaveAs method.
0
 

Author Comment

by:F31203
ID: 6846880
Hi Manuel,

It is what I'm actually doing : I open the document with
Word (from Delphi) and I try to give the parameters to the
Word.Printout(params).

I've checked some components, but they only allow to open a pdf file and not to create them.

Regards,

Pascal
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 45

Expert Comment

by:aikimark
ID: 6846911
Pascal,

Do you mean you have a virtual printer setup?  If so, you need to set the default printer to Adobe.  There should be no further special processing required other than Print.
0
 

Author Comment

by:F31203
ID: 6846980
Hi aikimark,

I'm actually testing your solution too but not yet finished !

In fact, when you have installed the Acrobat Writer, it creates a virtual printer (in Word, you can't 'save as' a file as a pdf file but only print it giving a filename.pdf)

I'm trying to iterate the fileconverters but it seems to be hard work !

Regards,

Pascal
0
 
LVL 45

Accepted Solution

by:
aikimark earned 100 total points
ID: 6847365
{ List all the file converters installed }
  for i := 1 to Word.FileConverters.Count do
  begin
    Idx := i;
    Converter := Word.FileConverters.Item(Idx);
    ListBox1.Items.Append(Converter.ClassName + ' : ' +
Converter.FormatName);
  end;
0
 

Author Comment

by:F31203
ID: 6847659
OK, now I get the list of converters ... and Acrobat Writer is not in the list.

As I'm in a hurry with this problem, the quickest way for me will be to use the sendkey command to have the filename.pdf (not very elegant, but ...)
0
 

Expert Comment

by:CleanupPing
ID: 9343303
F31203:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
EXPERTS:
Post your closing recommendations!  No comment means you don't care.
0

Featured Post

Enroll in June's Course of the Month

June’s Course of the Month is now available! Experts Exchange’s Premium Members, Team Accounts, and Qualified Experts have access to a complimentary course each month as part of their membership—an extra way to sharpen your skills and increase training.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …

729 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question