Help:Manual Importodt

From Scribus Wiki
Revision as of 05:01, 28 April 2011 by Malex (talk | contribs) (Created page with "Category:Help_Manual Table of Contents <h2>Scribus and OpenOffice.org/OpenDocument</h2> <h4>Overview</h4> <p>When SUN Microsystems started the OpenOffice.org p...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search


Table of Contents

Scribus and OpenOffice.org/OpenDocument

Overview

When SUN Microsystems started the OpenOffice.org project, it also introduced a new type of file format. While OpenOffice.org's predecessor StarOffice used a binary format to store its data, OpenOffice.org's file format consisted of several XML files that were combined into a ZIP archive. Later, OpenOffice.org's file formats provided the basis for a new international standard for office documents, such as text documents, spreadsheet or presentations. The standard has been developed by the Organization for the Advancement of Structured Information Standards (OASIS), and it's called OpenDocument (ODT). OpenDocument has become an ISO standard in 2006 (ISO/IEC 26300:2006).
The clear documentation and specs have helped the Scribus Team to create some useful import features, which will be enhanced in the future.

Importing OpenOffice.org Writer and OpenDocument files

The importer for Writer (SXW) and ODT documents works per text frame and imports only the text contained in your document. Images and drawings need to be saved separately outside of the Writer document and then each drawing or image can be imported individually. Thus, a compound Writer document with tables or charts will not import the latter. Tables, charts or other embedded objects, need to be placed into their own Draw file and exported as described below.

The single most important issue to take into consideration for hassle-free SXW/ODT import is well chosen usage of styles in Writer or any other ODT-compliant word processor. Doing so will greatly reduce the amount of time needed within Scribus to format and style text. Any special paragraph styles in your Writer or ODT file will automatically be imported into your existing Scribus document.

SXW/ODT import step by step

  1. Select the text frame.
  2. Right-click > Get Text ...
  3. Select your SXW/ODT document.

This will import all the text from the source document, so ensure there is enough space in your frame or link extra text frames to the one you are importing into. You can comfortably import 10, 20 or even 50 pages of text in one go. However, the practical limit is probably not more than a chapter's (15-30 pages) worth of text for performance reasons.

Let Scribus create text frames for you

If you have an idea how many text frames you will need for the imported text, you can use an advanced import option. You can find it in the "Insert" menu, and it's called Frame ....

The "Insert Frame" dialog consists of four tabs. In the first one you have to select "Text Frame" in this context. In the second tab, "Location", you can determine the pages, on which the new frames will be placed, as well as their position on a page.

"The “Insert Frame” dialog, tab 1"

In the third tab, "Size", you can set the size of the frames that are being inserted, and in the "Options" tab you determine what's inside the frame and how it will look:

"The “Insert Frame” dialog, tab 4"
  • Columns: The number of text columns in the frame.
  • Gap: The gap between the text columns.
  • Link inserted frames does exactly what it says.
  • Links to existing frame lets you link the first of the newly created frames to an already existing frame. You can choose the latter from a drop down list that contains all existing frames, sorted by their name.
  • Source Document: Here can you choose the text document whose content will fill the new frames.

SXW/ODT import options

When importing text from OO.org there are three important options which need to be carefully considered:

"Import Options for OO.org Writer and OASIS (Open Document) files"
  • Overwrite Paragraph Styles This option will tell Scribus to change the formatting of any created styles in your Scribus document to follow those in the imported document.
  • Merge Paragraph Styles This option looks at the actual attributes (fonts, size) of the imported document and merges styles which have identical attributes. This can help to eliminate differently named, but otherwise identical styles.
  • Use Document Name as a prefix for paragraph styles is self-explanatory. This can be useful for sorting styles when importing from several documents.
  • Do Not Ask Again Caution! This last option will make your choices above permanent. The only way to undo this is to open the file prefs135.xml in the hidden folder ./scribus in your home directory with a text editor, then search for the text string attribute key"=ask-Again" value=0 and replace the 0 with 1.

Importing Tables from Calc

Since Scribus's table implementation is rather simple, it may be more convenient to create a table in a dedicated spreadsheet application like OpenOffice.org Calc. Here's a step-by-step instruction for successful table import from Calc:

1. Create your table in either OpenOffice.org Calc:

Help table-import-1.png

2. Copy the table items you need in Scribus (i.e., not the whole spreadheet) to the clipboard, create a new OpenOffice.org Draw document, and use Edit > Paste Special > GDI Metafile to insert the table as a vector file into Draw:

Help table-import-2.png

3. Use File > Export to export the table as an EPS file. Make sure that "Selection" is checked in the export dialog, because otherwise the whole page will be exported.

4. Now import the EPS file as a vector drawing into Scribus via File > Import > Get Vector File. The result will be a nicely formatted table in Scribus that can be edited using Scribus's vector tools:

Help table-import-3.png

Importing SXD and ODG graphics files

There are two methods: The first is to use the native importer. For many drawings this works very well. In some cases, especially with gradients, it may be preferable to test exporting as EPS or SVG.

It is important to note that Draw 3D objects do not export well, as they are limited to screen resolution. They also do not print well in most cases and will appear pixellated at print resolutions. Moreover, not all shapes and certain kinds of lines, like, for instance, connectors, are supported by the Scribus import filter.

In case you need any of the above, there's a reliable workaround: Like almost any program that allows for printing, OpenOffice.org provides an option to print to a file instead of sending the data to a printer. Simply go to File > Print in OpenOffice.org and check the "Print to File" option. On Linux/UNIX and Mac OS X this will create a PostScript file.

On Windows and OS/2 you have to install a PostScript printer driver (e.g. Apple Color Laser Writer) first. When you are asked to insert a name for the file you will print to, make sure you select or add "ps" as the file extension.

Next you can open the file or import it as a vector file into Scribus. This time, the content looks almost if not 100 % like the original. Even low-resolution 3D graphics have smooth edges now.

Importing SXM and ODF formulas

The most reliable way is to create a formula In OpenOffice.org Math and save it as SXM or ODF. Then open OpenOffice.org Draw and create a new file. Use Insert Object > Formula. You will have a tiny embedded square on Draw's canvas. Next, open Edit Object from the context menu. Draw will now launch Math. In Math, select Tools > Import Formula, browse to your saved formula and save to close the file. The embedded formula is now editable as a vector object. Save this Draw file, then export as EPS and import into Scribus. The formulas and text will import as scalable vector items. This will result in formulas which will print with very high quality and no worries when exported as PDF. Saving the Draw file and attempting to import the Draw file with embedded objects will fail, as Scribus cannot access those objects directly.