Working with Office Software


Like Dilbert, many folks spend their days sitting in offices, working for the Man, trying to earn their daily bread. If you're among them, having Knoppix in your arsenal at least provides you with a cool operating system while you do your time in cubical prison.

Enjoying Interoperability with OpenOffice.org

Office suites are important. In 1984, Apple introduced the first office suite — AppleWorks — a collection of integrated software that enabled users to create text documents, crunch numbers, and work with data (software to give presentations came later). Although it was underpromoted by Apple, and ran only on the Apple II instead of the new Mac, it still proved to be incredibly popular. When Microsoft released Office 95 to coincide with the release of Windows 95, there was no looking back. Now, many people spend most of their workday inside their software office suite.

Microsoft may currently dominate the office suite software market, but things are slowly starting to change. A free, high-quality, open-source office suite has been a long time in coming, and one is finally here: OpenOffice.org (known as OOo to devotees). It runs on Mac OS X, Windows, and Linux; it provides a word processor, spreadsheet, and presentation program; and it exchanges documents with Microsoft's Office suite beautifully. It's an essential tool for any computer user, and it comes with Knoppix.

Unlike some other office suites, OpenOffice.org is not designed to lock in users by forcing them into proprietary data formats. Because it has this philosophy, OOo supports a wide variety of formats, including some that may surprise you.

Most users of OOo know that it reads and writes Microsoft Office formats pretty well. You can open Word, Excel, and PowerPoint files and templates, and it's a pretty sure thing that OOo will display them much like the original Microsoft apps would. In addition, you can save files using Microsoft's Word, Excel, or PowerPoint formats, and most users of those programs should have no problem opening and using your documents. In fact, they'll probably never know that you used something other than a Microsoft program unless you tell them.

OOo actually enables you to save your work in a cornucopia of formats, including the following (listed by application):

  • OOo Writer gives you the options of OpenOffice.org 1.0, Microsoft Word 97/2000/XP,

  • Microsoft Word 95, Microsoft Word 6.0, Rich Text Format (RTF), StarWriter, text, and HTML.

  • OOo Calc provides OpenOffice.org 1.0, Microsoft Excel 97/2000/XP, Microsoft Excel 95, Microsoft Excel 5.0, Data Interchange Format, dBASE, StarCalc, CSV, and HTML.

  • OOo Impress allows for OpenOffice.org 1.0, Microsoft PowerPoint 97/2000/XP, StarDraw, StarImpress, and HTML.

The OpenOffice.org formats are good. They tend to be much smaller in size than their Microsoft counterparts (because they're really just zipped XML-formatted text files); they're open and available to anyone, rather than closed and proprietary; and they're the basis for efforts by the Organization for the Advancement of Structured Information Standards (OASIS) to standardize on a common, open, XML-based format for office suites (predictably, Microsoft has taken a "wait and see" approach to OASIS' goals). However, as with most everything in the open-source world, OOo gives you options and leaves the final decision up to you.

One of the most useful file types that OOo supports is Adobe's PDF. Using OOo 1.1, create a text document and then select File Export as PDF, or, if you prefer to use the toolbar, click the Export Directly as PDF button, visible in the center of Figure 1-26.

image from book Figure 1-26: The OpenOffice.org function toolbar, with the Export Directly as PDF button in the center, between the Edit and Print buttons.

OOo creates excellent PDFs, readable by any Linux, Mac OS X, or Windows user. It really is a fantastic benefit and, as with so many of the really cool things about OOo, it's 100 percent free and built in to the program.

In addition to PDF, OOo now supports a format that may surprise some of you: Macromedia's Flash. Yup, that's right. Macromedia Flash, the cause of so many annoying animated advertisements and useless splash pages on the Web, is now available for export by OOo users—specifically, OOo Impress users. If you create a presentation, select File Export; from the File Format drop-down menu, choose Macromedia Flash (SWF) (.swf); and you're done.

Complaints about Flash aside, the capability to export to this format is a pretty useful feature. Flash is widely supported (to the tune of more than 90 percent of Web users, according to Macromedia), and it produces small files that are completely cross-platform. An exported presentation can be placed on a company Website, and users can open it with their Web browsers to view it. If a user clicks on a slide, the next one loads.

