Showing posts with label rtf. Show all posts
Showing posts with label rtf. Show all posts

Saturday, November 01, 2008

OpenOffice 3.0 and Pages 3.0 comparison

This comparison is inspired by Wikipedia's Word vs. Pages comparison, but it is about OpenOffice instead of Word, and it contains some personal observations. It does not cover all the differences, but only some I consider important or interesting. The points are not ranked but just listed in a random order.

The current price for iWork '08 (with Pages 3.0) is close to 80 euro. The price for OpenOffice is 0 euro.

In OpenOffice but not Pages
  • Open and save OpenDocument files
  • Native "Save" of RTF and Word format (Pages "exports" to RTF and Word format, but subsequent changes have to be exported again through a number of dialogue steps.)
  • HTML editing
  • Document comparisons
  • Multiple windows with the same document (However, there is no split window, as far as I can tell.)
  • Multiple versions (Pages stores only one version of the document in each file)
  • AutoSave
  • Master documents
  • Script recording (Called “macros” in OpenOffice. The language is OpenOffice Basic by default. Applescript is not supported.)
  • Connector points for objects in diagrams.
  • Drop caps
  • Italics and bold in fonts with no built in typeface for it.
  • Hidden text
  • Paste Special - for pasting a chart as an image
  • Bibliography databases
  • Vertical Script and Japanese furigana
  • Support for right-to-left scripts, like Arabic and Hebrew
  • Built in formula editor
In Pages but not OpenOffice
  • Save and open Pages documents
  • Save and open RTFD files
  • Support for Mac OS X Services
  • Image Masks
  • Usable image controls. (OpenOffice actually has plenty of controls to edit images, but they are so stone age like, that they are virtually impossible to use.)
  • Multi-language dictionary (OpenOffice has several language dictionaries, but for each part of the text, one has to decide which language it shall be checked against.)
  • Ligatures and other advanced typographic features
Neither application seems to have anything like Microsoft Word's WordArt module.

Looking at the usefulness of the functions, it would seem like OpenOffice is much better. Most of the functionality that is unique to Pages is cosmetic or largely irrelevant to most people. Even if Pages is better at editing images, anyone who really cares about images will have to have an external dedicated image editor anyhow.

However, using the two programs there is a huge difference in perception. OpenOffice feels slower. There are a few milliseconds before the characters are displayed after each keystroke. It is more difficult to find options, and what is implemented is usually done in a strange way. There is for example a function called Conditional Text. To use it you have to start by following the menu path Insert > Fields > Other, and then click the Variables tab. As far as I can tell, none of those labels have anything to do with conditions or text.

In other words, OpenOffice is not a program to have fun with.

Sunday, March 02, 2008

How do I type Wingdings in Pages?

Wingdings and Webdings are fonts with small images instead of the letters. My personal recommendation is that you do not use them, even if you have the fonts. This is why:

Every document you type will be read by someone - either by someone else or by yourself in a few minutes, days or years. A document you type with Latin letters or any standard unicode letters is likely to be legible by anyone with the right software - today and in the future. But Wingdings is not standard unicode.

Now, let's assume that you want to show the yin-and-yang symbol to a reader.


You know that it is part of the Wingdings font, so you decide to get the symbol there.

So what you can do is to activate the Keyboard Viewer. Then select Wingdings from the menu in the bottom left corner and then select Wingdings as font in Pages and start typing.


However, when you send this Pages document to another computer user, it is very possible that he will not have the Wingdings font, so the character will not display. What is displayed is just "[" because that is the character that Wingdings uses to display the yin-yang symbol.

And the same thing can happen to you. When you change the paragraph style in this document, the symbol will become "[". If you copy the text to another application, it will become "[". If you export it to RTF and then open it in TextEdit, it will become "[". It is basically a very unstable character - just like all other characters in Wingdings, Webdings and Monotype Sorts.

TextEdit does not even allow you to type the character, and that is probably a wise choice. You can insert it from the Character Palette to TextEdit. You find it in the Character Palette with the View PIFonts, Font: Wingdings-Regular. However, what is inserted is the unicode F05B which is in the Private Area. The Private Area means that it can be used by anyone for anything, so depending on the available font, it can appear as completely different characters.


As you do not know which font the reader will have available, you will not know what the document will look like to him. That's why it usually is best to avoid Wingdings fonts altogether.

