Re: Generating PDF and HTML from single source

Subject: Re: Generating PDF and HTML from single source
From: Michael Oboryshko <obie1121 -at- yahoo -dot- com>
To: "TECHWR-L" <techwr-l -at- lists -dot- raycomm -dot- com>
Date: Thu, 17 May 2001 11:10:09 -0700 (PDT)

I also have a requirement to deliver PDF and XHTML
versions of my documents. I quickly discovered that
hell would freeze over before Word could produce clean
HTML (let alone XHTML).

So I came up with a tactic that seems to work for
low-volume single sourcing, using tools on hand. I'm
not sure if this has been done before, but it's new to
me.

The trick is to write in HTML, then import into Word.
It turns out that, while Word can't export clean HTML,
Word can import HTML just fine.

So I rewrote all my docs by hand in valid XHTML/CSS.
My client is mostly into Internet/UNIX, so they are
happy about getting away from Word as a primary
authoring tool. Going forward, I now do my authoring
in XHTML using a text editor. When I need a PDF
version, I import the XHTML files into a Word
template, then distill to PDF. Through careful
management of the CSS and Word styles, the import is
painless and requires little or no tweaking before
printing to PDF.

Several developers helpfully pointed out that there
were utilities to directly convert the HTML to PDF.
That's true, but then the PDF doesn't have the
book-formatting provided by Word (headers/footers,
page numbers, cover page, widow/orphan control, etc.)

The Word template contains all the front matter and
headers/footers, while the HTML files contain the
guts. The Word document is a throwaway, used only to
create the PDF. If you want to change something you
have to change the HTML and re-import -- that's the
single-sourcing.

I spent some time trying to figure out exactly how
Word translates tags and CSS styles. If anybody knows
where to get detailed documentation on Word's HTML
Import filter, please send me a link.

This scheme actually worked better than I expected.
But for true large-scale single sourcing, you will
probably need Frame/WebWorks, or some custom
SGML-style solution.


Regards,
Mike O.




__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.com/

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

*** Deva(tm) Tools for Dreamweaver and Deva(tm) Search ***
Build Contents, Indexes, and Search for Web Sites and Help Systems
Available now at http://www.devahelp.com or info -at- devahelp -dot- com

Sponsored by Information Mapping, Inc., a professional services firm
specializing in Knowledge Management and e-content solutions. See
http://www.infomap.com or 800-463-6627 for more about our solutions.

---
You are currently subscribed to techwr-l as: archive -at- raycomm -dot- com
To unsubscribe send a blank email to leave-techwr-l-obscured -at- lists -dot- raycomm -dot- com
Send administrative questions to ejray -at- raycomm -dot- com -dot- Visit
http://www.raycomm.com/techwhirl/ for more resources and info.


Previous by Author: RE: Interviewing Subject Matter Experts
Next by Author: RE: finding hidden text
Previous by Thread: Generating PDF and HTML from single source
Next by Thread: Tools Question


What this post helpful? Share it with friends and colleagues:


Sponsored Ads