I have an error converting some pdf files, it is:
Internal Error: File Offset wrong for ttf table (name-data), -1 expected 174
Save Failed
Cannot save font to C:\Users\test\AppData\Local\Temp//pdf2htmlEX-a14136/__tmp_font1.ttf
I'm using Windows last executable:
pdf2htmlEX version 0.14.6
Libraries:
poppler 0.33.0
libfontforge 20150621
cairo 1.12.18
Supported image format: png jpg svg
I'm testing it and fails at page 76 but if I change pages order, it still fails at page 76, even if I remove it from file.
It's fails even with command:
pdf2htmlEx test.pdf
And testing to split it into files of 10 pages for example, it works OK... but I can't use it, I need to convert full pdf.
Related
I'm trying to reorient some images with fslreorient2std in an Ubuntu 20.4 shell running on Windows 10. I've installed WSL2 and FSL. When I run the command fslreorient2std in a directory where there is the image file (.nii), the following error message appear:
ERROR: Could not find image ws44891-153636-00001-00192-1.nii
See also below.
$ ls
ws44891-153636-00001-00192-1.nii
$fslreorient2std ws44891-153636-00001-00192-1.nii ws44891-153636-00001-00192-1_reorient.nii
ERROR: Could not find image ws44891-153636-00001-00192-1.nii
I tried to download test images in other formats or test other .nii images I have, and the error is always the same.
I'd be grateful for any help, thank you !
On trying to invoke imshowpair or montage I get
error: could not find any INDEX file in directory E:\Octave\share\octave\packages\image-2.8.0,
try pkg rebuild all to generate missing INDEX files
error: called from
describe>parse_pkg_idx at line 94 column 5
describe at line 59 column 39
pkg at line 566 column 41
__unimplemented__>check_package at line 519 column 13
__unimplemented__ at line 321 column 11
Can't quite seem to figure out what is causing this. Other image functions like imread and imshow work fine. pkg rebuild all does not fix anything.
This is Octave 4.4.1 on Windows 10.
By the error, it seems that the package folder is there, but not the contents, so you may need to reinstall the image package:
pkg install -forge image
(Sometimes it takes a while as it generates document cache)
After it is installed, don't forget to load the package:
pkg load image
There is a new version 2.8.1 out from 19-Nov-2018, but it does not currently contain a version of imshowpair.
Question:
How can I convert ipynb files to PDF if they have headings? I can't make it with the normal command.
Why I ask so:
I've been searching info for many days to get over this problem but I resign and ask it in here. I'm running iPython notebook (with python 3.4) on Windows 8.1 and when I use the command:
ipython nbconvert my file.ipynb --to latex --post PDF
to convert my notebooks to pdf it only works when my file has no headings. If I have the same file and I don't write any heading it works smoothly but the problem comes when I have to put one. It can't even convert the notebook to anything (not HTML, not just LaTeX format...).
My LaTeX distribution is working fine, I can make .tex documents with headings and so on... but the trouble is when I use the nbconvert to make PDF files with headings.
The error it throws is so long so here I paste the first section of it:
[NbConvertApp] Using existing profile dir: 'C:\\Users\\Me\\.ipython\\profile_default'
[NbConvertApp] Converting notebook headers.ipynb to latex
[NbConvertApp] Support files will be in headers_files\
[NbConvertApp] Loaded template article.tplx
Traceback (most recent call last):
File "C:\Program Files (x86)\Anaconda 3\lib\site-packages\IPython\utils\_process_win32.py", line 76, in _find_cmd
from win32api import SearchPath
ImportError: No module named 'win32api'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Program Files (x86)\Anaconda 3\Scripts\ipython-script.py", line 5, in <module> sys.exit(start_ipython())
File "C:\Program Files (x86)\Anaconda 3\lib\site-packages\IPython\__init__.py", line 120, in start_ipython
return launch_new_instance(argv=argv, **kwargs)
...
FINALLY I got it!
First of all, when analysing the Error Code, we can see that the program asks us for the 'win32api'. To solve this problem, one must open the Anaconda Command Prompt as administrator and write:
conda install pywin32
With this, we will fix the missing package. But it doesn't end here, because if we try it again, a longer error will pop up so we also need to install the pandoc pack. In order to do this, we must close the command prompt and download it from here and run it with everything else closed.
Then, one can run smoothly the nbconvert command for everything, yay! :D
So remember, before using nbconvert, be sure that you have:
pywin32
pandoc
I've tried googling it and it seems nobody else has had this kind of error.
I'm using Octave 3.6.1 on Ubuntu 12.04. I've been using the imread() funcion to read images for quite some time, but just yesterday it started throwing this error:
octave:5> I = imread('example.jpg');
error: imread: invalid image file: Magick++ exception: Magick: Unable to open file (tures/example.jpg) reported by coders/jpeg.c:955 (ReadJPEGImage)
error: called from:
error: /usr/share/octave/3.6.1/m/image/imread.m at line 74, column 7
If I try to read a PNG, I get a similar error:
octave:5> I = imread('example.png');
error: imread: invalid image file: Magick++ exception: Magick: Unable to open file (tures/example.png) reported by coders/png.c:2790 (ReadPNGImage)
error: called from:
error: /usr/share/octave/3.6.1/m/image/imread.m at line 74, column 7
Does anybody know what's happening? How to fix this?
Thanks a lot!
I had the same problem with 3.6.4 on Windows 8.1, the simple workaround for me was this:
IMAGE_PATH = ('C:\Users\...');
where the image is stored
Image = file_in_path(IMAGE_PATH, 'image.jpg');
Of course it would be better to fix the actual function, but for now it's good enough.
Hope this helps.
Octave uses GraphicsMagick (or ImageMagick) to handle the reading and writing of images. GraphicsMagick does not handle directly the reading and writing of images, it's a wrapper for the many format libraries under a single API.
When you build GraphicsMagick, it checks your system for available libraries and disables/activates formats as those are presents. You probably built GraphicsMagick yourself without the development libraries libpng and libjpeg. In Ubuntu, I believe those are in the packages libpng12-dev and libjpeg8-dev. Either use the GraphicsMagick libraries that come with your system or if you need to build it yourself, see the instructions in the Octave wiki.
To confirm this is indeed your problem, run gm -version and check if those formats are activated. For example, the output in my system shows:
Feature Support:
Thread Safe yes
Large Files (> 32 bit) yes
Large Memory (> 32 bit) no
BZIP yes
DPS no
FlashPix no
FreeType yes
Ghostscript (Library) no
JBIG yes
JPEG-2000 yes
JPEG yes
Little CMS yes
Loadable Modules no
OpenMP yes (201107)
PNG yes
TIFF yes
TRIO no
UMEM no
WMF yes
X11 yes
XML yes
ZLIB yes
I've googled this error, that is received through both octave console and xoctave, and tried the suggestions to include the cd command followed by setting the IMAGE_PATH both to the same image path.
After trying the above suggestion, the imread still doesn't work emitting the same error; the path where the image exists is the very same as that of xoctave's default workspace. I've already went through Xoctave's options>console> Where is Octave to insert the correct directory to octave.exe and then saved and reopened xoctave.
The error is:
error: imread: cannot find image.jpg
error: called from:
error: C:\octave\3.2.4.gcc-4.4.O\share\octave\3.2.4\m\image\imread.m at 1ine 53, column 5
On octave installation, I've chosen the default installation settings (as partly seen below), as well as all the "Octave Forge" packages ("image" inclusive). I've then installed and extracted the image processing toolbox found here.
The strange thing is that I've had the same imread error on a different computer (running windows XP) that was resolved as soon as I've changed directory (cd) and set IMAGE_PATH to the required workspace. Also, on using ls to list the directory's contents, the image is found within as expected.
I'm using Octave 3.2.4 and Xoctave 0.9.79 beta; running on Windows 7 64-bit.