odt2pml - Writer to eReader Export Extension

×

Warning message

This extension was not updated recently. It might not work with latest versions of OpenOffice.

Primary tabs

Maintainer:
rupxamqon
Rating:
4

Average: 4 (5 votes)

Application:
Writer
Tags:
writer, extension, export, extension, Palm, extension, eReader, extension, conversion, extension, DropBook, extension
Post date:
Thursday, 21 February, 2008 - 17:24
Statistics
Week: Not tracked - Month: Not tracked - Year: Not tracked
Download extension
System Independent version - All releases
Compatible with OpenOffice 4: Unknown
User feedback:
Compatible with OpenOffice 4.x?

odt2pml exports a Writer document into a "Palm Markup Language" (PML) tagged plain text file, ready to be processed by DropBook for eReader.

odt2pml is WYSIWYG, within PML limitations: format your Writer document as you like, and eReader will show it with nearly the same formatting. That includes character and paragraph styles, page breaks, chapter headings, footnotes, frames, images and direct formatting (bold, italic, subscript, ...).

Tables are not supported.

You may enable direct calling of DropBook in order to get a .pdb file ready for eReader (only on Linux and Windows).

Three helper macros are included:

  • Text Converter: enhanced AutoCorrect, uppercase words to italic, _xxx_ to italic, first words in chapter to uppercase...
  • Picture Converter: extracts and converts pictures and drawing shapes, saves them as .png files, and links them to your document.
  • Heading Style Formatter: You may create an eReader table of contents simply by formatting your document's chapter titles with Heading styles.

Version 4.3 optimized for OOo 3.2. Almost all eReader formatting options are now handled - see odt2pml Help: "What gets converted?"

Dialogs and Help available in 4 languages: de, en, es, fr. [OOo might have a problem when the User Interface language is not one of them: The default language should be English, but a different one might show up. Cfr. http://www.openoffice.org/issues/show_bug.cgi?id=88470 ]

You may find a great step by step tutorial here (Thanks, FRDV!):

Comments, bug reports and enhancement requests are always welcome!

More info about PML, DropBook and eReader: http://www.ereader.com/ereader/help/dropbook/

All trademarks and registered trademarks mentioned herein are the property of their respective owners. The author is in no way related to any of them.

odt2pml - Writer to eReader Export Extension

Version Operating system Compatibility Release date
4.3.2 System Independent 3.2, 3.3, 3.4 14/05/2011 - 22:00 More information Download
4.3.1 System Independent 3.2, 3.3, 3.4 07/02/2011 - 18:05 More information Download
4.3 System Independent 3.2, 3.3, 3.4 12/11/2010 - 12:17 More information Download
4.2.1 System Independent 2.x, 3.0, 3.1, 3.2, 3.3, 3.4 23/02/2009 - 21:20 More information Download
4.2.0 System Independent 2.x, 3.0, 3.1, 3.2, 3.3, 3.4 17/02/2009 - 20:30 More information Download
4.1.0 System Independent 2.x, 3.0, 3.1, 3.2, 3.3, 3.4 17/12/2008 - 22:36 More information Download
4.0.1 System Independent 2.x, 3.0, 3.1, 3.2, 3.3, 3.4 28/10/2008 - 19:20 More information Download
3.2.2 System Independent 2.x, 3.0, 3.1, 3.2, 3.3, 3.4 26/10/2008 - 16:20 More information Download
4.0.0 System Independent 2.x, 3.0, 3.1, 3.2, 3.3, 3.4 20/10/2008 - 00:52 More information Download
3.2.1 System Independent 2.x, 3.0, 3.1, 3.2, 3.3, 3.4 29/07/2008 - 18:11 More information Download

Comments

As someone complained earlier with 3.x; initial installation results in a library missing error. Upon restarting Open Office the extensions are not visible.

That is, if I go to Tools/Extension Manager... the extensions are installed and there, but the toolbar for odt2pml is missing, as is the dialog that should be at the bottom of the Tools dropdown.

I have tried uninstalling and reinstalling the extension. I have tried installing other extensions with no positive result. I am about to try removing and reinstalling Open Office.

... okay, I remedied the problem by uninstalling the plugin, restarting Open Office Writer, installing the plugin from the extension manager and immediately restarting Open Office Writer.

Apparently installing it by using the Open command is causing me some strife (or not restarting before trying to use it).

I get the following error when trying to convert a file that was originally in HTML format:

*************************************
BASIC runtime error,
Property or method not found: ParaStyleName
*************************************

I had opened the HTML file into OpenOffice and then saved it as ODT

Are you planning to make the macro compatible with OpenOffice 3.0? I tried it, and it generates an error:
Message: The following Basic script cannot be found.
library: 'odt2pml'
module: 'odt2pml'
method: 'sbPmlWizard'
location: 'application'

UPDATE: I tried updating my OO from 3.01 to 3.11, and the macro began to work from that point onward. Perhaps some key piece of software was missing or damaged from my prior installation, and it got repaired by the install.

The macro always was compatible with OOo 3.x. I tested it as soon as the first beta versions of OOo 3.0 were available.
Perhaps you have run into a common OOo problem. After installing and/or updating any extension, normally it is necessary to shut down OOo completely (also the QuickStarter, if you use it), and restart it. Afterwards, there should be no problem using the extension.

I have installed this twice and restarted both times. When I click on any of the four buttons I get this error message:

A scripting Framework error occurred while running the Basic script vnd.sun.star.script:odt2pml.ConvText.sbTextConverter?language=Basic&location=application

Message: The following Basic script could not be found:
library: 'odt2pml'
module: 'ConvText'
method: sbTextConverter'
location: 'application'

What do I do next?

Thanks.

OOo is tricky about restarting after installing an extension. Maybe there was the OOo Quickstarter still working.
I don't know exactly what might be the problem, but I'd suggest that you try installing the extension, and then shut down your computer and restart it. Hopefully then the extension works. If not, please tell me what OS, OOo version, etc. you are using.

Love this macro! I really like being able to read my non-drm RTF ebooks in ereader now.

Between comments here & various mobileread forum threads, I have figured out how to use this & the previous version with only a little tweaking and have created nicely formatted books in minutes.

"configuration" is nice for telling the macro where dropbook is, but I turned it off since I do a little more editing before using dropbook - see question 1.

But I still have a few questions that are probably blindingly obvious to someone with programming background - not me.

1)since OO won't let me edit PML, and I like seeing the author, title, copyright, ISBN info on the ereader page, I currently open the PML file with notetablight and put in the appropriate PML comments, save, then open with dropbook. Is this editing something that I could do while the file is in ODT form or with the macro and skip the notetablight step?

