Solved

Reading MS Word line by line to save as Tiff Image using C#.Net

Posted on 2007-03-26
3
289 Views
Last Modified: 2013-12-17
Hi All
I have special requirment. In this, I need to read Ms Word document line by line with the all the Font and display settings. That's i have to know how many characters in an line and all the things. For e.g
If i'm reading an document and saving into an tiff image. The line's are getting collapsed soem time and the fonts are goes out of the control. If any body have any suggestion on this. Please help me out
0
Comment
Question by:santhimurthyd
3 Comments
 

Accepted Solution

by:
jdaragon earned 250 total points
ID: 18792317
Alas, the short answer is that you cannot do this.  

Word (like most modern word processors) doesn't really embody the concept of a line of text (except in special cases like a header...). Text flows within a paragraph depending on several factors : font size, the actual characters, and the physical characteristics (page size, margin settings, etc.) of the printer device context selected.

Most (if not all) software that renders Word to TIFF does it by implementing a printer driver based on the raster printer model. This means that Word (or whatever other Windows program is generating print) is responsible for rendering the text into the DC, and the driver is called for each line of pixels that is produced.  It's pretty easy to take each line of pixels, pass them into your compression routines, and generate a TIFF file without knowing *anything* about Word file structures, font metrics or anything else.

0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

This article describes relatively difficult and non-obvious issues that are likely to arise when creating COM class in Visual Studio and deploying it by professional MSI-authoring tools. It is assumed that the reader is already familiar with the cla…
Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

820 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