tags:

views:

147

answers:

8

Hi How can i convert doc,docx to TIFF whith delphi?

+1  A: 

In short, you can't.

Doc and TIFF are two completely different things. It's not like converting from BMP to TIFF (two image formats), or WAV to MP3 (two audio formats). For very limited Word documents, I suppose you could run Word through OLE automation (or maybe even embed Word in your application for better control), then take a screenshot, but I think your problems runs deeper than that. Maybe you could provide some more info about what you try to achieve?

Svein Bringsli
i want send fax with kdtele but this component only send tiff and my data is doc or docx
kamyar kimiyabeigi
In that case you should probably do something like glob's solution (use Word to convert to RTF, render the rtf to bitmaps, and convert to TIFF. He recommends WP-Tools and GDI+ for the last two operations)
Svein Bringsli
A: 

Word is not able to save its documents to TIFF format. Your best options are to use third party software which can do that. Just google for Doc to Tiff.

The_Fox
A: 

I've done it from within Word, however the code is long lost I'm sorry.

I created an Office plugin using the Add-in Express Component.

I used Word automation to convert the current document to RTF, used WP-Tools to render, which gave me the bitmap for each page. Finally I used GDI+ to create the multi-page TIFF.

glob
A: 

The standard trick is like with word to pdf: find a virtual printer that outputs tiffs, and instrument word over OLE to print to the virtual printer.

If I put "tiff printer virtual" in google, I see quite some hits. (not all free though, and of course it complicates installation to use two programs (word+printer) to do this)

Marco van de Voort
A: 

When looking for tools to do this, you should also be aware that not all TIFF files are faxable. TIFF files can contain a whole range of image formats and sizes. You need to find a tool which can convert your document to monochrome bitmaps 1728 pixels wide, with the page images each in a single strip and with a compression method supported by your fax software.

frogb
i use kdtele for send fax
kamyar kimiyabeigi
+1  A: 

thank you for your answers

kamyar kimiyabeigi
A: 

A good fax software usually comes with a fax printer driver, check with the maker of your fax software if they have one. With a driver you can simply use OLE Automation to make Word print the document to this driver. The fax software we use expects the fax number and other parameters embedded in the text like this: @@NUMBER12345678@@

Joe Meyer
A: 

i use kdtele for send fax

kamyar kimiyabeigi