There are perhaps cases where you need to use them, but try to make sure you have a normal picture as a backup - just in case. You can also use Wingdings to create PDF files, as PDFs usually embed the font.

Wednesday, January 30, 2008

Export folder to Word, RTF, PDF, TXT or RTFD

This AppleScript to export the content of a folder with Pages documents was kindly created by Yvan Koenig. You can find more of his scripts at his Public iDisk. If you prefer to export a selection of files, you may want to have a look at the scripts in this post, which use a Scriptlet.

To use the script below, copy it all into a new script in ScriptEditor and run. Due to blogspot's layout, you may not see all characters here, but they should be copied properly, if you highlight all the non-proportional text below.
(*
Export pages documents as Word ones in the folder where the original docs where.

Assuming that we start with:
AppleScript & Office.pages
it will be exported as:
AppleScript & Office.doc
If a file already exist with the short name
it may be saved as:
AppleScript & Office#20080128T221639.doc (if withSeconds is defined as true)
AppleScript & Office#20080128T2219.doc (if withSeconds is defined as false)

the serial number is a packed version of the date/time of the save process:

2008/01/28T22:16:39 or 2008/01/28T22:16

Thanks to Dale GILLARD who teach me the way to export without using GUI scripting.

Yvan KOENIG
28 janvier 2008
29 janvier 2008
*)

property withSeconds : false (* you may set it to true if you wish *)
property typeNum : 1 (* 1 = WORD, 2 = PDF, 3 = Txt, 4 = rtf, 5 = rtfd *)

property newExt : ""
property newType : ""
property types : {{"doc", "SLDocumentTypeMSWord"}, {"pdf", "SLDocumentTypePDF"}, {"txt", "SLDocumentTypePlainText"}, {"rtf", "SLDocumentTypeRichText"}, {"rtfd", "SLDocumentTypeRichTextBundle"}}

tell application "Finder" to set listeFichiers to every item in (choose folder) (*
dans un bloc Finder pour avoir un titre de dialogue "localisé"
• in a Finder block to get a localized dialog title. *)
if (count of listeFichiers) = 0 then return
open listeFichiers

-- ===========

on open (sel)
repeat with elem in sel
my exploreTraite(elem as alias, "")
end repeat
end open

-- ===========

on exploreTraite(elem, ptree) (*
elem est un alias
elem is an alias *)
local elem_, cl_, typeId_
set elem_ to elem as text
tell application "System Events"
set cl_ to class of item elem_
set typeId_ to type identifier of elem
end tell
set cl_ to cl_ as Unicode text

if cl_ is "file package" then
if typeId_ is "com.apple.iwork.pages.pages" then my TraiteUnPackage(elem_, ptree)
else if cl_ is "folder" then
my ExploreUnDossier(elem_, ptree)
else
-- not for us
end if -- cl_ is …
end exploreTraite

-- ===========

on ExploreUnDossier(dossier, ptree)
local nomElement, cheminElement, c
repeat with nomElement in list folder dossier without invisibles
set cheminElement to dossier & nomElement
tell application "Finder" to set c to name of (dossier as alias)
my exploreTraite(cheminElement as alias, ptree & c & ":")
end repeat
end ExploreUnDossier

-- ===========

on TraiteUnPackage(aPackage, ptree)
local docPathAndName, oldName, docName, newExt, newType
(* aPackage always ends with a colon, we must remove it *)
set aPackage to (text 1 thru -2 of (aPackage as Unicode text)) as alias

set {newExt, newType} to types's item typeNum
tell application "Finder"
set sourceFolder to (container of aPackage) as Unicode text
set oldName to name of aPackage as Unicode text
end tell -- Finder
set docName to (text 1 thru -6 of oldName) & newExt
set docPathAndName to sourceFolder & docName

tell application "System Events"
if exists file docPathAndName then
set docName to (text 1 thru -7 of oldName) & my serialize() & "." & newExt
set docPathAndName to sourceFolder & docName
end if
end tell -- system events

tell application "Pages"
open aPackage
save front document as newType in docPathAndName
close front document
end tell -- Pages
end TraiteUnPackage

-- =============

