Viewer 1.06 (PDFRenderV) - Installation
=======================================

A fast native document previewer for RISC OS 5: PDF, JPEG, PNG,
Draw, BMP, GIF, TIFF, Photoshop, ArtWorks, Impression and Ovation,
all in one window with zoom, text selection and printing.  Sprite
files open if handed to it; Paint keeps the double-click.

Copyright (c) Martin Hiher and RISC OS Developments Ltd 2026.
Licensed under the CDDL 1.0 - see LICENSE.


What is in this archive
-----------------------

  !Viewer            the application directory - this is all you
                     need to install
      !Boot          loads the module and claims the filetypes
      !Run           starts the viewer
      PDFRenderV     the module (engine, SWIs, *Commands)
      Viewer         the desktop window and toolbar
  PreDesk            SpriteExtend 2.00 - not loaded by !Viewer;
                     copy it into Boot:Choices.Boot.PreDesk if you
                     want it at boot
  Install            this file
  ReadMe             overview, SWI reference, design notes
  LICENSE            CDDL 1.0


Requirements
------------

  * RISC OS 5.  Developed and tested on 5.31; nothing here needs a
    call newer than RISC OS 3.5, so earlier RO5 releases should be
    fine, but they have not been tried.
  * SpriteExtend 2.00 is in PreDesk/ in this archive (optional).
    Copy that module into Boot:Choices.Boot.PreDesk if you want it
    loaded at boot.  !Viewer does not RMLoad it.

Nothing else is needed.  Everything else - PDF parsing, PNG, JPEG
2000, fonts, printing - is in the module.


Installing
----------

  1. Copy !Viewer to a directory the boot sequence scans.

     The usual place is  Boot:^.Apps  (open Configure > Boot >
     Look at to see or add directories).  Any of these will do:

        SDFS::RISCOSpi.$.Apps
        ADFS::HardDisc4.$.Apps
        Boot:^.Apps

  2. Open that directory once, or reboot.

That is all.  There is nothing to type at the command line.

Opening the directory makes the Filer run !Boot, which loads the
module and claims the filetypes.  From then on, double-clicking a
supported file opens it in the viewer - the
application itself does not need to be running first.

If you prefer to keep it somewhere the boot sequence does not scan,
double-click !Viewer once per session instead, or add

    Run <path>.!Viewer.!Boot

to your boot Obey file.


Which filetypes it takes over
-----------------------------

By default: PDF (&ADF), JPEG (&C85), PNG (&B60), Draw (&AFF),
BMP (&69C), GIF (&695), TIFF (&FF0), Photoshop (&1B0),
ArtWorks (&D94), Impression (&BC5), Ovation Pro (&B27),
Ovation (&CDD), DDF (&D93) and DDL (&B25).  Sprite (&FF9)
is left for Paint.

To keep an existing application on a type, set PDFRenderV$Claim
before !Boot runs - list only the types you want:

    Set PDFRenderV$Claim ADF,C85,B60          | leave Paint and Draw alone
    Set PDFRenderV$Claim ADF                  | PDFs only

An application booted after ours can take a type back (ChangeFSI
claims JPEG, for instance).  PDFRenderV re-claims when the desktop
starts, and

    *PDFClaim

re-asserts them at any time.  Killing the module hands every claimed
type back, and only if the alias still points at our viewer - so it
never strands a filetype.


Using it
--------

Double-click any supported file.  The toolbar is

    [<] [n/N] [>]   [-] [zoom%] [+]   [Print]

and it sits in the window's bottom scroll bar, sharing that row with
it - the scroll bar is shortened to fit alongside.

Zoom is 25-400%.  Printing goes through PDriver as vectors, not as a
bitmap, so it prints at the printer's resolution.

On a PDF, the Menu button over the page offers Copy, Select all and
Save text; text can be selected by dragging.

Double-clicking !Viewer itself, rather than a document, puts it on the
left of the icon bar next to the Apps icon.  Documents dropped on that
icon open in a window; Menu over it gives Info and Quit.  A document
opened by double-clicking gets a window of its own and does not add a
second icon.


Command line
------------

    *PDFInfo <pdffile>
        version, page count and page sizes

    *PDFToSprite <pdf> <page> <spritefile> [<width px>]
        render one page to a 32bpp sprite file (default 1000px wide)

    *PDFText <pdffile> <page> [<textfile>]
        extract the text of a page

    *PDFClaim
        re-assert the filetype claims

    *PDFRenderVOpen <pdffile>
        open a file in the desktop viewer - this is what the filetype
        alias runs, so you rarely need it by hand


Removing it
-----------

    *RMKill PDFRenderV

then delete the !Viewer directory.  The filetypes go back to
whatever had them before.


Known limitations in 1.06
-------------------------

  * Encrypted PDFs open normally when no password is set on
    them (the usual case - the encryption restricts printing
    or copying rather than access).  One that really needs a
    password is refused: entering one is not implemented.
  * Embedded font programs are not rasterised - the standard-14
    fonts are mapped to their RISC OS metric equivalents (Homerton,
    Trinity, Corpus), so text is anti-aliased and correctly spaced,
    but an unusual embedded face will not look identical.
  * No transparency groups or luminosity soft masks, so a highlight
    annotation drawn as an opaque fill can cover the text under it.
  * Shadings and patterns are skipped or drawn grey.
  * CCITT and JBIG2 images are not decoded.


Support
-------

    https://github.com/macpato82/PDFRenderV
