Solved

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

Posted on 2007-03-26
3
283 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
Comment Utility
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

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

This document covers how to connect to SQL Server and browse its contents.  It is meant for those new to Visual Studio and/or working with Microsoft SQL Server.  It is not a guide to building SQL Server database connections in your code.  This is mo…
For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK (http://www.microsoft.com/en-us/download/details.aspx?id=27876) for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

763 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now