1 / 17

Serving Word

Serving Word. Using HTML, XML, and CSS to Dynamically Generate Word Documents Samuel R. Neff B-Line Express. Agenda. Automation Document Properties HTML, XML, CSS Formatting Labels Columns Headers, Footers Images Alternatives. Automation. Control one application from another

adrina
Download Presentation

Serving Word

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Serving Word Using HTML, XML, and CSS to Dynamically Generate Word Documents Samuel R. Neff B-Line Express Samuel R. Neff

  2. Agenda • Automation • Document Properties • HTML, XML, CSS • Formatting • Labels • Columns • Headers, Footers • Images • Alternatives Samuel R. Neff

  3. Automation • Control one application from another • Use COM object “Word.Application” • Complete flexibility and power • Limitations • Unattended execution • Slow • CF COM Support (all versions) Samuel R. Neff

  4. Document Properties • Small quantities of data • Very fast and easy to use • Safe for servers • Limitations • CF COM Support (all versions) • Java version incomplete (Apache POI) Samuel R. Neff

  5. HTML, XML, CSS • Familiar • Fast • Flexible Samuel R. Neff

  6. Hello Word Example:helloword.cfm Samuel R. Neff

  7. Sections Pages Margins @page Section1 { size:8.5in 11.0in; margin:1.0in 1.25in 1.0in 1.25in; } div.Section1 { page:Section1; } Basic Formatting Example:letter01.cfm Samuel R. Neff

  8. Paragraph Formatting Example: letter02.cfm Samuel R. Neff

  9. Labels Example: labels01.cfm Samuel R. Neff

  10. Advanced Labels • Different sizes and layouts • Page Margin • Row Height • Paragraph Margins • Number of Columns • Spacers • Reuse code • Despite varying content • ColdFusion Components • Not all labels can be generated Examples: labels02.cfm, labels03.cfm, WordLabelGenerator*.cfc Samuel R. Neff

  11. Columns Example: columns01.cfm Samuel R. Neff

  12. Multi-File Documents Examples: MultipartMIME_Example.htm, MultipartMIME.cfc Samuel R. Neff

  13. Headers & Footers Example: columns02.cfm Samuel R. Neff

  14. Images • Use standard <img> tag • Include image in the file list • Include image in Multipart MIME message • Component automatically encodes as Base64 Example: columns03.cfm Samuel R. Neff

  15. Resources • Save as Web Page • Microsoft® Office HTML and XML Reference • http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnoffxml/html/ofxml2k.asp • RFCs 2045 and 2046 • http://www.ietf.org/rfc/rfc2045.txt • http://www.ietf.org/rfc/rfc2046.txt Samuel R. Neff

  16. Conclusions • HTML/XML/CSS Faster and more stable than COM • Can be used for most dynamic Word applications • Builds upon existing developers' skill set Samuel R. Neff

  17. Questions sam@blinex.com Samuel R. Neff

More Related