2)"You may create a table of contents simply by formatting chapter titles with Heading styles." Is this something that I need to do when the file is in ODT form before using the macro? What do you mean by Heading styles? Help please.

3)"Three helper macros are included: John Vigor's Ascii Formatter, Oliver Brinzing's Image Extractor, and a Chapter heading style Formatter." Are these macros just automatically packaged into your macro? Does the ascii formatter mean that I could convert my html ebooks somehow to ereader?

4)I currently use this macro on my windows partition primarily. if I delete the previous edition off my linux/ubuntu hardy partition, where do I install the new edition ? - edition 3 is currently sitting on desktop so that I could tell OO where to find it.

Thanks so much, I've been so pleased since I found this macro & started using it. Plus, my husband's been happy since I'm converting old RTF ebooks rather than buying new.

Elizabeth N.

Addendum:
Just back from work - found the help section specific to the extension, that may help me with some of the above questions.

Updated ubuntu with the new release. still couldn't figure out where I am supposed to save the extension so I just put it on desktop. tried to put it in the open office folder (file system - etc - openoffice) but it didn't seem to take. I don't mind the icon on desktop, I just don't like the cluttered look.

thanks for any help/info.

Hi, Elizabeth,
thanks for your comments! I'll try to answer your questions:

  1. See the Extension Help (running the macro and clicking on the Help button, or F1), "Export to eReader", under "eBook title" - you can insert that info directly in your Writer doc.
     
  2. If your Writer doc has e. g. 10 chapters, you may place the cursor on every chapter title, click on the "Apply Style" textbox ("Formatting" toolbar, second "button" in my OpenOffice), and select "Heading 1" (or 2, 3, 4). You will find this also if you click on Format, Styles and Formatting, and double click on the desired paragraph style. If you right click on the style, you can modify it (e. g. to start every chapter on a new page: click Text flow, Insert page break before).
    If all your chapter titles start with the same word (e. g. "Chapter"), you may use the "Apply Heading Style" macro (third button in the new odt2pml toolbar).
    If you are working on a big and structured Writer doc, you may use e. g. "Heading 1" for the book title, "Heading 2" for "Part" titles, and "Heading 3" for "Chapter" titles.
    Only after formatting everything in your Writer doc to your liking, run the "Export to eReader" macro. In your eBook, you will find all your "Heading" (1 to 4) formatted titles in the table of contents - correctly indented.
     
  3. They are all part of the Extension. You will see 4 buttons in the new odt2pml toolbar, or clicking on Tools, Addons, odt2pml (both are only visible when a Writer doc is opened). Click on each one, and then on the "Help" buttons for more info.
    The Ascii Formatter is meant for simple text files with paragraph breaks at every line end (e. g. older Gutenberg texts).
    It is perfectly possible to convert HTML files with odt2pml, see the corresponding Help page.
     
  4. I am not sure I understand your question. To upgrade odt2pml from version 3.x.x to version 4.0.x, follow the same procedure in Linux or Windows:
    1. Download the new version and save it wherever you want - desktop might be a good place.
    2. Open your OpenOffice (I assume you have version 3 installed), and click on Tools, Extension Manager...
    3. Click in the Extension Manager list on odt2pml (it should have some version number starting with 3) and on Remove
    4. Close the Extension Manager and restart OpenOffice and Quickstarter (just to be sure...)
    5. Click again on Tools, Extension Manager..., Add, search for the downloaded new version and install it.
    6. Restart OpenOffice and Quickstarter again (so the Toolbar and the Help pages will show up correctly), and open a Writer doc. You should see a new toolbar with 4 buttons. Enjoy!
    7. After installation, you may safely delete the downloaded file (to "unclutter" your desktop :-).

    To update from version 4.0.0 to 4.0.1 and above, it's easier: In OpenOffice, click on Tools, Extension Manager..., Check for Updates...

