Can't create PDFs

Problem that I am struggling with - creating PDFs with certain apps

Specifically, I have ‘Nextcloud Office’ with ‘Collabora Online - Built-in CODE Server’. Save-As operation for documents does not work. This includes not just PDFs, but also save-as to .txt, .rtf, etc.

Error ‘Failed to convert file: The file could not be converted.’ is returned.

Here’s what log file return when attempting to save-as to pdf:

richdocuments ClientExceptionClient error: POST https://test.com/apps/richdocumentscode/proxy.php?req=/cool/convert-to/pdf resulted in a 403 Forbidden responseFailed to convert preview: Client error: POST https://test.com/apps/richdocumentscode/proxy.php?req=/cool/convert-to/pdf resulted in a 403 Forbidden response

Otherwise ‘Nextcloud Office’ with ‘Collabora Online - Built-in CODE Server’ work as expected, I haven’t seen any other obvious errors with it.

Also, I have ‘Workflow external scripts’ app that has PDF conversion flow based on trigger event.

Logs suggest that the flow gets activated as defined by the rules, but terminates with this error:

workflow_pdf_converter could not convert /admin_user/files/74765767.odt, reason: []

However, I have ‘LibreSign’ app (signs pdf doc & creates new pdf with signature) - it does work and create new pdf (!)

Also, I have ‘Zipper’ app that adds content menu command that creates archive in background for selected files - this works.

So it looks like chmod/chown is not really an issue on my server.

What I tried so far:
Checked for proper chown & chmod - seem not to be an issue, even 777 on entire subdomain where nextcloud is deployed
Disabled cloudflare proxy
Switched php from 8.3 to 8.1
Disabled NextCloud encryption

Environment:
Fresh installation on Ubuntu 22.04, php 8.3 in FastCGI mode, latest Nextcloud 31.02, NextCloud office 8.6.3, Collabora Online 24.4.1302.

No upgrade history.

Really struggling here, any hints & help are appreciated

Thank you!

Hi

For the Collabora problem did you try to use the proper collabora packages and install the server on your machine and interface with a proxy ? it’s the best way to use it and lot more efficient (have done that for my customers and it works a lot botter, it’s a little of work to setup but then it works perfect !).

For the workflow problem you have to share the nextcloud log extract at that time to see what is really the whole problem !

Vincèn

Hi Vincen,

Thanks for suggestion. I decided to follow you advise and installed a standalone Collabora server, on the same VPS. That introduced another set of challenges, but eventually I managed to connect NextCloud with Collabora and to open office files succesfully.

Yet PDFs (and other Save-As formats) are still not generated (from right-click context menu from the Files app).

These are the same errors as with build-in server.

files ClientExceptionClient error: POST https://office.test.com/cool/convert-to/pdf resulted in a 403 Forbidden response

richdocument ClientExceptionClient error: POST https://office.test.com/cool/convert-to/pdf resulted in a 403 Forbidden response

Does this conversion takes place on NextCloud or Collabora side?

I’m lost

how did you install it ? using the packages supplied by Collabora for linux distro used on your VPS ?

Be more precise please as you were speaking in your first message of PDF export in Collabora and now you speak about PDF export from file app in Nextcloud.
If you try to do it by right click in the file app of Nextcloud it means you installed something to do it as it’s not part of standard behaviour of Nextcloud. What is that app ? Is it well configured ?

Vincen,

Collabora server is running within Docker on my VPS. I configured dedicated subdomain for Collabora, configured reverse proxy. It is operating fine.

I’m referring to this command - Save-As command on a document from Files app. Neither of these formats conversions work.

This is what I get in logs

files ClientExceptionClient error: POST https://office.test.com/cool/convert-to/pdf resulted in a 403 Forbidden response

richdocument ClientExceptionClient error: POST https://office.test.com/cool/convert-to/pdf resulted in a 403 Forbidden response

office.test.com – this is a dedicated subdomain for Collabora server. Not Nextcloud subdomain.

I seen the same errors when Collabora was running in built-in CODE mode (then in these error messages subdomain was of Nextcloud instance).

However, when document is opened in Collabora, FIle > Download > works. But this downloads PDF to local file system.

My objective is to convert documents into PDF is place them immediately on the NextCloud

Nextcloud 31.02, NextCloud office 8.6.3, Collabora Online 24.4.1302.

This is my Administration > Overview check window

@U284818 As previously stated the Save as PDF is not a standard option of Nextcloud so you have to find out which app you installed that create that entry. It’s the only way to be able to find perhaps a solution !
You also need to fix all errors listed in the Administration menu.
Last point you can export in PDF straight from Collabora Online: File → Export as PDF and the PDF is by default created in same directory as the file opened in Collabora :wink:

Hi, im running into the same error as @U284818 does. the app of the context menu is “nextcloud office”.

Nextcloud Version: 31.0.6
Docker Installation.
All works well, no errors.

installed apps:
Enabled:

  • activity: 4.0.0
  • app_api: 5.0.2
  • bookmarks: 15.1.0
  • breezedark: 29.0.0
  • bruteforcesettings: 4.0.0
  • circles: 31.0.0
  • cloud_federation_api: 1.14.0
  • comments: 1.21.0
  • contactsinteraction: 1.12.0
  • cookbook: 0.11.3
  • dashboard: 7.11.0
  • dav: 1.33.0
  • duplicatefinder: 1.7.3
  • epubviewer: 1.8.0
  • external: 6.0.2
  • federatedfilesharing: 1.21.0
  • federation: 1.21.0
  • files: 2.3.1
  • files_downloadlimit: 4.0.0
  • files_external: 1.23.0
  • files_pdfviewer: 4.0.0
  • files_reminders: 1.4.0
  • files_sharing: 1.23.1
  • files_trashbin: 1.21.0
  • files_versions: 1.24.0
  • firstrunwizard: 4.0.0
  • logreader: 4.0.0
  • lookup_server_connector: 1.19.0
  • music: 2.2.0
  • nextcloud_announcements: 3.0.0
  • notes: 4.12.1
  • notifications: 4.0.0
  • oauth2: 1.19.1
  • password_policy: 3.0.0
  • photos: 4.0.0-dev.1
  • polls: 7.4.4
  • previewgenerator: 5.8.0
  • privacy: 3.0.0
  • profile: 1.0.0
  • provisioning_api: 1.21.0
  • recognize: 9.0.1
  • recommendations: 4.0.0
  • related_resources: 2.0.0
  • richdocuments: 8.7.1
  • richdocumentscode: 25.4.202
  • serverinfo: 3.0.0
  • settings: 1.14.0
  • sharebymail: 1.21.0
  • spreed: 21.1.0
  • suspicious_login: 9.0.1
  • systemtags: 1.21.1
  • text: 5.0.0
  • theming: 2.6.1
  • twofactor_backupcodes: 1.20.0
  • updatenotification: 1.21.0
  • user_status: 1.11.0
  • viewer: 4.0.0
  • weather_status: 1.11.0
  • webhook_listeners: 1.2.0
  • workflowengine: 2.13.0
    Disabled:
  • admin_audit: 1.21.0
  • encryption: 2.19.0
  • forms: 5.1.0 (installed 5.1.0)
  • keeweb: 0.6.21 (installed 0.6.21)
  • support: 3.0.0 (installed 1.3.0)
  • survey_client: 3.0.0 (installed 1.16.0)
  • twofactor_nextcloud_notification: 5.0.0
  • twofactor_totp: 13.0.0-dev.0
  • user_ldap: 1.22.0