Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fallback convertor #37

Open
yward opened this issue Apr 7, 2023 · 1 comment
Open

Fallback convertor #37

yward opened this issue Apr 7, 2023 · 1 comment
Labels
stale Pending without response

Comments

@yward
Copy link

yward commented Apr 7, 2023

Hello Rotdrop,
Thank you so much for the great app!

I am having an issue with the fallback convertor unoconv as it fails to convert any Libreoffice files.

The approach I am trying to do now, is to use a different convertor which is the built-in libreoffice headless convertor which can be accessed as follows:
libreoffice --headless --convert-to pdf filename.odt

What do I need to enter in your fallback convertor field to call the above script?
Any variable I should replace the filename with?

I appreciate your assistance in advance!

@rotdrop
Copy link
Owner

rotdrop commented Apr 11, 2023

Hi,

there is an example pass-through converter script at

https://github.com/rotdrop/nextcloud-app-pdf-downloader/blob/main/contrib/converter-example.sh

The script simply uses cat to copy PDF-data from stdin to stdout. So: input data is received on stdin, output data is expected at stdout. This means that you probably have to fill some lines of code which generates temporary files (not sure whether libreoffice --headless ... can be convinced to directly read and write stdin/stdout.

Perhaps it would be a good idea to first try the script as-is and plug it into the "universal converter" admin-setting in order to check if the machinery works as expected. This feature is not well tested.

@rotdrop rotdrop added the stale Pending without response label Aug 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale Pending without response
Projects
None yet
Development

No branches or pull requests

2 participants