I'm trying to automate the generation of PDF reports from data in MATLAB.
The reports are created by generating a LaTeX file and calling the LaTeX compiler from MATLAB.
This works like it should on Windows, however on MacOSX I get some strange behaviour.
First, the LaTeX compiler is called:
unix('/usr/texbin/latex -src -interaction=nonstopmode report.tex')
This works like it should, however the dvipdfm command fails:
unix('/usr/texbin/dvipdfm report.dvi')
[1
** WARNING ** Filtering file via command -->rungs -q -dNOPAUSE -dBATCH -dEPSCrop - sDEVICE=pdfwrite -dCompatibilityLevel=1.5 -dAutoFilterGrayImages=false - dGrayImageFilter=/FlateEncode -dAutoFilterColorImages=false -dColorImageFilter=/FlateEncode -sOutputFile='/var/folders/jh/w14pjs0x0njfkdjlmct1rzkr0000gn/T//dvipdfmx.e9988917ae707f285b5230bc0fe87563' './TopView.eps' -c quit<-- failed.
** WARNING ** Image format conversion for "./TopView.eps" failed...
** ERROR ** pdf_ref_obj(): passed invalid object.
Output file removed.
This clearly fails at the first EPS image it encounters
When running in a regular Terminal, the command works as expected:
$ /usr/texbin/dvipdfm report.dvi
report.dvi -> report.pdf
[1][2][3][4][5][6][7][8][9][10]
1803812 bytes written
Does anyone know what MATLAB peculiarity causes this error?
Related
Trying to run an ASC2EPH.exe to convert linked ASCII DE405 files to binary JPLEPH file. Getting error when running in CMD - ASC2EPH<infile.405 (see error code). Any help appreciated.
Have run this on Simply Fortran and Force v3 both with same result. NRECL set to 1 for PC
well I've given up. I don't think I understand how GS works... as far as I understand GS replaces all fonts that are not embedded and should not touch already embedded ones? why is it replacing them? I have a pdf file that contains 2 embedded fonts and 1 not embedded (ArialMT).
I'm using command:
"gswin64c.exe -I "C:/Program Files/gs/gs9.56.1/Resource/Init" -sFONTMAP="Fontmap.GS" -dNOSAFER -dPDFACompatibilityPolicy=1 -sColorConversionStrategy=LeaveColorUnchanged -dBATCH -dNOPAUSE -sDEVICE="pdfwrite" -dAutoRotatePages=/None -dPDFA=3 -sOutputFile="pdfa.pdf" "original.pdf"
all I get with this command is this error:
GPL Ghostscript 9.56.1: Actual TT subtable offset xxxxx differs from one in the TT header yyyy. (multiple ones like this)
The following errors were encountered at least once while processing this file:
error executing PDF token
**** This file had errors that were repaired or ignored.
**** The file was produced by:
**** >>>> StreamServe Communication Server 16.6.1 GA Build 319 (64 bit) <<<<
**** Please notify the author of the software that produced this
**** file that it does not conform to Adobe's published PDF
**** specification.
the output is a pdf without ANY fonts...
is there any way to force GS not to replace font if it wasn't found on the system?
why is it replacing ArialMT with NimbusSans-Regular even though I have declared a specific path to ArialMT in my FontMap.GS file?
I'd rather not share this pdf file as it contains sensitive customer data.
(osadzony podzestaw=embedded subset)
Ghost Script substitution will require embeddable fonts on windows those are usually stored in C:\Windows\Fonts
Thus if font substitution was simple (without look-up) your command could be simplified
gswin64c.exe -sFONTPATH="C:\Windows\Fonts" -dNOSAFER -sDEVICE=pdfwrite -dNEWPDF=false -dPDFA=3 -dPDFACompatibilityPolicy=1 -sColorConversionStrategy=LeaveColorUnchanged -dAutoRotatePages=/None -o"pdfa.pdf" "original.pdf"
you need to add -dNEWPDF=false Since to include additional mapping you add -I "C:/Program Files/gs/gs9.56.1/Resource/Init" -sFONTMAP=Fontmap.gs
Thus the following should be a startpoint
gswin64c.exe -sFONTPATH="C:\Windows\Fonts" -I "C:/Program Files/gs/gs9.56.1/Resource/Init" -sFONTMAP=Fontmap.gs -dNOSAFER -sDEVICE=pdfwrite -dNEWPDF=false -dPDFA=3 -dPDFACompatibilityPolicy=1 -sColorConversionStrategy=LeaveColorUnchanged -dAutoRotatePages=/None -o"pdfa.pdf" "original.pdf"
It will not remove warnings using a PDF file from the same developer, the difference was now there is no mention of Nimbus, but the substitutions should be better/fuller as the warning messages verified the fonts were eventually applied from windows
Note the file is smaller although the fonts are embedded, and in side by side comparison they look the same.
GPL Ghostscript 9.56.1: PDFA doesn't allow images with Interpolate true.
and
The following errors were encountered at least once while processing this file:
missing white space after number
error executing PDF token
**** This file had errors that were repaired or ignored.
**** Please notify the author of the software that produced this
**** file that it does not conform to Adobe's published PDF
**** specification.
from their report.
If I save the file from Acrobat the file size drops but the same issues reside
I am creating a pdf file using ghostscript 9.15. I have been using ghostscript for about 5 years and haven’t encountered any serious issues till this week.
Essentially I am running the query below….
“c://distiller/exes/gswin32c.exe" -sDEVICE="pdfwrite" -dNOPAUSE -dBATCH -dNOSAFER -dQUIET -sFONTPATH="C:/Windows/Fonts" -sOUTPUTFILE="C:\distiller\test.pdf" "C:\ExactDistiller \example.ps"
and I get the error below
Current allocation mode is local Last OS error: No such file or
directory Current file position is 197197 GPL Ghostscript 9.15:
Unrecoverable error, exit code 1
I am getting the error “No such file or directory” but I have checked every file path and checked every font is installed and all seems fine but still no luck. I just want to know is there a way of finding out what file / directory is causing the issue?
Well the first thing I would do is not set -dQUIET, turning off information isn't a good way to debug a problem. Not setting -dBATCH and -dNOPAUSE might be helpful too as it might show you more of what is going on. Note that -dNOSAFER is in fact the default, you don't need to set that unless you have previously set your environment to include -dSAFER
In short, when trying to debug the problem, simplify it as far as possible, don't set any switches unless you know you need them, or they contribute to the problem.
You could then paste the stdout transcript which might shed some illumination.
Secondly, your directory appears to contain a trailing space before the separator "c:\ExactDistiller \example.ps", is that correct ? A 'No such file or directory' error will be thrown (without a PostScript error) if you get the input filename incorrect.
If there is a PostScript error revealed when you stop issuing -dQUIET then you can paste it in your original question (by editing it) and I'll take a look. It may be necessary to see your example.ps file, depending on what that reveals.
I am using org-mode. when I try to compile a org file into a pdf with minted package enabled, I get a error. for instance,
\documentclass{memoir}
\counterwithout{section}{chapter}
\usepackage{kotex}
\usepackage[T1]{fontenc}
\usepackage{graphicx}
\usepackage{grffile}
\usepackage{longtable}
\usepackage{wrapfig}
\usepackage{rotating}
\usepackage{amsmath}
\usepackage{textcomp}
\usepackage{amssymb}
\usepackage{capt-of}
\usepackage{hyperref}
\usepackage{minted}
\author{My name}
\begin{document}
...
\end{document}
then I got an error as follows
! Emergency stop.
<read 3>
l.24 \author
{My name}^^M
! ==> Fatal error occurred, no output PDF file produced!
Transcript written on .//memo.log.
It looks like the statement next to the \usepackage{minted} statement gets the error like the above example.
FYI, if I compile the org file with pdflatex command directly, I get a pdf file without any problem. If I try to compile it in org-mode (Export to LaTeX As PDF file), I got the error.
Thanks in advance.
I am trying to create wave files using mac's say command, however, I get the following error:
$ say "hello" -o hi.wav
Opening output file failed: fmt?
although,
$ say --file-format=?
WAVE WAVE (.wav) [lpcm,ulaw,alaw]
Is there some way I can get say to output a wave file?
It infers the file format from the file extension, but you need to specify the data format:
say -o hi.wav --data-format=LEF32#22050 "hello"