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

...konnte eine Datei mit dem MIME-Typ "image/jpeg" nicht konvertieren #31

Open
chrisbonn opened this issue Mar 6, 2023 · 5 comments
Open
Labels
stale Pending without response

Comments

@chrisbonn
Copy link

It is not possible (nextcloud 25) to convert JPG images in the folder, all utilities in my Debian 11 are installed, on other cloud instances I know it does not work either, it does not seem to be due to my configuration.

A maintenance:mimetype:update-js I still did, the package img2pdf is also installed and with unoconv all other conversions run (odt/docx)

Here the error message from the PDF_Document:

Error converting wasserschaden/10_oeffnung_badew
anne_durch_leckage_team.jpg to PDF
Mime-Type
image/jpeg
Error Message
Das Umwandlungsprogramm "Array ( [0] => img2pdf [1] => [fallback] ) " konnte eine
Datei mit dem MIME-Typ "image/jpeg" nicht konvertieren
Trace
#0 /var/www/nextcloud/apps/pdf_downloader/lib/Service/FileSystemWalker.php
(411): OCA\PdfDownloader\Service\AnyToPdf->convertData()
#1 /var/www/nextcloud/apps/pdf_downloader/lib/Service/FileSystemWalker.php
(452): OCA\PdfDownloader\Service\FileSystemWalker->addFilesRecursively()
#2 /var/www/nextcloud/apps/pdf_downloader/lib/Controller/MultiPdfDownloadC
ontroller.php(244): OCA\PdfDownloader\Service\FileSystemWalker->generateDo
wnloadData()
#3 /var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php(225): O
CA\PdfDownloader\Controller\MultiPdfDownloadController->get()
#4 /var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php(133): O
C\AppFramework\Http\Dispatcher->executeController()
#5 /var/www/nextcloud/lib/private/AppFramework/App.php(172): OC\AppFramewo
rk\Http\Dispatcher->dispatch()
#6 /var/www/nextcloud/lib/private/Route/Router.php(298): OC\AppFramework\A
pp::main()
#7 /var/www/nextcloud/lib/base.php(1047): OC\Route\Router->match()
#8 /var/www/nextcloud/index.php(36): OC::handleRequest()
#9 {main}
Powered by TCPDF (www.tcpdf.org)wasserschaden 20/22
Powered by TCPDF (www.tcpdf.org)

@rotdrop
Copy link
Owner

rotdrop commented Mar 14, 2023

Hi there, sorry for not addressing this issue earlier. It could be a "version problem" with img2pdf. I.e. my app maybe assumes a newer version than in particular Debian has installed and uses some features which are not present in that old version. Could you please provide me with the output of img2pdf --version?

And perhaps try to run the following command-line on your server?

img2pdf - --rotation=ifvalid < JPG_INPUT > PDF_OUTPUT

If that "ifvalid" rotation option is not understood I have to leave it out for not up-to-date versions of img2pdf. The fix would be fairly easy to implement (either look at the version of just try another time without that option).

@chrisbonn
Copy link
Author

Hi - hello, I tested and the result is:

img2pdf: error: unrecognized arguments: --rotation=ifvalid

it is version: img2pdf 0.4.0 on Debian bullseye

and on the list of options I can't find a "--rotation=ifvalid", here:

[-h] [-v] [-V] [--gui] [-o out] [-C colorspace] [-D] [--engine engine] [--first-frame-only] [--pillow-limit-break] [--pdfa [PDFA]] [-S LxL] [-s LxL] [-b L[:L]] [-f FIT] [-a]
[--crop-border L[:L]] [--bleed-border L[:L]] [--trim-border L[:L]] [--art-border L[:L]] [--title title] [--author author] [--creator creator] [--producer producer]
[--creationdate creationdate] [--moddate moddate] [--subject subject] [--keywords kw [kw ...]] [--viewer-panes PANES] [--viewer-initial-page NUM] [--viewer-magnification MAG]
[--viewer-page-layout LAYOUT] [--viewer-fit-window] [--viewer-center-window] [--viewer-fullscreen]
[infile ...]

Your app in the Nextcloud is really a very good idea! Thanks for it!

@rotdrop
Copy link
Owner

rotdrop commented Mar 15, 2023

Perhaps the commit a78735a might solve the problem. I have also uploaded a new pre-release to the Github and the NC app store. Perhaps you could give it a try.

The work-around is to check for the version and not add the "--rotation" switch if the installed version is too old. It would probably also be a good idea to augment the checks and notifications for missing helper apps to include supported versions.

@chrisbonn
Copy link
Author

chrisbonn commented Mar 16, 2023 via email

@rotdrop
Copy link
Owner

rotdrop commented Mar 16, 2023

Hi there, can you please have a look if #28 is related and perhaps even provides a solution?

@rotdrop rotdrop added the stale Pending without response label Aug 16, 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