Author Topic: Image(not so)Magick [SOLVED]  (Read 965 times)

0 Members and 1 Guest are viewing this topic.

Offline Keith

  • Hero Member
  • *****
  • Posts: 846
  • Karma: 11
  • Gender: Male
  • Linux Novice
    • View Profile
    • Awards
Image(not so)Magick [SOLVED]
« on: February 08, 2018, 06:45:41 pm »
I used to use ImageMagick quite a lot for changing image file type but now it fails.  Example output is:

keith@T500:~/Desktop/SRP_paper$ convert figure_A.odt figure_A.pdf
mv: cannot stat '/tmp/magick-6157IzrgszU4QNdt.pdf': No such file or directory
convert: delegate failed `"soffice" --headless --convert-to pdf --outdir `dirname "%i"` "%i" 2> "%Z"; mv "%i.pdf" "%o"' @ error/delegate.c/InvokeDelegate/1310.
convert: unable to open image `/tmp/magick-6157HjVpYQjHjWsc': No such file or directory @ error/blob.c/OpenBlob/2712.
convert: unable to open file `/tmp/magick-6157HjVpYQjHjWsc': No such file or directory @ error/constitute.c/ReadImage/540.
convert: no images defined `figure_A.pdf' @ error/convert.c/ConvertImageCommand/3210.
keith@T500:~/Desktop/SRP_paper$ ls /tmp
config-err-4iNf6I          mozilla_keith0
dropbox-antifreeze-oKTxn3  OSL_PIPE_1000_SingleOfficeIPC_f9becb49e6949950453a99477647d7c
gnome-software-CAQ5DZ      qt-trayicon-FW2296.png
gnome-software-DLEXDZ      systemd-private-e7343bee0bfd45b9bcf23191a5d89a94-colord.service-S3xhgA
gnome-software-VQH4DZ      systemd-private-e7343bee0bfd45b9bcf23191a5d89a94-rtkit-daemon.service-6OiJCh
gnome-software-YLWNDZ      systemd-private-e7343bee0bfd45b9bcf23191a5d89a94-systemd-timesyncd.service-C6BKcD
gnome-software-ZTW3DZ      thunderbird_keith
lu3002eoqqh0.tmp
keith@T500:~/Desktop/SRP_paper$


Another weird thing is that there are two instances of ImageMagick in the Applications menu and in the Software Installer.  When I un-installed (via the software installer), the listings in the applications menu disappeared but there were still two in the s/w installer each with two buttons: Remove and Launch.  Re-installing one of them put two instances back into the applications menu - and it still doesn't work. 

Any ideas? 
« Last Edit: May 18, 2018, 10:34:01 pm by Keith »

Offline Mark Greaves (PCNetSpec)

  • Administrator
  • Hero Member
  • *****
  • Posts: 17663
  • Karma: 457
  • Gender: Male
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
    • Awards
Re: Image(not so)Magick
« Reply #1 on: February 08, 2018, 08:06:29 pm »
ImageMagick uses Libreoffice as a delegate for that conversion anyway .. so why not just:
Code: [Select]
soffice --headless --convert-to pdf figure_A.odt
« Last Edit: February 08, 2018, 08:08:22 pm by Mark Greaves (PCNetSpec) »
WARNING: You are logged into reality as 'root'
logging in as 'insane' is the only safe option.
pcnetspec.co.uk

Offline Keith

  • Hero Member
  • *****
  • Posts: 846
  • Karma: 11
  • Gender: Male
  • Linux Novice
    • View Profile
    • Awards
Re: Image(not so)Magick
« Reply #2 on: February 08, 2018, 09:05:21 pm »
Thank you, Mark.

I tried your suggestion and although there was no error, there was no PDF file either. 
I looked for the PDF file using the  "find" command in case it went to another directory, but apparently not. 

Hmmm!

« Last Edit: February 08, 2018, 09:30:52 pm by Keith »

Offline Keith

  • Hero Member
  • *****
  • Posts: 846
  • Karma: 11
  • Gender: Male
  • Linux Novice
    • View Profile
    • Awards
Re: Image(not so)Magick
« Reply #3 on: February 08, 2018, 09:31:25 pm »
But   
Code: [Select]
 unoconv -f pdf mydocument.odt
   does work.
The man pages say:  "convert any document from and to any LibreOffice supported format". 
unoconv can be installed by: 
Code: [Select]
sudo apt install unoconv
Sorry to have troubled you, Mark, but you put me on the right path.  Many thanks for your advice. 

EDIT
........ and I've just realised that I could have simply have "exported" the document as a PDF from within Libreoffice! 
« Last Edit: February 08, 2018, 09:47:29 pm by Keith »

 


SimplePortal 2.3.3 © 2008-2010, SimplePortal