The LCP DRM protects different types of publications, namely EPUB, PDF, W3C Audiobooks and Readium Packages (RPF format). In this article we will focus on the protection of PDF files.

Submitting a PDF file for encryption

A PDF file is encrypted using the LCP Encryption Tool.

For detailed information about the LCP Encryption Tool, see this page.

The technology works by encrypting a PDF file using the AES-256 algorithm, inserting the resulting file in a zip archive along with an optional cover image and a JSON manifest which adds metadata to the package. The resulting file is a Readium Package with a unique PDF file in its reading order.

For more information about Readium Packages containing an encrypted PDF, see this page.

If a standalone PDF is submitted to the LCP Encryption Tool, the resulting JSON manifest will be minimal, and no cover image will be generated. But if a Readium Package containing the PDF file, metadata and a cover image is submitted to the LCP encryption Tool (with the extension .webpub for now), then the metadata and cover image will be still present in the resulting Readium Package and correctly processed by compliant reading applications.

For more information about Readium Packages, see this page.

Generating LCP licenses

The provider of encrypted PDF publications can then generate standard LCP licenses triggering access to the encrypted package.

Note: An LCP license is a small file which contains access rights (essentially a start and end date of access to the content), and hidden information on how the package can be decrypted.

For more information about LCP Licenses, see the specification.

LCP licenses are sent to their users and can be processed by any LCP enabled reading application, on a PC (Windows or Linux), Mac, tablet or smartphone.

LCP licenses cannot be processed by Adobe software (e.g. Acrobat Reader), therefore LCP protected PDF files are only read by Readium LCP compliant software.

As for any other type of publication, if the user can enter the passphrase (i.e. password with optional spaces) associated with the license, the reading application downloads the encrypted package, stores it locally (still encrypted), and gives access to the content at will for reading purpose, until the license “end date”. And as usual the passphrase must only be entered once (it is then cached by the reading application).

LCP protected PDF in Readium Mobile

The Readium Mobile toolkits (iOS and Android) both support LCP Protected PDF (and PDF with no protection).
The PDF content is decrypted by the toolkit before it is provided to the PDF viewer module embedded in the application. Therefore, by principle, any PDF viewer module (freeware or commercial) can process PDF content in a reading application.

Android integration

The Readium Kotlin toolkit provides pdfium as a default PDF viewer.

For more information about the open-source pdfium project, see this page.

This free viewer is not effective for large PDF files, and PDF comics are quite large. Therefore, large PDF files (more than 40 MB) are crashing the app if pdfium is used, which is bad for users.

Therefore, a recent evolution of the Kotlin toolkit allows the alternate use of commercial PDF viewers in a Readium based application, and especially the use of PSPDFKit for which an adapter is now provided.

For more information about the integration of PSPDFKit, see this guide.
(change « develop » for « main » in the url if you cannot reach this document).
See also the original pull request on GitHub.

iOS integration

iOS development tools provide a native PDF viewer module named PDFKit.

For more information about PDFKit, see this page.

There is no specific limitation with this viewer, but an adapter for PSPDFKit will be provided in the future, which will provide extended functionalities (like highlights).

LCP protected PDF in Readium Desktop

The Readium Desktop toolkit (Windows, Mac & Linux), and the Thorium Reader application, which is based on Readium Desktop, support LCP Protected PDF (and PDF with no protection).

The PDF implementation is based on the use of the free PDF.js viewer.

This free viewer supports large PDF without crashing, but its performance goes down when the size of the PDF goes up too much.

Therefore, reading large comic books on a low CPU hardware is not optimum: in this case fixed layout EPUB is largely preferred (and much more accessible).

Navigating PDF files

The Readium Mobile toolkits support the following features when a PDF document is open:
–       Processing of the table of contents
–       Extraction of the first page as a cover image (if the PDF is not encrypted)
–       Scrolled view / paginated view
–       Double page spread
–       Left to right / right to Left
–       Display of the page number
–       Go to Page
–       Pinch to zoom
–       Bookmarks.

The Readium Desktop toolkit (and Thorium) supports the following features when a PDF document is open:
–       Processing of the table of contents
–       Scrolled view / paginated view
–       Double page spread
–       Go to Page
–       Zoom
–       Bookmarks
–       Text Search.

Future

There is an open discussion between Readium Core developers about the interest of creating a more powerful “PDF profile” for Readium Packages, in which a package can handle multiple PDF resources (e.g. one per page) and a landmark referencing the body matter.
Budget will be necessary to upgrade the different parts of the open-source Readium software if a positive decision is taken.

For more information about this discussion, see this page.

0 Comments

Leave a reply

Your email address will not be published. Required fields are marked *

*

Copyright © 2023 EDRLab. Legal informations

Log in with your credentials

Forgot your details?