Is it possible to export odp / ppt slides as images using unoconv?
For example,
unoconv -f png presentation.ppt
But this unoconv command converts only the first slide as a png file. Is it possible to export all slides as individual images, say, 001.png, 002.png, 003.png using unoconv on the command line?
If not, could you suggest a simple bash script to go over slide by slide in the odp / ppt file to convert to images?
Thanks.
One way to do this is to first convert it to PDF, and then use Ghostscript to convert to PNG files. The following works for me:
unoconv -f pdf presentation.ppt
gs -sOutputFile=presentation-%03d.png -dNOPAUSE -dSAFER -sDEVICE=png16m \
-dBATCH -q -r300 -dGraphicsAlphaBits=4 -dTextAlphaBits=4 presentation.pdf
(The -r300 parameter says to create 300 pixels-per-inch PNG files - you may want to adjust that.)
You can covert the PPT file to HTML:
unoconv -o image/ -f html SinoProbe_02_02_001.ppt
Then the image folder will fill with HTML and JPG files.
I just tested the Export as Images extension for Open Office v4.1.1 on Windows 7. Worked GREAT. I had more control over the graphics size etc than when exporting to HTML and using the included files.
http://extensions.services.openoffice.org/en/project/export-images
Related
I have a bunch of base64 encoded images which I want to convert to their corresponding image files using magick (ImageMagick version 7). I can paste the base64 directly into various online converters which works. But command-line magick is failing.
Example of a file is attached in "x.txt". Pasting it into an online converter like https://onlinejpgtools.com/convert-base64-to-jpg readily yields an image. But this command line fails:
magick inline:`cat x.txt` x.png
This says "magick: corrupt image". If I remove the "inline" part, I get "magick: unable to open image". Here is a link to download the sample file x.txt:
In Imagemagick, try (no cat). That works for me.
magick inline:x.txt x.png
Or pipe from cat to magick as
cat tmp.txt | magick inline:- y.png
I'd like to convert a slidy presentation to powerpoint. I tried using pandoc:
pandoc -f html+tex_math_dollars+tex_math_single_backslash test.html -o test.pptx
Does create a powerpoint file, but the file doesn't have separate slides, all the text is one slide, probably because the above command doesn't tell pandoc to recognize that the html is slidy.
I found commands for pandoc to convert TO slidy but nothing about converting FROM slidy.
Trying to play with ImageMagick to read scanned PDF texts, but at the point to convert the PDF to image, I've got this error, where it shows "no decode delegate for this image format `PDF' # error/constitute.c/ReadImage/504". Been search for this solution for hours to no avail, need some help here.
OS: Windows 7 x64
ImageMagick Version: ImageMagick-6.9.8-10-Q16-x86-dll.exe
convert -list format
shows below output
Format Module Mode Description
-------------------------------------------
* native blob support
r read support
w write support
+ support for multiple images
Looks like your delegates are not properly configured,
Once Ghostscript is installed make sure the binary folder C:\Program Files/gs/gs3.0.9/bin is added to your path.
Once Done, there should be a file names delegates.mgk in you graphics magick home directory. Open that file in a text editor.
<delegate decode="pdf" encode="eps" mode="bi" command='"#PSDelegate#" -q -dBATCH -dSAFER -dMaxBitmap=50000000 -dNOPAUSE -sDEVICE=#GSEPSDevice# "-sOutputFile=%o" -- "%i" -c quit' />
In the whole file, find and replace #PSDelegate# with gswin64c and it should get the job done.
i have a problem with ghostscript, Times New Roman and pdf.
My System:
OS: Mac 10.11.6
Ghostscript: 9.21
I want to scale my pdf with following code in terminal:
gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dDownsampleColorImages=true \ -dColorImageResolution=150 -dNOPAUSE -dBATCH -sOutputFile=output.pdf input.pdf
Now i have problems with the font Times New Roman.
In the Output.pdf the textline "Unabhängige Heimatzeitung" is broken, if you open the pdf in Safari or in Mac Quick View.
Here is the Link to the input.pdf
input.pdf
Here is the Link to the putput.pdf
output.pdf
Can anyone help me?
Many thanks in advance!
It does seem that there is some problem with the PDF. Acrobat preflight reports syntax errors.
You might try a different method: produce PostScript of the PDF, then run that through GS.
Or create (or download) Quartz Filters for OS X using ColorSync Utility to reduce the size of the PDF, and apply the filter to the original PDF.
I m converting a pdf into image using ghostscript
It almost produces good images but for one pdf the created image is having a white strip
however this strip is not present in the original pdf.
script which i hv used is below
gs -dNOPAUSE -sDEVICE=jpeg -dFirstPage=1 -dLastPage=2 -dTextAlphaBits=4 -dGraphicsAlphaBits=4 -sOutputFile=fileName.gif -dJPEGQ=100 -r300 -q pdfName.pdf -c quit
Here the created image http://www.pictureshack.us/images/65486_1.gif
i am using Ghostscript 8.70 and the issue is fixed for the latest update i.e 9.06, but i cant upgrade to this...moreover found the issue its due -r300, so when i specify resolution of 100 then it works fine for this pdf but not for many other pdf...
You don't say what version of Ghostscript you are using, and you haven't provided the original PDF file, so I can't test it on current code. However, this 'looks like' a transparency bug, and may well be fixed in recent versions of Ghostscript.
I would suggest you upgrade to 9.06 if you haven't already and try that. If the problem persists please open a bug report at http://bugs.ghostscript.com Please attach the original PDF file and the command line you are using.