Solved

Print a Word doc. in pdf format

Posted on 2002-03-06
8
198 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
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
Technology Partners: 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Delphi : could not find program, '...exe' 2 215
Delphi inherited method 6 80
FMX and jaudiotracker playing memory stream 29 98
Delphi and Access based Enumeration 9 78
This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

733 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