auctex
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [AUCTeX] pdfsizeopt does not work when called from Emacs, but works


From: AW
Subject: Re: [AUCTeX] pdfsizeopt does not work when called from Emacs, but works when called from cmd.exe
Date: Wed, 02 Aug 2017 17:22:11 +0200

I found at least a very strange thing:

If the path to the *.tex file is an UNC-address like 

| //SBS2011/path/to/file

I'm getting the error.

If the path to the *.tex file ist just something like 

| D:/DATA/filename.tex

it works even from Emacs when I run pdfsizeopt.exe.

Aha. Hm. So either pdfsizeopt.exe or Emacs have an issue with UNC-Pathes.

So this is definitely no AUCTeX issue, as it seems.






Am Mittwoch, 2. August 2017, 12:51:38 CEST schrieb AW:
> Hi!
> 
> Strange Emacs and maybe AUCTeX issue.
> 
> Emacs-Version: GNU Emacs 25.1.1 (x86_64-w64-mingw32), AUCTeX: 11.91.0. We
> are on Windows 8.1.
> 
> I'm using pdfsizeopt to shrink the PDFs produced with AUCTeX. I installed
> various times pdfsizeopt according to the manual, see here:
> https://github.com/pts/pdfsizeopt
> 
> pdfsizeopt works, but _only_ if called from cmd.exe. Output is this:
> 
> #+BEGIN_SRC
> 
> R:\Bilder\...>pdfsizeopt.exe 170802-XXX.pdf 170802-XXX.pdf
> info: This is pdfsizeopt ZIP rUNKNOWN size=114611.
> info: prepending to PATH: C:\pdfsizeopt\pdfsizeopt_win32exec
> info: loading PDF from: 170802-XXX.pdf
> info: loaded PDF of 840447 bytes
> info: found 83 obj offsets and 1 obj streams in xref stream
> info: separated to 81 objs + xref + trailer
> warning: cannot parse obj 19: pdfsizeopt.main.PdfIndirectLengthError:
> missing ob
> j for indirect /Length 40 0 R at ofs=20930
> ... [many more messages]
> info: found 6 Type1 fonts loaded
> info: writing Type1CConverter (417100 font bytes) to:
> psotmp.3232.conv.tmp.ps info: using Ghostscript
> "C:\pdfsizeopt\pdfsizeopt_win32exec\pdfsizeopt_gswin \gsw
> in32c.exe": GPL Ghostscript 9.02 (2011-03-30)
> info: executing Type1CConverter with Ghostscript: "C:\pdfsizeopt
> \pdfsizeopt_win3
> 2exec\pdfsizeopt_gswin\gswin32c.exe" -q -P- -dNOPAUSE -dBATCH -
> sDEVICE=pdfwrite
> -dPDFSETTINGS=/printer -dColorConversionStrategy=/LeaveColorUnchanged -
> sOutputFi
> le=psotmp.3232.conv.tmp.pdf -f psotmp.3232.conv.tmp.ps
> Type1CConverter: using interpreter GPL Ghostscript 902 20110330
> Type1CConverter: converting font /TBQTVH+LinBiolinum to /Obj0000000070
> Type1CConverter: converting font /DAOZLD+LinBiolinumI to /Obj0000000072
> Type1CConverter: converting font /SEISLV+LinLibertineB to /Obj0000000074
> Type1CConverter: converting font /MNLYJI+LinLibertine to /Obj0000000076
> Type1CConverter: converting font /WBBRJQ+LinLibertineI to /Obj0000000078
> Type1CConverter: converting font /MKHCTZ+LMMathSymbols8-Regular to /
> Obj000000008
> 0
> Type1CConverter: all OK
> info: loading PDF from: psotmp.3232.conv.tmp.pdf
> info: loaded PDF of 28886 bytes
> info: separated to 28 objs + xref + trailer
> info: found 6 fonts in GS output
> info: optimized total Type1 font size 417168 to Type1C font size 20657 (5%)
> info: optimized Type1 font XObject 70,69: new size=7149 (9%)
> info: optimized Type1 font XObject 72,71: new size=3093 (5%)
> info: optimized Type1 font XObject 74,73: new size=2665 (3%)
> info: optimized Type1 font XObject 76,75: new size=7473 (7%)
> info: optimized Type1 font XObject 78,77: new size=1646 (2%)
> info: optimized Type1 font XObject 80,79: new size=658 (25%)
> info: found 6 Type1C fonts loaded
> info: writing Type1CParser (20533 font bytes) to: psotmp.
> 3232.conv.parse.tmp.ps
> info: executing Type1CParser with Ghostscript: "C:\pdfsizeopt
> \pdfsizeopt_win32ex
> ec\pdfsizeopt_gswin\gswin32c.exe" -q -P- -dNOPAUSE -dBATCH -sDEVICE=nullpage
> - sD
> ataFile=psotmp.3232.conv.parsedata.tmp.ps -f psotmp.3232.conv.parse.tmp.ps
> Type1CParser: using interpreter GPL Ghostscript 902 20110330
> Type1CParser: all OK
> info: parsed 6 Type1C fonts
> info: writing Type1CGenerator (58243 bytes in 6 fonts) to: psotmp.
> 3232.conv.gen.
> tmp.ps
> info: executing Type1CGenerator with Ghostscript: "C:\pdfsizeopt
> \pdfsizeopt_win3
> 2exec\pdfsizeopt_gswin\gswin32c.exe" -q -P- -dNOPAUSE -dBATCH -
> sDEVICE=pdfwrite
> -dPDFSETTINGS=/printer -dColorConversionStrategy=/LeaveColorUnchanged -
> sOutputFi
> le=psotmp.3232.conv.gen.tmp.pdf -f psotmp.3232.conv.gen.tmp.ps
> Type1CGenerator: using interpreter GPL Ghostscript 902 20110330
> Type1CGenerator: all OK
> info: loading PDF from: psotmp.3232.conv.gen.tmp.pdf
> info: loaded PDF of 28079 bytes
> info: separated to 34 objs + xref + trailer
> info: found 6 fonts loaded
> info: optimized Type1C fonts to form 21874 bytes to 21862 bytes (100%)
> info: eliminated 23 unused objs in 23 classes
> warning: obj 19 missing, referenced by objs [16]...
> warning: obj 20 missing, referenced by objs [16]...
> ...[many more messages]
> info: compressed 2 streams, kept 2 of them uncompressed
> info: saving PDF with 37 objs to: 170802-XXX.pdf
> info: generated object stream of 2287 bytes in 27 objects (17%)
> info: generated 38966 bytes (5%)
> 
> R:\Bilder\...
> 
> #+END_SRC
> 
> But it does not work, if I call it from Emacs!
> 
> Command:
> #+BEGIN_SRC
> pdfsizeopt.exe "170802-XXX".pdf "170802-XXX".pdf
> #+END_SRC
> 
> Output:
> #+BEGIN_SRC
> Running `pdfsizeopt' on `170802-XXX' with ``pdfsizeopt.exe "170802-XXX".pdf
> "170802-XXX".pdf''
> info: This is pdfsizeopt ZIP rUNKNOWN size=114611.
> info: prepending to PATH: C:\pdfsizeopt\pdfsizeopt_win32exec
> info: loading PDF from: 170802-XXX.pdf
> info: loaded PDF of 38966 bytes
> info: found 39 obj offsets and 1 obj streams in xref stream
> info: separated to 37 objs + xref + trailer
> info: found 0 Type1 fonts loaded
> info: found 6 Type1C fonts loaded
> info: writing Type1CParser (20521 font bytes) to: psotmp.
> 5260.conv.parse.tmp.ps
> Traceback (most recent call last):
>   File "C:\pdfsizeopt\pdfsizeopt_win32exec\python26.zip\runpy.py", line 122,
> in _run_module_as_main
>   File "C:\pdfsizeopt\pdfsizeopt_win32exec\python26.zip\runpy.py", line 34,
> in _run_code
>   File "C:\pdfsizeopt\pdfsizeopt.single\__main__.py", line 1, in <module>
>   File "C:\pdfsizeopt\pdfsizeopt.single\mainrun.py", line 10, in <module>
>   File "C:\pdfsizeopt\pdfsizeopt.single\pdfsizeopt\main.py", line 8919, in
> main
>   File "C:\pdfsizeopt\pdfsizeopt.single\pdfsizeopt\main.py", line 6438, in
> OptimizeType1CFonts
>   File "C:\pdfsizeopt\pdfsizeopt.single\pdfsizeopt\main.py", line 6084, in
> _ProcessType1CFonts
>   File "C:\pdfsizeopt\pdfsizeopt.single\pdfsizeopt\main.py", line 5571, in
> ParseType1CFonts
>   File "C:\pdfsizeopt\pdfsizeopt.single\pdfsizeopt\main.py", line 140, in
> GetGsCommand
> AssertionError: Could not find a working Ghostscript.
> 
> TeX Output exited abnormally with code 1 at Wed Aug  2 12:35:31
> 
> #+END_SRC
> 
> So why on Earth does pdfsizeopt within Emacs not find "a working
> ghostscript", while called from cmd.exe inside any folder of the network
> here runs smoothly?
> 
> Please note that I asked this question at stackexchange whithout answer and
> on the website of pdfsizeopt. So if you can rule out that it is an AUCTeX
> issue, my last resort would be the Emacs-Developer mailing list...
> 
> Thanks for any help!
> 
> Kind Regards,
> 
> Alexander
> 
> 
> _______________________________________________
> auctex mailing list
> address@hidden
> https://lists.gnu.org/mailman/listinfo/auctex





reply via email to

[Prev in Thread] Current Thread [Next in Thread]