OOo is a powerful, deep program, and it's constantly getting better. If you're using Knoppix, however, you're probably not going to use OOo to write your next novel. Instead, you're more likely to recover or quickly edit a few documents. The capability to export those documents in a variety of popular formats is an essential feature of OOo that makes it a key part of your Knoppix toolkit.

Note 

The first place to go for information about OOo is, not surprisingly, http://www.openoffice.org. This is the mothership for OOo users, where you can download the program, read the latest OOo news, get some aid if you need it, and contribute to the project if you're so inclined.

The most active online forums for OOo can be accessed at http://www.oooforum.org, an excellent resource.

Another great place to look is http://www.openoffice-support.net, which includes tutorials, descriptions, and HowTo's. The tutorials in particular are quite nice, especially for anyone desiring a lot of screenshots to help in learning the basics of OOo.

Desktop Publishing with Scribus

Scribus is an open-source desktop publishing application that enables you to design, create, and produce documents for publication that contain complex layouts, such as newsletters, brochures, ads, fliers, and even magazines. In addition, because Scribus outputs as PDF (perfect for handing off to your local print shop), you can generate PDFs with advanced features — such as forms and passwords — hitherto only available with the purchase of Adobe's full Acrobat package (which is expensive and does not run on Linux). Scribus brings the full world of desktop publishing (DTP) to Linux and Knoppix — an amazing achievement.

From the K menu, select Office Scribus. Figure 1-27 shows the Scribus workspace.

image from book
Figure 1-27: Scribus, the open-source desktop publishing program

Scribus is enormous in capabilities and features, so big that it really needs a book of its own. There's no way to cover the program in any meaningful way here, especially for those who may be new to DTP, so our advice is to just jump in. If you've ever used PageMaker or Quark, you should be right at home in Scribus; if you haven't, Scribus is an excellent program in its own right that you can use to bring yourself up to speed with the world of DTP. Consider it a tremendous bonus that Knoppix makes it easy for anyone to try out this truly amazing program, a harbinger of open source's maturity and growth.

Note 

For some excellent overviews of Scribus' capabilities, see http://www.linuxdevcenter.com/pub/a/linux/2004/09/02/scribus.html and http://www.linuxjournal.com/article/7054.

For details on Scribus, go to the program's Website, at http://www.scribus.net. There's a ton of great information there, including documentation (a lot!), tutorials, a wiki, downloads, and more.

Viewing PDFs with Adobe Acrobat Reader

Linux comes with a wide variety of PDF readers, and Knoppix itself includes KGhostView, GV (GhostView), and Xpdf, in addition to the official one, Adobe's own Acrobat Reader.

You can start Acrobat Reader from the K menu by selecting Multimedia Viewers Acrobat Reader, but you'll more commonly click on a PDF you've downloaded, or on a link on a Web page that points to a PDF; and your PDF reader will open, already displaying the file you want to read. Knoppix comes with Adobe's Acrobat Reader as the default app to view PDFs, so you don't need to change anything.

Acrobat Reader supports text selection, which can come in handy if you want to get some text out of a PDF and into another program. To turn this on, click on the text selection icon on the toolbar, shown in the center of Figure 1-28.

image from book Figure 1-28: Use the text selection icon to grab text out of a PDF.

Note two caveats about text selection, however: First, it won't work in every PDF, only those that have not "protected" their content (most don't, but some do), and second, sometimes text selection acts weird. For example, one of us grabbed some text out of a PDF we had created and then pasted what we'd copied into a text editor. Every instance of the letter "l" was left out! Very weird.

Acrobat Reader is good if you need to quickly read or print a PDF, but if you need to do some serious work, the command line might be a better option for you. You probably know about the ps2pdf command, which converts PostScript documents into PDFs, but there are others you should know about as well, and all of them are built into Knoppix:

  • pdf2ps: Converts a PDF to Postscript, which can sometimes help you get around some stupid restrictions that someone put into place with his PDF. Try pdf2ps, and then turn around and immediately do ps2pdf, and you'll often have a usable PDF, sans silly DRM restrictions. Here's the syntax:

     pdf2ps sample.pdf 
  • pdftotext: Converts a PDF directly to plain text. This works very well. Of course, all formatting is lost, but you have the text, which you can now use in any imaginable way. Here's the syntax:

     pdftotext sample.pdf 
  • tiff2pdf: Converts a TIFF image into a PDF. The TIFF must be an 8-bit image, or the command won't work. Here's the syntax:

     Sample: tiff2pdf sample.tiff > sample.pdf- 

