Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Print a Word doc. in pdf format

Posted on 2002-03-06
8
Medium Priority
?
202 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 46

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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 46

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 46

Accepted Solution

by:
aikimark earned 300 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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
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…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
Suggested Courses

705 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