# PDF - Export

Spec related test of PDF-export``

### Test description:

### There are four ways to export to PDF:

- From the Function bar -> direct export without the option dialog.

- From Menu File – Export...

- From Menu File – Export as PDF...

- From Menu File – Send – Document as PDF Attachment

> Enable the „StarOffice dialogs“ under Menu Tools -> Options -> StarOffice -> General!

> The export to PDF operates in the background so the user can't see the process, only the progress in the status bar.
> The result can only checked with an external program like acroreader.

- Create a writer document with several pages or open any file.

- Click on the "Export Directly as PDF"-button on the Function bar.
  Save as dialog will appear and the title of the dialog shows “Export as PDF”.
  Give a name and click on the Export button.

- Open the exported file with Acrobat-Reader and compare the document.

- Export the same document to PDF over the Menu – File – Export as PDF.

- If you choose the same file name for the PDF file, a warning should popup about overwriting the existing file.

- After clicking on Export the Options dialog should appear. !The range between the options- and Save as-Dialog will changed! (OOo issue 13154).

- The PDF options dialog is persistent. The last settings should be the same on next call.

### PDF-Options - General

- Test this section (TabPage General) 3 times to test all options about the page ranges.

  - Export once all pages of the document. (default)
    Compare the result with Acrobat-Reader.

- Export a document with 5 pages as example with page 1, 3 and 5.
  Type in the field for pages: 1;3;5
  So you should get the 3 pages as an PDF-file. Compare with Acrobat-Reader whether the right pages are exported.

- Export several paragraphs as one PDF-file:
  Select several paragraphs with pressed Ctrl-key over more pages.
  Select at the Options dialog Selection.
  Compare the result with Acrobat-Reader.
  You should get a PDF file with only your selected Paragraphs or words.

- For the further test, use a document with images to test the image quality options.

  - Export once with lossless compression

  - Export several with JPEG (default) compression by playing with the quality (default = 90%) radio button to see the effect on exported document.

  - Export document with reduced image resolution (default = unchecked) with all given values
    For this test you should insert a Bitmap with 300 dpi to see the difference by exporting to PDF.
    Compare the size of the PDF-files with a file manager.
    The file with 75DPI should have the smallest and the 300DPI should have the biggest size.
    If you have a bitmap with 1200DPI, you can test all ranges

- Small introduction about the General options

  - Tagged PDF will export special tags into the corresponding PDF tags. Useful for PDA's.
    Disadvantage: File size increase.

  - Export notes: If the document include notes, they will be also included to the exported PDF-Document.

  - Use transition effects will be enabled to export Impress slide transition effect to respective PDF effects.

NOTE: The next options are providing together over 50 possibilities to export a PDF document. They are added to improve the PDF-Export.
See the specification: http://specs.openoffice.org/appwide/pdf_export/PDFExportDialog.odt

### PDF-Options – Initial View

- Panes

  - Page only

- Bookmarks and page

- Thumbnails and page

- Magnification

  - Default

  - Fit in window

  - Fit width

  - Fit visible

- Page layout

  - Default

  - Single Page

  - Continuos

  - Continuos facing
    NOTE: „First page is left“ will be visible, if CTL (complex text layout) is enabled under Tools – Options... - Language Settings – Languages. Use it to set the first page on the left side of the screen.
    For more details please see point 1.3 at the spec: http://specs.openoffice.org/appwide/pdf_export/PDFExportDialog.odt

### PDF-Options – User Interface

- Window options

  - Resize window to initial page – Adjust window to the first page.

  - Center window on screen – The PDF viewer window is centered to the screen when the PDF document is opened.

  - Open in full screen mode - The PDF viewer window should opened full screen when the document is opened.

- Display document title - Specifies that the title of the document, if present in the document properties, is displayed in the PDF viewer window title bar

- User interface options

  - Hide menubar - Hides the PDF viewer menubar from opened document.

  - Hide toolbar - Hides the PDF viewer toolbar from opened document.

  - Hide window controls - Hides the PDF viewer controls from opened document.

### PDF-Options – Security

A PDF file can be encrypted to protect its content from unauthorized access in several ways.

The protection can be set by two passwords which are not interdependent. We can see it as two access level like owner and user access.
Following descriptions are reproducible with the Adobe Reader 7.0.
Another PDF-Reader may have other ways to reach the same.

Adobe Reader 7.0 has two levels of security properties.
One of them shows what is allowed and possible with the Adobe Reader. And that can only be Filling of form fields (Second column at the table)
The second and deeper step: Menu File – Document Properties... – Security – Show Details...
Here you can see what you could do if you would have Adobe Acrobat Standard or Professional or another real PDF editor (Third column at the table).

- Encrypt the PDF document (User password)

  - Export a document to PDF and give a password

  - Open the exported PDF with an PDF reader
    - A dialog to enter the password should pop up
    - It should not possible to open the PDF document without the correct password
    - Uppercase and lowercase must match, else the PDF document can't opened
    - As long as restrict permission is not set, this 'user' password is enough for all kind of permissions.

- Restrict permissions (Owner password)

  - This section has the same rules about password handling like above

  - The radio buttons will only enabled, when restrict password is set.

    - Printing

    - Create a PDF document and set the printing section to 'Not permitted'

    - Open it with a PDF reader and check whether you are able to print
      - It should not possible.
      The current state of printing should also the same at the document properties – security page.

    - Repeat the step and select this time low or high resolution
      - The print should be permitted without password. The print will proceed with the given setting.

      The different result between high and low resolution is not visible for normal usage
      - Check the resolution settings with the Adobe Reader at the document's properties – security – details
      Menu File – Document Properties... – Security – Show Details... (Adobe Reader 7.0)

- Changes
  Example:

- Export to PDF with no permissions, select Not permitted

- Open file in Adobe Reader and go to document properties- security
  - Document Restrictions Summary should show all permissions as Not Allowed

  For further investigation use the table below to compare the exported results.

Selected permission | Allowed at security summary Properties | Allowed at Document Security Details
--- | --- | ---
Not permitted | Nothing allowed | Nothing allowed
Inserting deleting and rotating pages | Nothing Allowed | - Document Assembly
Filling in form fields | - Filling of form fields | - Form Field Fill-in or Signed
Commenting filling in form fields | - Filling of form fields | - Commenting - Form Field Fill-in or Signed
Any except extracting pages | - Filling of form fields | - Changing the Document - Commenting - Form Field Fill-in or Signed - Document Assembly
Enable copying of content | - Content Copying or Extraction - Content Extraction for Accessibility | - Content Copying or Extraction - Content Accessibility Enabled
Enable text access for accessibility tools | - Content Extraction for Accessibility | - Content Accessibility Enabled

Note:

The Security pane behaves a little different than the other PDF Export panes. Not all settings are kept for later use.

Encrypting and Restrict permissions are always unmarked if the PDF Export dialog comes up.

Both passwords are always empty when the dialog comes up. The passwords need to be entered each time for encryption or restricting the permissions.

All other settings are kept in the configuration for a future use of the dialog.