I hope this helps. Any questions, just continue asking!

Cheers, Rup.Xamqon

I an running Open Office 2.4.1 on Vista. Every time I run the Format ASCII text, when I get to Main File Processing Finished, no matter what I do, either the program locks up or the program crashes. Any ideas?

I didn't find this problem. Please try the new version, odt2pml 4.0.0, or send me a copy of the document that caused your error.

I don't have Vista. On Kubuntu and Windows XP I find no error.
Did you try with different kinds of documents?

Hey

This macro is great, but how about adding Polish letters support. I see that this macro converts special characters to unicode codes. Here is a complete list of polish characters and their codes:

\u0105 ą
\u0107 ć
\u0119 ę
\u0142 ł
\u0144 ń
\u00F3 ó
\u015B ś
\u017C ż
\u017A ź
\u0104 Ą
\u0106 Ć
\u0118 Ę
\u0141 Ł
\u0143 Ń
\u00D3 Ó
\u015A Ś
\u017B Ż
\u0179 Ź

It would be great if you could add covertion of those characters.

Hi,
thanks for your feedback! I will include those characters in the next version of odt2pml.

http://www.ereader.com/ereader/help/dropbook/pml_extcharacters.htm warns:
"Only the limited subset of Unicode characters given in the table below are supported. In addition, some of the characters that are included in the table are not present in eReader Pro versions prior to 2.4. To ensure that the characters are displayed correctly, books using these tags should be read using eReader or eReader Pro version 2.4 or later.
On Palm OS handhelds these special symbols are only available in one size, matching the "Small" font."

Please note that not all polish characters will be converted. In my test, the following characters are not shown on Palm: ż, Ą, Ć, Ę, Ń, Ż, Ź. The others show, but only in small font, even if the text is formatted large, bold, etc.

That is an eReader limitation, sorry!

SegundoBob

I just used odt2pml for the first time. I have verified that it produced a good table of contents for my file. This was the feature I wanted. I have not yet evaluated the .pdb in detail.

I had to guess how to use odt2pml and I may not have made optimal guesses. I did the following under Ubuntu 8.04 (Hardy Heron).
I opened "Well Laid Lines.odt". This is the file that I wanted to export to my Palm.
I clicked Tools - Macros - Run macro. This popped up a window that allowed me to select macro library: My Macros - odt2pml - odt2pml. Then macro name sbPMLWizard.
Running sbPMLWizard popped up a wizard that allowed me to produce "Well Laid Lines.pml" in the same directory as "Well Laid Lines.odt"
I opened a terminal in the directory containing DropBook1.5.2.1.exe and "Well Laid Lines.pml" and ran:
wine DropBook1.5.2.exe
I used wine because DropBook1.5.2.exe is a Windows executable.
This brought up the DropBook GUI which allowed me to convert "Well Laid Lines.pml" to "Well Laid Lines.pdb."

Thanks for a useful macro.

Hi, SegundoBob,
thanks for your comments!

When opening Writer, you should find a new Toolbar with 3 icons. The one on the right, named Export to eReader, calls the macro you are looking for. You will find the same 3 icons as submenu under Tools - Add-Ons - odt2pml.

On the wizard's first page you will find some help buttons explaining odt2pml usage, direct calling of DropBook, etc.

I hope this helps you!

Took seconds to install and seconds to use. The end result was a perfect eReader compatible copy of Journey to the West.

Thank you so much

Hi, Scoff,
I'm glad you liked it!

Currently I am fixing some bugs reported by two users.
I hope to post a new, improved version soon.