Export to Word or PDF with private files has no images

Created on 6 October 2023, about 1 year ago
Updated 9 September 2024, 2 months ago

Problem/Motivation

When configuring Drupal to use the private filesystem, instead of public, images will not appear in the exported Word or PDF file from CKEditor 5 Premium. This is due to the file's images being created to reference URLs which must be publicly accessible. What about sites that must secure all their uploaded files with the private filesystem setting for security reasons?

Base64 encoding works on importing, but we found it to be unacceptable from a page load performance issue. Our current configuration on importing from Word uploads the images to the filesystem, which is great. Is there a way to export them too on Word and PDF generation? At the very least could they be Base64 encoded on export to Word or PDF? If both are options, could it be a configuration in the admin interface to choose Base64 or file importing/exporting? Thanks for considering!

✨ Feature request
Status

Fixed

Version

1.2

Component

Plugin: Export to Word

Created by

πŸ‡ΊπŸ‡ΈUnited States phpforfree

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @phpforfree
  • πŸ‡΅πŸ‡±Poland salmonek

    Hi @phpforfree

    For images that are saved in private filesystem a base64 seems to be only option. Exports are processed on cloud/on-premise server so it have to have an access to the linked images.
    It looks like we are able to write a CKEditor plugin that will alter editor data by converting images to base64 before data is sent for export.

    Thank you for your suggestion, we should be able to work on this soon, I'll notify when we'll have solution ready.

  • πŸ‡΅πŸ‡±Poland salmonek

    @phpforfree

    We have released version 1.2.3 which allows to convert images to base64 on export. The setting is abailable in text format configuration in Export to PDF/Word tab:

    There are unfortunately some limits on filesize that cloud can process - as far as I remember ~20 MB which sholud be raised in future.

    Recently export plugins started to support access headers. We'll be working on support for this feature in the module. I'll keep you posted once we have it ready.

  • Status changed to Fixed 3 months ago
  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.71.5 2024