on serialize()
local cd, serial
set cd to current date
set serial to (year of cd as text) & text -2 thru -1 of ("0" & (month of cd as number)) & text -2 thru -1 of ("0" & day of cd) & "T" & text -2 thru -1 of ("0" & hours of cd) & text -2 thru -1 of ("0" & minutes of cd)
if withSeconds then
return "#" & serial & text -2 thru -1 of ("0" & seconds of cd)
else
return "#" & serial
end if
end serialize

Wednesday, October 10, 2007

Is there a Pages Viewer for Windows?

No.

If you only have a Pages document and a Windows PC, it is very difficult to see the Pages document as the author intended it. You have only two options:

1. Get a Mac with Pages, or call the original creator of the document and have the Pages document saved in a format that can be read on Windows. That usually means Word or PDF. If you want to edit the document on Windows, only Word or RTF formats work. RTF files with images and tables are not supported.

2. If the file was saved as a package, you can look at the files inside the Pages document directory and try to make something out of the different pictures and xml files that are there. You may at least get an idea what the document is about. If the author set the checkbox "Include preview in document", when the file was originally saved, this may work out reasonably well.

If you want to see what the Windows user will see in a Pages document you can control-click on the file in the Finder and Show Package contents.



You will see the included images and other files in their directory structure. If you clicked the checkbox "Include preview in document" when you saved the file, you will even get a PDF file with all the text and some very compressed pictures in the QuickLook folder.



Anyhow, there is currently only one application that can open Pages files, and that is Pages.

(The situation is the same for Numbers and Keynote documents. There is no available reader for Windows.)

Saturday, December 09, 2006

Why cannot Pages show pictures in .rtf files?

Part of the reason is that Pages is silly. If a picture is in a file, it should of course display it.

However, there is method in the madness. When it comes to rtf-files, Apple decided not to support pictures, as the rtf handling of images is too limited. Rtf supports only jpg pictures and png pictures and a number of "meta" image formats. This means that if you insert for example a small eps or pdf-file into an rtf document, MS Word will have to convert it to jpg or png, and then it is no longer scalable, even if you print on a printer with high resolution or with a large paper format. You can see this by simply increasing the view size in MS Word.

When an application like TextEdit saves to rtf, it instead uses rtfd, which allows for pdf and other high quality scalable formats.

If you open an rtfd from TextEdit in Pages the edges are still smooth with a high magnification. However, in any magnified rtf Word the edges of original PDF files are jagged.

So, Pages it not that silly after all? Oh, yes it is:

1. If a well formatted rtf file contains a picture, there is no excuse why Pages should not display it.
2. When Pages exports to rtf, it does not warn you that it is not going to export to rtf at all, but to rtfd, which no Windows application can read.
3. Not only that, the embedded picture in the rtfd file is not PDF! It is tiff, which is a rasterized bitmap format, so it still gets the jagged edges.




Friday, December 08, 2006

People send me .rtf files with pictures in them, but the pictures are not displayed in Pages. What should I do?

Do not use Pages to open those files. Instead use one of the free word processors like OpenOffice or NeoOffice or AbiWord or a pay for word processor like Nisus Express or Mellel or many other ones.

Apart from images, Pages 3.0 cannot handle RTF files with tables either. The solution is the same: use another application.

Saturday, November 04, 2006

How do I edit PDF files with Pages?

You cannot. No application can make any substantial modifications to PDF files - not even Adobe Acrobat from Adobe, who created them. The main purpose of PDF files is to print them. PDF is the end station.

You can import PDF files, like you can import images, but you cannot open them.

You can extract data from some PDF files in a few different ways.

The most obvious one is to simply copy the content from the PDF to Pages.

In some cases you may want to keep the layout of the pictures, and in that case a screen shot may be better. To make a screen shot hold down command-shift-4 and drag the mouse over the area you want. If you want high resolution, you need to increase the zoom the PDF is displayed in.

If you use the free Adobe Reader, you can export the text using File > Save as Text. No formatting and no pictures will be exported.

If you invest in Adobe Acrobat Pro, you get some more export options: HTML, JPeg, RTF, Word document, XML and others, and the result is sometimes acceptable. There is even a menu option to export just the images: Advanced > Export all images.

If you export to RTF, remember that Pages cannot render pictures in RTF files, so you will have to open it in another application like MS Word or NeoOffice.

Also note that there are PDF files that are locked, so you cannot extract any data from those files with any legal program. This is often the case with e-books for example, but also other material where the authors want to protect their copyright.