Getting Started Guide 7.4
Chapter 10,
Working with File Formats, Security, and Exporting
This document is Copyright © 2022 by the LibreOffice Documentation Team. Contributors are listed below. You may distribute it and/or modify it under the terms of either the GNU General Public License (https://www.gnu.org/licenses/gpl.html), version 3 or later, or the Creative Commons Attribution License (https://creativecommons.org/licenses/by/4.0/), version 4.0 or later.
All trademarks within this guide belong to their legitimate owners.
Skip Masonsmith |
Kees Kriek |
|
Jean Hollis Weber |
Steve Fanning |
Kees Kriek |
Dave Barton |
Olivier Hallot |
Paul Figueiredo |
Winston Min Tjong |
Miklos Vajna |
Hazel Russman |
Ron Faile Jr. |
John A Smith |
|
Please direct any comments or suggestions about this document to the Documentation Team’s forum at https://community.documentfoundation.org/c/documentation/loguides/ (registration is required) or send an email to: loguides@community.documentfoundation.org.
Note
Everything you send to a mailing list, including your email address and any other personal information that is written in the message, is publicly archived and cannot be deleted.
Published January 2022. Based on LibreOffice 7.4.
Other versions of LibreOffice may differ in appearance and functionality.
Some keystrokes and menu items are different on macOS from those used in Windows and Linux. The table below gives some common substitutions for the instructions in this document. For a detailed list, see the application Help.
Windows or Linux |
macOS equivalent |
Effect |
Tools > Options |
LibreOffice > Preferences |
Access setup options |
Right-click |
Control+click or right-click depending on computer setup |
Open a context menu |
Ctrl (Control) |
⌘ (Command) |
Used with other keys |
Alt |
⌥ (Option) or Alt, depending on keyboard |
Used with other keys |
F11 |
⌘+T |
Open Styles deck in Sidebar |
LibreOffice can open a wide variety of file formats in addition to the OpenDocument formats, including Portable Document Format (PDF).
In addition to OpenDocument formats (.odt, .ott, .oth, .odm, and .fodt), Writer can open the following text document formats, and a variety of legacy formats not listed below:
|
Most of these file types are automatically detected by LibreOffice, so they can be opened without explicitly selecting the document type in the file picker.
When opening .htm or .html files (used for web pages), LibreOffice customizes Writer for working with these files.
In addition to OpenDocument formats (.ods, .ots, and .fods), Calc can open the following spreadsheet formats:
In addition to OpenDocument formats (.odp, .odg, .otp, and .fopd), Impress can open the following presentation formats:
In addition to OpenDocument formats (.odg and .otg) and Portable Document Format (.pdf), Draw can open the following graphic formats:
BMP |
JPEG, JPG |
PCX |
RAS |
TGA |
DXF |
MET |
PGM |
SDA |
TIF, TIFF |
EMF |
PBM |
PNG |
SDD |
WMF |
EPS |
PCD |
PPM |
SVG |
XBM |
GIF |
PCT |
PSD |
SVM |
XPM |
In addition to OpenDocument Formula (.odf) files, Math can open the formats used by OpenOffice.org 1.x (.sxm), StarMath (.smf), and MathML (.mml) files.
When opening a Word document that contains an embedded equation editor object, if the option MathType to LibreOffice Math or reverse is checked in Tools > Options > Load/Save > Microsoft Office, the object will be automatically converted to a LibreOffice Math object.
Saving in an OpenDocument format guarantees the correct rendering of the file when it is transferred to another person or when the file is reopened with a later version of LibreOffice or with another program. It is strongly recommended that you use OpenDocument as the default file formats. However, you can save files in other formats, if you wish.
Tip
When sharing a document that you do not expect the recipient to modify, the preferred option is to convert the document to PDF. LibreOffice provides a straightforward way to convert documents to PDF. See Error: Reference source not found on page 1.
In addition to OpenDocument formats (.odt, .ott, and .fodt), Writer can save in these formats:
Encryption support within the Microsoft Word 97/2000/XP filter allows password protected Microsoft Word documents to be saved.
Note
The .rtf format is a common format for transferring text files between applications, but you are likely to experience loss of formatting and images. For this reason, other formats should be used.
In addition to OpenDocument formats (.ods, .ots, and .fods), Calc can save in these formats:
|
In addition to OpenDocument formats (.odp, .otp, .fodp, and .odg), Impress can save in these formats:
Impress can also export to any of the graphics formats listed for Draw.
Draw can save in the OpenDocument Drawing formats (.odg, .otg, and .fodg).
Draw can export to any of the following graphics formats: BMP, EMF, EPS, GIF, JPEG, PNG, SVG, TIFF, and WMF.
Note
Adobe [Macromedia] Flash (.swf) export has been removed from LibreOffice 7. Flash Player reached end-of-life in December 2020.
Writer/Web can save to these formats:
LibreOffice uses the term “export” for some file operations involving a change of file type. If you cannot find what you want under File > Save As, look under File > Export (not available in Math) for additional types.
Two popular formats that LibreOffice can export to are PDF (Writer, Calc, Impress, and Draw) and EPUB (Writer only).
LibreOffice can also export files to HTML and XHTML. In addition, Draw and Impress can export to a range of image formats.
To export to one of these formats, choose File > Export. On the Export dialog, specify a file name for the exported document, then select the desired format in the file format list and click the Export or Save button as appropriate.
LibreOffice can export documents to PDF (Portable Document Format). This standard file format is ideal for sending the file to someone else to view using Adobe Reader or other PDF viewers.
Warning
A document in PDF format is not protected against contents tampering or editing by default. The PDF document contents can be edited by specialized software tools, including LibreOffice Draw.
The process and dialogs are the same for Writer, Calc, Impress, and Draw, with a few minor differences mentioned in this section.
Tip
Unlike Save As, the Export command writes a copy of the current document in a new file with the chosen format, but keeps the current document and format open in your session.
Click the Export Directly as PDF icon on the Standard toolbar to export the entire document using the PDF settings you most recently selected on the PDF Options dialog (see below). In Writer, Impress, and Draw, you can also use File > Export As > Export Directly as PDF. You are asked to enter the file name and location for the PDF file, but you do not get a chance to choose a page range, the image compression, or other options.
For more control over the content and quality of the resulting PDF, use File > Export As > Export as PDF (Writer, Impress, and Draw) or File > Export as PDF (Calc and Math) on the Menu bar. The PDF Options dialog opens. This dialog has six tabs (General, Initial View, User Interface, Links, Security, and Digital Signatures). Select the appropriate settings, and then click Export. Then you are asked to enter the location and file name of the PDF to be created, and click Export to export the file.
Note
You can also export to PDF from File > Export (not Math). On the Export dialog, select the PDF file format, the file name and location, and click Export. The PDF Options dialog then opens. Select the appropriate settings and then click Export. The only difference between the two export methods is the sequence in which steps occur.
On the General tab, you can choose which pages to include in the PDF, the type of compression to use for images (which affects the quality of images in the PDF), and other options. Figure 1 shows the Writer variant of the General tab – the corresponding tabs for other LibreOffice components have minor differences from this figure.
Figure 1: General tab of PDF Options dialog (Writer)
All: Exports the entire document to PDF.
Pages: To export a range of pages, use the format 3-6 (pages 3 to 6). To export single pages, use the format 7;9;11 (pages 7, 9 and 11). You can also export a combination of page ranges and single pages, by using a format like 3-6;8;10;12.
Selection: Exports all the selected material.
View PDF after export: Your default PDF viewer will open and display the newly exported PDF.
Lossless compression: Images are stored without any loss of quality. All pixels are preserved. This setting tends to make large files when used with photographs. Recommended for other kinds of images or graphics.
JPEG compression: In the Quality box, specify a compression level. Higher quality levels preserve more pixels. A setting of 90% works well with photographs (small file size, little perceptible loss of quality).
Reduce image resolution: Lower DPI (dots per inch) images have lower quality. Lower resolutions (100 DPI or less) may be sufficient for viewing on a computer screen, but many modern devices have much higher resolutions; and for printing it is generally preferable to use at least 300 or 600 DPI, depending on the capability of the printer. Higher DPI settings increase the size of the exported file.
Note
EPS (Encapsulated PostScript) images with embedded previews are exported only as previews. EPS images without embedded previews are exported as empty placeholders.
Watermark section
Sign with watermark: When this option is selected, a transparent overlay of the text you type in the Sign with watermark text box will appear on each page of the PDF.
General section
Hybrid PDF (embed ODF file): Use this setting to export the document as a PDF containing two file formats: PDF and ODF. In PDF viewers it behaves like a normal PDF file, and it remains fully editable in LibreOffice.
Archive (PDF/A, ISO 19005): PDF/A is an ISO standard for long-term preservation of documents, by embedding all the information necessary for faithful reproduction (such as fonts) while forbidding other elements (including forms, security, and encryption). PDF tags are written. PDF/A-1b refers to the minimum compliance level with PDF/A-1. PDF/A-2b is recommended for most users, because it allows for layers and transparency with shapes and images. It also compresses better, usually producing smaller files. PDF/A-3b is identical to PDF/A-2b, but also accepts embedding of other file formats.
Universal Accessibility (PDF/UA): Creates a universal accessibility-complaint PDF file that follows the requirements of PDF/UA (ISO 14289) specifications. See the Help for more information.
Tagged PDF: Tagged PDF contains information about the structure of the document’s contents. This can help to display the document on devices with different screens, and when using screen reader software. Some tags that are exported are table of contents, hyperlinks, and controls. This option can increase file sizes significantly.
Create PDF form – Submit format: Choose the format of submitting forms from within the PDF file. This setting overrides the control’s URL property that you set in the document. There is only one common setting valid for the whole PDF document: PDF (sends the whole document), FDF (sends the control contents), HTML, and XML. Most often you will choose the PDF format.
Allow duplicate field names: If enabled, the same field name can be used for multiple fields in the generated PDF file. You can enter data in the first occurrence of the named field in the PDF document and all fields with the same name will carry your entry. If disabled, field names will be exported using generated unique names.
Structure section
Export outlines: Exports headings in Writer documents, and page or slide names in Impress and Draw documents, as an outline (table of contents list) displayed by most PDF viewers, including Adobe Reader. In LibreOffice 7.0 and earlier, these were called bookmarks.
Export placeholders: The PDF will include any defined placeholder fields, which can be filled in by users. This option is only available in Writer.
Comments as PDF annotations: If selected, comments are included in the PDF as annotations.
Export automatically inserted blank pages: If selected, automatically inserted blank pages are exported to the PDF. This is best if you are printing the PDF double-sided. For example, books usually have chapters set to always start on an odd-numbered (right-hand) page. When the previous chapter ends on an odd page, LibreOffice inserts a blank page between the two odd pages. This option controls whether to export that blank page.
Use reference XObjects: Reference XObjects enable one PDF file to import content from another. More information can be found in section 8.10.4 of the PDF specification, ISO 32000-2:2017 (https://www.iso.org/standard/63534.html). If you are not familiar with referenceXObjects, leave this box unchecked.
On the Initial View tab (Figure 2), you can choose how the PDF opens by default in a PDF viewer. The selections should be self-explanatory.
If you have Complex Text Layout enabled (in Tools > Options > Language Settings > Languages), an additional selection is available under the Continuous facing option: First page is left (normally, the first page is on the right when using the Continuous facing option).
Figure 2: Initial View tab of PDF Options dialog
On the User Interface tab (Figure 3), you can choose more settings to control how a PDF viewer displays the file. Some of these choices are particularly useful when you are creating a PDF to be used as a presentation or a kiosk-type display.
Figure 3: User Interface tab of PDF Options dialog
Window Options section
Resize window to initial page: The PDF viewer window will resize to fit the first page of the PDF.
Center window on screen: The PDF viewer window will be centered on the computer screen.
Open in full screen mode: The PDF viewer will open full-screen instead of in a smaller window.
Display document title: The PDF viewer will display the document’s title in the title bar.
User Interface Options section
Hide menubar: The PDF viewer will hide the menu bar.
Hide toolbar: The PDF viewer will hide the toolbar.
Hide window controls: The PDF viewer will hide other window controls.
Transitions
Collapse Outlines
On the Links tab (Figure 4), you can choose how links are exported to PDF.
General
Export outlines as named destinations: Paragraphs defined in Writer’s outline levels, Impress or Draw slide names, and Calc sheet names are exported as “named destinations” to which Web pages and PDFs can link.
Convert document references to PDF targets: If you have defined links to other documents with OpenDocument extensions (such as .odt, .ods, and .odp), the file extensions are converted to .pdf in the exported PDF document.
Export URLs relative to file system; If you have defined relative links in a document, this option exports those links to the PDF.
Figure 4: Links tab of PDF Options dialog
Cross-document Links
Default mode: The PDF links will be handled as specified in your operating system.
Open with PDF reader application: Use the same application used to display the PDF document to open linked PDF documents.
Open with Internet browser: Use the default Internet browser to display linked PDF documents.
Figure 5: Security tab of PDF Options dialog
PDF export includes options to encrypt the PDF (so it cannot be opened without a password) and apply some digital rights management (DRM) features.
With an open password set, the PDF can only be opened with the password. Once opened, there are no restrictions on what the user can do with the document (for example, print, copy, or change it).
With a permissions password set, the PDF can be opened by anyone, but its permissions can be restricted. After you set a password for permissions, the other choices on the Security page (Figure 5) become available.
With both the open password and permission password set, the PDF can only be opened with the correct password, and its permissions can be restricted.
Note
Permissions settings are effective only if the user’s PDF viewer respects the settings.
The Digital Signatures tab (Figure 6) contains the options for exporting a digitally signed PDF.
Figure 6: Digital Signatures tab of PDF Options dialog
Digital signatures are used to ensure that the PDF was really created by the original author (that is, you), and that the document has not been modified since it was signed.
The signed PDF export uses the keys and X.509 certificates already stored in your default key store location or on a smart card. The key store to be used can be selected under Tools > Options > LibreOffice > Security > Certificate (macOS and Linux only). When using a smart card, it must already be configured for use by your key store. This is usually done during installation of the smart card software. Details about using these features is outside the scope of this chapter.
Use this certificate to digitally sign PDF documents: Click Select to open the Select Certificate dialog, where all certificates found in your selected key store are displayed. If the key store is protected by a password, you are prompted for it. When using a smart card that is protected by a PIN, you are also prompted for that.
Select the certificate to use for digitally signing the exported PDF, then click Sign.
All other fields on the Digital Signatures tab are accessible only after a certificate has been selected.
Certificate password: Enter the password used for protecting the private key associated with the selected certificate. Usually this is the key store password. If the key store password has already been entered in the Select Certificate dialog, the key store may already be unlocked and not require the password again.
When using a smart card, enter the PIN here. Some smart card software will prompt you for the PIN again before signing.
Location, Contact information, Reason: Optionally enter additional information about the digital signature that will be applied to the PDF. This information will be embedded in the appropriate PDF fields and will be visible to anyone viewing the PDF. Each or all of the three fields may be left blank.
Time Stamp Authority: Optionally select a Time Stamping Authority (TSA) URL. During the PDF signing process, the TSA will be used to obtain a digitally signed timestamp that is then embedded in the signature. Anyone viewing the PDF can use this timestamp to verify when the document was signed.
The list of TSA URLs that can be selected is maintained under Tools > Options > LibreOffice > Security > TSAs. If no TSA URL is selected (the default), the signature will not be timestamped, but will use the current time from your local computer.
EPUB format has become popular since mobile devices such as smartphones, tablets, and e‑readers appeared on the market. The EPUB format is implemented as an archive file consisting of HTML files carrying the content, along with images and other supporting files.
Writer can export a file to EPUB. A text-only document generally exports well, but some contents (such as illustrations, tables, and cross-references) may not export correctly.
Tip
Other ways to export to EPUB from Writer (.odt) files include Calibre, an open-source e‑book manager that runs on Windows, macOS, and Linux. Calibre provides many e‑book conversion facilities (including PDF to EPUB) and allows editing of the result. See https://calibre-ebook.com/ for more information.
Choose File > Export As > Export Directly as EPUB to export the entire document using the EPUB settings you most recently selected on the EPUB Export dialog (see below). You are asked to enter the file name and location for the EPUB file, but you do not get a chance to select other options.
For more control over the content and quality of the resulting EPUB file, use File > Export As > Export as EPUB. The EPUB Export dialog opens (Figure 7).
The EPUB Export dialog has the following fields:
Version
Split method
Layout method
Figure 7: EPUB Export dialog
Customize
Cover image
Media directory
Metadata
The easiest way to create HTML documents in LibreOffice is to start with an existing document. In Writer, you can get a good idea of how it will appear as a web page by using View > Web. However, Web view does not show you which features will or will not be saved correctly in HTML format. Refer to Creating, editing, and saving HTML files using Writer/Web on page 1 for what to consider before creating a web page from a document.
To save a Writer document as HTML, go to File > Save As on the Menu bar and select HTML Document (Writer) as the file type in the Save As dialog. You may be prompted to confirm that you wish to continue using the HTML format.
Saving a document as HTML produces a set of files. LibreOffice generates the image files and the HTML file necessary to create an HTML page in a browser. The number of files generated by the format conversion depends on the number of images and objects in the original text document.
Tip
Use an empty folder to save your document as HTML file and images.
The file names are created following a simple rule summarized in Table 1.
Table 1: File types created when saving as HTML format
File |
Contents |
Myfile.html |
The text contents, page layout, text attributes, meta tags, and styles. |
Myfile_html_[random number].gif |
GIF images of visible contents of OLE objects. |
Myfile_html_[random number].png, jpg, or bmp |
Images inserted in the text document as PNG, BMP, or JPEG keep their original format. |
Note
The HTML transformation of the text document is limited by the HTML 4.0 Transitional specification. Text documents in office suites have a richer set of resources that will not appear in HTML, for example page formatting. Do not expect the same layout fidelity when saving a file in HTML format.
Saving as HTML may require more work directly on the HTML code to adjust the layout of the web page. See “Creating, editing, and saving HTML files using Writer/Web” on page 1.
Another way to create a HTML file is to use File > Export and specify XHTML (Extensible Hypertext Markup Language) as the file type. LibreOffice will generate one XHTML 1.1 file per text document. The image files are embedded in the XHTML file. XHTML files created by exporting a text document in LibreOffice have significantly better layout rendering but fail to render objects other than images.
Notes
Writer does not replace multiple spaces in the original document with the HTML code for non-breaking spaces. If you want to have extra spaces in your HTML file or web page, you need to insert non-breaking spaces in LibreOffice. To do this, press Ctrl+Spacebar or Ctrl+Shift+Spacebar (depending on the operating system), instead of just Spacebar.
The Tab character is not rendered on exporting to XHTML. Instead, use borderless tables to position contents instead of the Tab character in a line. This also affects bullet and number lists that insert by default a Tab character between the bullet or number and the text. Use a list style where the Tab character is replaced by a space.
Objects different from usual image formats are not rendered in LibreOffice XHTML output. These include drawings, spreadsheets, charts, and OLE object in general. To render an OLE object in XHTML, first transform its visible contents into an image and then replace the object in your document with the image.
The use of styles in the text document is strongly recommended for getting the best results when exporting to HTML or XHTML.
Writer can save a large document as a series of web pages (HTML files) with a table of contents page.
1) Decide which headings in the document should start on a new page and make sure all those headings have the same paragraph style (for example, Heading 1).
2) Go to File > Send > Create HTML Document on the Menu bar to open the Name and Path of the HTML Document dialog (Figure 8).
3) Type the file name to save the pages under.
4) Specify which style indicates a new page by using the separated by drop-down list at the bottom of the dialog (for example, Outline: Level 1).
5) Click Save to create the multi-page HTML document. The resulting HTML files conform to the HTML 4.0 Transitional standard.
Figure 8: Creating a series of web pages from one document
Calc can save files as HTML documents. Go to File > Save As on the Menu bar and select HTML Document (Calc) as the file type in the Save As dialog.
If the file contains more than one sheet, the additional sheets will follow one another in the HTML file. Links to each sheet will be placed at the top of the document.
Calc also allows the insertion of links directly into the spreadsheet using the Hyperlink dialog. See Chapter 4, Working with Styles, Templates and Hyperlinks, for more information on hyperlinks.
Impress presentations cannot be saved in HTML format, but have to be exported as HTML documents. The HTML files created will then use the default settings that you have not changed.
Notes
Saving in HTML format does not retain animation and slide transitions.
You can click Create on the HTML Export dialog at any step in the following procedure.
1) Go to File > Export on the Menu bar and specify the file name and location of where to save the web page version of your presentation.
2) Select HTML Document (Impress) as the file type and click Export to open the HTML Export dialog / wizard (Figure 9).
3) On the Assign Design page, you can choose to create a new design and select or delete an existing design. Select New design or Existing design and click Next >. If you have not previously saved a web page design, the Existing design choice is not available.
New design – creates a new design in the next pages of the wizard.
Existing design – loads an existing design from the design list to use as a starting point for the steps that follow. The list box displays all existing designs.
Delete Selected Design deletes the design from the list. If you delete a design, you will only delete the design information. An export file will not be deleted by this action.
Figure 9: HTML Export dialog – Assign Design page
4) Specify the publication type for the web pages (Figure 10), then click Next >. The publication type defines the basic settings for the intended export. The choices are:
Standard HTML format – creates standard HTML pages from export pages.
Standard HTML with frames – creates standard HTML pages with frames. The exported page will be placed in the main frame and the frame to the left will display a table of contents in the form of hyperlinks.
Single-document HTML – creates a single file containing the text of the presentation, but not the layout or images.
Automatic – creates a default HTML presentation as a kiosk export in which the slides are automatically advanced after a specified amount of time.
WebCast – in a WebCast export, automatic scripts will be generated with Perl or ASP support. This enables the speaker (for example, a speaker in a telephone conference using a slide show on the Internet) to change the slides in the web browsers used by the audience.
Options are also provided to create a title page and to display your notes. For more information about the options on this page of the HTML Export dialog, click Help.
Figure 10: HTML Export dialog – publication type and options page
5) Specify the options for saving images, monitor resolution, and effects used for the web pages (Figure 11), then click Next >. The options on this page are as follows:
Save Images As – determines the image format. You can also define the compression value for the export.
Monitor Resolution – defines the resolution for the target screen. Depending on the selected resolution, the image will be displayed in a reduced size. You can specify a reduction of up to 80% from the original size. When selecting a resolution, consider what the majority of your viewers might be using. If you specify a high resolution, then a viewer with a medium-resolution monitor will have to scroll sideways to see the entire slide, which is probably not desirable.
Effects – specifies whether sound files defined as an effect for slide transitions are exported and whether any hidden slides are exported.
For more information on the options available for this page of the HTML Export dialog, click Help to open the help pages.
Figure 11: HTML Export dialog – image format, monitor resolution, and effects page
6) Specify the Information for the title page to be used with the web version of your presentation (Figure 12). The title page normally contains the author’s name, an email address, a home page address, and any additional information you want to include. This page is only available if you have selected to create a title page (option only applicable to the Standard HTML format and Standard HTML with frames publication types).
Figure 12: HTML Export dialog – title page information page
7) Select Link to a copy of the original presentation if you want to create a hyperlink to download a copy of the presentation file, and then click Next >.
8) Select the button style to be used for the web pages from the designs available (Figure 13) and then click Next >.
If you do not select a button style, LibreOffice will create a text navigator.
This page is not available if you have selected either Automatic or WebCast publication type.
Figure 13: HTML Export dialog – button style page
9) Select the color scheme to be used for the web pages (Figure 14), including colors for text, links, and background. This page is not available if you have selected either Automatic or WebCast publication type.
Figure 14: HTML Export dialog – color scheme page
10) Click Create.
11) If you have created a new design for your web pages, a small Name HTML design dialog opens. Type a name for the design and click OK.
Note
Depending on the size of your presentation and the number of graphics it contains, the HTML export function creates several HTML, JPG, and GIF files. It is recommended to create a folder to hold all the files created for the web version of your presentation. If you simply save to your desktop and not in a specific folder, these separate HTML and graphics files will be placed all over your desktop.
Draw documents cannot be saved in HTML format, but have to be exported as HTML documents. Exporting drawings from Draw is similar to exporting a presentation from Impress. Go to File > Export and select HTML Document (Draw) as the file type, then follow the procedure above for exporting Impress presentations.
LibreOffice Writer can create, edit, and save files in HTML format using a configuration called Writer/Web.
In addition to the Normal and Web display modes for editing (Figure 15), Writer/Web has a third editing mode called HTML Source mode (Figure 16). You can select this view when creating a new HTML document or after opening an existing one. With the HTML Source mode, you can directly edit HTML tags such as <p>, <ul>, <table>, and so on to compose web page elements. In that mode you must be familiar with the HTML markup language.
You normally add content to an HTML document using the Web display mode, because it will render the contents as if displayed in a browser. Use the HTML Source editing mode to tweak the formatting.
Note
Because HTML markup language has fewer formatting possibilities than a text document in OpenDocument Format, Writer/Web cannot provide all formatting features for HTML documents and some formatting dialogs have fewer options available. For example, a HTML paragraph has no tab settings.
Figure 15: Web display mode for Writer/Web
Figure 16: HTML Source display mode
To create a HTML document, choose File > New > HTML Document. Writer/Web opens a blank document in Web display mode. You can now add content to the document by typing or pasting text, images, tables, and other objects. Use all the Writer/Web formatting resources including styles to format the content. When you have finished, save the document with the HTML file type.
If you need to add HTML content directly into the document, enter HTML Source editing mode by clicking the HTML Source icon on the Standard toolbar, or choosing View > HTML Source on the Menu bar. If you haven’t saved a new document, Writer/Web will ask you to do so before it switches to HTML Source editing mode. In that mode, Writer/Web turns into a notepad-like text editor (Figure 16).
Note
The HTML markup content generated by Writer/Web is limited to the production of a displayable document in a web browser. It does not consider other components of a website such as external cascading style sheets (CSS), external JavaScript, or other script languages. Use the HTML Source mode to manually insert links to these external components into the page.
It is important to check your web pages (HTML documents) in a web browser such as Mozilla Firefox, Google Chrome, Microsoft Edge, or Safari. Not all browsers render HTML files the same way, so if possible, check the contents in several browsers.
To make LibreOffice open your default web browser and display the contents of an HTML document, go to File > Preview in Web Browser on the Menu bar, or click the Preview in Web Browser icon on the Standard toolbar. You can also open any web browser and then open the HTML file in it.
LibreOffice provides several ways to send documents quickly and easily as email attachments in one of three formats: OpenDocument (LibreOffice’s default format), Microsoft Office formats, or PDF.
To send the current document in OpenDocument format:
1) Choose File > Send > Email Document. LibreOffice opens your default email program (if installed). The document is attached to a new email. If no email program is installed, LibreOffice displays a message.
2) In your email program, enter the recipient, subject, and any text you want to add, then send the email.
File > Send > Email as OpenDocument [Text, Spreadsheet] has the same effect in Writer or Calc.
If you choose Email as Microsoft [Word, Excel] in Writer or Calc, LibreOffice first creates a file in one of those formats and then opens your email program with the file attached to a new email.
Similarly, if you choose Email as PDF, LibreOffice opens the PDF Options dialog where you can select the settings you want, and then opens your email program with the PDF attached to a new email.
To email a document to several recipients, you can use the features in your email program or you can use LibreOffice Writer’s mail merge facilities to create the document and send it. See Chapter 14, Mail Merge, in the Writer Guide for details.
LibreOffice can open and save files stored on remote servers. Keeping files on remote servers allows you to work with the documents using different computers. For example, you can work on a document in the office during the day and edit it at home for last-minute changes. Storing files on a remote server also backs up documents from computer loss or hard disk failure. Some servers are also able to check-in and check-out files, thus controlling their usage and access.
LibreOffice supports many document servers that use well known network protocols such as FTP, WebDav, Windows share, and SSH. It also supports popular services like Google Drive and Microsoft OneNote, as well as commercial and open source servers that implement the OASIS CMIS standard.
To enable a remote server connection, use one of these methods:
Click on the Remote Files button in the Start Center.
Select File > Open Remote in any open document.
Select File > Save Remote in any open document.
On the Remote Files dialog (Figure 17), click Manage Services / Add Service button in the upper right to open the File Services dialog (Figure 18). Depending on the type of file service you choose in the Type listbox, different parameters are necessary to fully qualify the connection to the remote server.
Figure 17: Remote Files dialog when connected to a server
Once the connection is defined, click OK to connect. The dialog will dim until the connection is established with the server. A dialog asking for the user name and the password may pop up to let you log in the server. Proceed entering your credentials.
The Remote Files dialog (Figure 17) which then appears has many parts. The upper list box contains the list of remote servers you have previously defined. The line below the list box shows the path to access the folder. On the left is the folder structure of the user space in the server. The main pane displays the files in the remote folder. Click the Open or Save button to proceed.
Figure 18: Remote server configuration
To sign a document digitally, you need a personal key, also known as a certificate. A personal key is stored on your computer as a combination of a private key, which must be kept secret, and a public key, which you add to your documents when you sign them. You can get a certificate from a certification authority, which may be a private company or a governmental institution.
When you apply a digital signature to a document, a checksum is computed from the document’s content plus your personal key. The checksum and your public key are stored with the document.
When someone later opens the document on any computer with a recent version of LibreOffice, the program will compute the checksum again and compare it with the stored checksum. If both are the same, the program will signal that you see the original, unchanged document. In addition, the program can show you the public key information from the certificate. You can compare the public key with the public key that is published on the web site of the certificate authority. Whenever someone changes something in the document, this change breaks the digital signature.
For a more detailed description of how to get and manage a certificate, and signature validation, see “Applying Digital Signatures” in the LibreOffice Help.
The following procedure is an example of how to digitally sign a document. The actual procedure depends on how your computer is set up and its operating system.
1) Choose File > Digital Signatures > Digital Signatures.
If you have set LibreOffice to warn you when the document contains comments or recorded changes (see “Using document properties” on page 1), you may see a message box asking whether you want to want to continue signing the document. Click Yes to continue.
If you have not saved the document since the last change, a message box appears. Click Yes twice: once to continue and again to save the file.
2) The Digital Signatures dialog (Figure 19) opens. It lists existing signatures together with their description (if they have any). Click the Sign Document button to add a new signature to the document.
3) In the Select Certificate dialog (Figure 20), select your certificate, add an optional description, and click Sign to return to the Digital Signatures dialog.
The certificate used is displayed in the dialog with an icon next to its name. This icon indicates the status of the digital signature.
4) Click Close in the Digital Signatures dialog to apply the digital signature.
A signed document shows an icon in the status bar. You can double-click the icon to view the certificate. More than one signature can be added to a document.
Changing an existing description invalidates the signature. However, multiple signatures from the same author are allowed, because each signature can have a different description.
Figure 19: Signatures of the document
Figure 20: Signatures can have a description
You can generate a graphic box representing a signature line (Figure 22) and you can optionally sign the signature line using a digital certificate. To open the Signature Line dialog (Figure 21), select Insert > Signature Line on the Menu bar.
Figure 21: Creating a signature line for a document
Figure 22: Signature line example
To open the Properties dialog for a document, go to File > Properties on the Menu bar. The Properties dialog provides information about the document and allows you to set some of its properties. The dialog and its tabs are described below.
Contains basic information about the current file: file name and type; storage location; file size; date, time, and author of file creation and last modification; template used to create the file; date, time, and author of digital signature; date, time, and user name when the file was last printed; total editing time; and revision number.
Controls available:
Change Password – opens a dialog to change the password. It is only active if a password has been set for the file.
Digital Signatures – opens the Digital Signatures dialog where you can manage digital signatures for the current document.
Apply user data – saves the full name of the user with the file. You can edit the name by going to Tools > Options > LibreOffice > User Data on the Menu bar.
Save preview image with this document – saves a thumbnail.png inside the document. These images may be used by a file manager under certain conditions.
Reset Properties – resets the editing time to zero, the creation date to the current date and time, and the version number to 1. The modification and printing dates are also deleted.
Contains optional editable descriptive information about the document, which may be exported as metadata to other file formats.
Title – enter a title for the document.
Subject – enter a subject for the document. You can use a subject to group documents with similar contents.
Keywords – enter the words that you want to use to index the content of the document. Keywords must be separated by commas. A keyword can contain white space characters or semicolons.
Comments – enter comments to help identify the document.
Use this page to assign custom information fields to the document. In a new document, this page may be blank. If the new document is based on a template, this page may contain fields. You can change the name, type, and contents of each row. The information in the fields will be exported as metadata to other file formats.
Click Add Property to add a new custom property. Click Reset to delete all custom properties.
Used for documents stored on remote servers; not shown otherwise. See the Help for more information.
Enables two password-protected security options.
Open file read-only – select to allow this document to be opened only in read-only mode. This file sharing option protects the document against accidental changes. It is still possible to edit a copy of the document and save that copy with the same name as the original.
Record changes – select to require that all changes be recorded. To protect the recording state with a password, click Protect and enter a password. This is similar to Edit > Track Changes > Record on the Menu bar. However, while other users of this document can apply their changes, they cannot disable change recording without knowing the password.
Protect or Unprotect button protects the change recording state with a password. If change recording is protected for the current document, the button is named Unprotect. Click Unprotect and type the correct password to disable the protection.
When Embed fonts in the document is selected, any fonts used in the document will be embedded into the document when it is saved. This may be useful if you are creating a PDF and want to control how it will look on other computer systems.
Only embed fonts that are used in documents – If fonts have been defined for the document (for example, in the template), but have not been used, select this option to not embed them.
Font scripts to embed – You can choose which types of fonts are embedded: Latin, Asian, Complex.
Displays statistics for the current file, such as the number of pages, words, and characters.
Document classification and security are important for businesses and governments. Where sensitive information is exchanged between users and organizations, the parties agree how such information will be identified and handled. LibreOffice provides standardized means for sensitive information to be identified and protected, using a set of standard fields that can be used to hold sensitive information.
LibreOffice implemented the open standards produced by TSCP (Transglobal Secure Collaboration Participation, Inc.). It contains three BAF (Business Authentication Framework) categories: Intellectual Property, National Security and Export Control. Each category has four BAILS (Business Authorization Identification and Labeling Scheme) levels: Non-Business, General Business, Confidential, and Internal Only.
To enable document classification, open the TSCP bar (View > Toolbars > TSCP Classification). This toolbar contains list boxes to help in selecting the security of the document. LibreOffice then adds custom fields in the document properties (File > Properties, Custom Properties tab) to store the classification policy as document metadata.
To prevent a breach in security policy, contents with a higher classification level cannot be pasted into documents with a lower classification level.
You may wish to ensure that personal data, versions, notes, hidden information, or recorded changes are removed from files before you send them to other people or create PDFs from them.
In Tools > Options > LibreOffice > Security, click the Options button to display a dialog where you can set LibreOffice to warn you when files contain certain information and/or automatically remove personal information on saving.
To remove personal and some other data from a file, go to File > Properties. On the General tab, uncheck Apply user data and click the Reset Properties button. This removes any names in the created and modified fields, deletes the modification and printing dates, and resets the editing time to zero, the creation date to the current date and time, and the version number to 1.
To remove version information, either go to File > Versions, select the versions from the list and click Delete; or use File > Save As and save the file with a different name.
You can redact documents to remove or hide sensitive information, to allow the selective disclosure of information in a document while keeping other parts of the document secret. For example, when a document is subpoenaed in a court case, information not specifically relevant to the case at hand is often redacted.
To redact a document:
1) Open the document in LibreOffice.
2) Click Tools > Redact on the Menu bar, and wait for the document to be prepared for redaction and transferred to Draw. The Redaction toolbar (Figure 23) opens.
Figure 23: Redaction toolbar
3) Do the redaction by using the Rectangle Redaction and Freeform Redaction tools on the Redaction toolbar. The shapes will be transparent and in gray so you can see what you are redacting.
4) Optionally use the Export Directly as PDF tool to make an in-redaction copy of the document in PDF to use as a verbatim copy for review. The redacted items will be in transparent gray.
5) To finalize the redaction, select the desired option (black or white) on the Redacted Export tool. The transparent gray shapes are converted to opaque black or white shapes and the document is exported as a pixelized PDF. There will be no selectable text in it, and the redacted content will be non-existent.
To partially automate the redaction process, you can define certain words (such as names) to be redacted wherever they are found in the document. To do this, choose Tools > Auto-Redact on the Menu bar to open the Automatic Redaction dialog (Figure 24). Here you can load a list of terms (targets), add targets, delete targets, edit targets, and save a list of targets.
This feature is not available in Draw.
Figure 24: Automatic Redaction dialog
LibreOffice provides two types of document protection: password protection and OpenPGP encryption. Files encrypted with the Save password option enabled cannot be decrypted without the password, which must be sent to each user who needs to decrypt the document. With OpenPGP encryption, the document is encrypted using an algorithm, which requires a key. Each key is used only once and is sent to the recipient along with the document.
LibreOffice provides two levels of password protection: read-protect (file cannot be viewed without a password) and write-protect (file can be viewed in read-only mode but cannot be changed without a password). Thus you can make the content available for reading by one group of people and for reading and editing by a different group. This behavior is compatible with Microsoft Word file protection. The two levels can also be combined.
Figure 25: Save with password and Encrypt with GPG key options
To protect a document with passwords:
1) Using the Save As command, select the Save with password option in the lower left of the Save As dialog or Save dialog (Figure 25).
2) Click Save and the Set Password dialog opens (Figure 26).
3) In the File Encryption Password section, enter a password to open the document and then enter the same password as confirmation.
4) To restrict who can edit the document, click Options.
5) In the File Sharing Password section, select Open file read-only, enter a password to allow editing, and then enter the same password as confirmation.
6) Click OK and the dialog closes. If the passwords match, the document is saved password-protected. If either pair of passwords do not match, you receive an error message.
Caution
LibreOffice uses a very strong encryption mechanism that makes it almost impossible to recover the contents of a document if you lose or forget the password.
Figure 26: Set Password dialog
When a document is password-protected, you can change the password while the document is open. Go to File > Properties > General on the Menu bar and click the Change Password button. This opens the Set Password dialog where you can enter a new password.
LibreOffice uses the OpenPGP software installed on your computer. If no OpenPGP software is available, you must download and install one suitable for your operating system before you can use this option.
You must define a personal pair of cryptography keys with the OpenPGP application. Refer to the OpenPGP software installed on how to create a pair of keys. For more information on using this form of encryption, see the supplied Help.
OpenPGP encryption requires the use of the public key of the recipient; this key must be available in the OpenPGP key chain stored in your computer.
To encrypt a document:
1) Choose File > Save As,
2) In the Save As dialog, enter a name for the file.
3) Select the Encrypt with GPG key option (see Figure 25).
4) Click Save. The OpenPGP public key selection dialog opens.
5) Choose the public key of the recipient. You can select multiple keys.
6) Click OK to close the dialog and save the file encrypted with the selected public keys.
Note
GPG (GNU Privacy Guard) is an implementation of the Open PGP standard.