Package: latex2html
Version: 2023-debian1-1
Severity: normal
X-Debbugs-Cc: hamish.webm...@gmail.com


Hi,

The pstoimg program distributed with latex2html does not work in Bookworm
due to a conversion error during netpbm processing.

This happens with both PNG and GIF outputs selected. The default SVG
output doesn't even try to process, see companion bug.


Here is an example using a PostScript file taken from the texlive-latex-extra 
package:

PSFILE=/usr/share/texlive/texmf-dist/tex/latex/ha-prosper/Styles/TCS/TCSgradlogo.ps

$ pstoimg -type png -o test.png $PSFILE
pstoimg V2023
pstoimg: Processing 
/usr/share/texlive/texmf-dist/tex/latex/ha-prosper/Styles/TCS/TCSgradlogo.ps
pstoimg: Error: "/usr/bin/pnmquant 256 < /tmp/p1477055.pnm | /usr/bin/pnmtopng  
> test.png" failed: 

$ echo $?
1


Again in debug mode:

$ pstoimg -debug -type png -o test.png $PSFILE
pstoimg V2023
pstoimg: Temporary directory is /tmp
pstoimg: Processing 
/usr/share/texlive/texmf-dist/tex/latex/ha-prosper/Styles/TCS/TCSgradlogo.ps
pstoimg: EPSF dimensions are 302x172
pstoimg: Running /usr/bin/gs  -dNOSAFER -sDEVICE=pnmraw -g302x172    
-sOutputFile=/tmp/p1477104.pnm 
GS>0 0 translate
GS>(/usr/share/texlive/texmf-dist/tex/latex/ha-prosper/Styles/TCS/TCSgradlogo.ps)
 run
GS>showpage
GS>quit

GPL Ghostscript 10.0.0 (2022-09-21)
Copyright (C) 2022 Artifex Software, Inc.  All rights reserved.
This software is supplied under the GNU AGPLv3 and comes with NO WARRANTY:
see the file COPYING for details.
GS>GS>>>showpage, press <return> to continue<<
GS>>>showpage, press <return> to continue<<
GS>Image "/tmp/p1477104.pnm" is PPM, 302x172
Running "/usr/bin/pnmquant 256 < /tmp/p1477104.pnm | /usr/bin/pnmtopng  > 
test.png"
pnmcolormap: making histogram...
pnmcolormap: Scanning image 0
pnmcolormap: 4 colors so far
pnmcolormap: Scanning image 1
pnmcolormap: Image 1 depth (1) is not the same as Image 0 (3)
pnmquant: pnmcolormap failed, rc=256
pnmtopng: Error reading first byte of what is expected to be a Netpbm magic 
number.  Most often, this means your input file is empty
pstoimg: Error: "/usr/bin/pnmquant 256 < /tmp/p1477104.pnm | /usr/bin/pnmtopng  
> test.png" failed: 


Selecting GIF output is essentially the same.

Perhaps this is actually a netpbm bug?


thanks,
Hamish


-- System Information:
Debian Release: 12.6
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable-security'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 6.1.0-23-amd64 (SMP w/24 CPU threads; PREEMPT)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages latex2html depends on:
ii  ghostscript-x              10.0.0~dfsg-11+deb12u4
ii  netpbm                     2:11.01.00-2
ii  perl                       5.36.0-7+deb12u1
ii  perl-doc                   5.36.0-7+deb12u1
ii  poppler-utils              22.12.0-2+b1
ii  tex-common                 6.18
ii  texlive-binaries           2022.20220321.62855-5.1+deb12u1
ii  texlive-fonts-recommended  2022.20230122-3
ii  texlive-latex-extra        2022.20230122-4
ii  texlive-latex-recommended  2022.20230122-3

Versions of packages latex2html recommends:
ii  dvipng  1.15-1.1+b1

latex2html suggests no packages.

-- no debconf information

Reply via email to