As you can see, there's more than one way to skin a PDF. Go ahead and use Adobe Acrobat Reader, but keep an eye on KPDF, another PDF viewer with a lot of promise, and don't forget these really useful commands — they may come in handy at times.

Note 

Knoppix is still using the now ancient Adobe Acrobat Reader 4.0, and version 7.0 just came out. The latest is in fact the greatest, and I'm hoping that it winds up in Knoppix soon.

For a good overview of several PDF readers for Linux, check out LWN's "The Grumpy Editor's Guide to PDF Viewers," available at http://www.lwn.net/Articles/113094. In particular, KPDF is going to radically improve once KDE 3.4 comes out, and a later revision of Knoppix includes that version of KDE, which is great news. KDE.News has the story at http://dot.kde.org/1102870587.

Comparing Two or More Files with Kompare

Kompare is a GUI wrapper for the diff program, an ancient (since the 1970s!) UNIX utility that displays the differences between two text files. Here's an example that explains how Kompare — and diff — works. One of us has been working on a poem for a while (more than 12 years), and periodically it is edited. The original file is titled hoarding_our_lives.txt; after a few tentative changes, it was saved as hoarding_our_lives_2.txt. After reading the second one, it wasn't clear which one was better, but trying to compare the two files was a bit of a pain. Enter Kompare.

Start Kompare from the K menu by selecting Development Kompare. The Compare Files or Folders window opens, and you're asked to choose your files. Here's our advice: don't do it yet! Instead, choose the diff icon on the left side of the window, enter /usr/bin/diff in the Diff Program textbox, and then go back to choosing the files you want to compare by clicking the Files icon. The Source file in this example is hoarding_our_lives.txt, and the Destination file is hoarding_our_lives_2.txt (you'd choose your own, of course). Then click the Compare button. Kompare opens, looking like what is shown in Figure 1-29.

image from book
Figure 1-29: Kompare compares two files, highlighting the differences.

Kompare is really a neat tool if you want to see the differences between two files. It has highlighted the following differences between the two poem files:

  • Line 2 is in file 1 but not in file 2.

  • There's one difference between line 12 in file 1 and line 11 in file 2.

  • There's one difference between line 17 in file 1 and line 16 in file 2.

  • Line 20 in file 1 has been broken into 2 lines in file 2.

After comparing two files, Kompare enables you to decide which changes to accept — in other words, which file is the "correct" one, which will then overwrite the problematic line(s) in the other file. To facilitate this, you can choose Difference Apply Difference, but that applies changes in only one direction: from left to right. That's not necessarily what you want to do. For example, you might like some things about file 1, and some about file 2. The trick is getting Kompare to work the way you want.

First take care of the stuff in file 1, the one on the left, that you like. For example, you could click on line 12 in file 1 and choose Difference Apply Difference (or you can press the spacebar on your keyboard). Boom! Immediately the two files have the same line 12. You can do the same for line 20 in file 1.

To arrange it so that file 2 overwrites file 1, you need to change the order in which Kompare displays the files by selecting File Swap Source with Destination, which switches the display of the two files in Kompare (but not the actual files themselves — hoarding_our_lives.txt and hoarding_our_lives_2.txt are still in the same folder as before; it's just the way they're shown in Kompare that changes). When you do that, you're first asked to save the two files, so click the Save button. Now you can select line 2 in file 2 (now on the left side of the window) and unify the two files, and then do the same for line 16 in file 2. Select File Save All, and everything's unified. Whether you're a closet poet or have some other need to compare documents, Kompare will come in handy. You're bound to have plenty of opportunities to use this great tool yourself.



Hacking Knoppix
Hacking Knoppix (ExtremeTech)
ISBN: 0764597841
EAN: 2147483647
Year: 2007
Pages: 118

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net