Closed GoogleCodeExporter closed 9 years ago
What command do you run to optimize the PDF? user@ubuntu804server:~/manypdfs/fail2$ ~/pdfsizeopt/pdfsizeopt.py --use-pngout=false upmethodology-doc.pdf What does pdfsizeopt display when running the command above? info: This is pdfsizeopt.py r134. info: loading PDF from: upmethodology-doc.pdf info: loaded PDF of 398176 bytes info: separated to 846 objs info: found 14 Type1 fonts loaded info: writing Type1CConverter (84953 font bytes) to: pso.conv.tmp.ps info: executing Type1CConverter with Ghostscript: gs -q -dNOPAUSE -dBATCH -sDEVI CE=pdfwrite -dPDFSETTINGS=/printer -dColorConversionStrategy=/LeaveColorUnchange d -sOutputFile=pso.conv.tmp.pdf -f pso.conv.tmp.ps Type1CConverter: using interpreter GPL Ghostscript 861 20071121 Type1CConverter: converting font /JIESFY+rtxb to /Obj0000000796 Type1CConverter: converting font /VCKFCA+rtxi to /Obj0000000798 Type1CConverter: converting font /WQCJQW+rtxmi to /Obj0000000800 Type1CConverter: converting font /GFLZWR+rtxr to /Obj0000000802 Type1CConverter: converting font /WYLBIA+rtxsc to /Obj0000000804 Type1CConverter: converting font /GIHSLP+txbtt to /Obj0000000806 Type1CConverter: converting font /JIPCES+txsy to /Obj0000000808 Type1CConverter: converting font /MRHMVW+txtt to /Obj0000000810 Type1CConverter: converting font /PMHMJP+NimbusSanL-BoldCond to /Obj0000000812 Type1CConverter: converting font /GYZDOL+StandardSymL to /Obj0000000814 Type1CConverter: converting font /CUAOUW+NimbusRomNo9L-Medi to /Obj0000000816 Type1CConverter: converting font /EDAEFU+NimbusRomNo9L-Regu to /Obj0000000818 Type1CConverter: converting font /ZBBBEM+NimbusRomNo9L-ReguItal to /Obj000000082 0 Type1CConverter: converting font /MSZASC+URWChanceryL-MediItal to /Obj0000000822 Type1CConverter: all OK info: loading PDF from: pso.conv.tmp.pdf info: loaded PDF of 48535 bytes info: separated to 64 objs info: found 14 fonts in GS output info: optimized total Type1 font size 85159 to Type1C font size 33686 (40%) info: optimized Type1 font XObject 800,799: new size=831 (40%) info: optimized Type1 font XObject 802,801: new size=900 (39%) info: optimized Type1 font XObject 804,803: new size=2804 (54%) info: optimized Type1 font XObject 806,805: new size=1755 (48%) info: optimized Type1 font XObject 808,807: new size=899 (40%) info: optimized Type1 font XObject 810,809: new size=5294 (52%) info: optimized Type1 font XObject 812,811: new size=1180 (31%) info: optimized Type1 font XObject 814,813: new size=1035 (42%) info: optimized Type1 font XObject 816,815: new size=6336 (41%) info: optimized Type1 font XObject 818,817: new size=8636 (44%) info: optimized Type1 font XObject 820,819: new size=5450 (43%) info: optimized Type1 font XObject 822,821: new size=1938 (30%) info: optimized Type1 font XObject 796,795: new size=662 (35%) info: optimized Type1 font XObject 798,797: new size=509 (31%) info: found 14 Type1C fonts loaded info: writing Type1CParser (33344 font bytes) to: pso.conv.parse.tmp.ps info: executing Type1CParser with Ghostscript: gs -q -dNOPAUSE -dBATCH -sDEVICE= nullpage -sDataFile=pso.conv.parsedata.tmp.ps -f pso.conv.parse.tmp.ps Type1CParser: using interpreter GPL Ghostscript 861 20071121 Type1CParser: all OK info: parsed 14 Type1C fonts info: will optimize image XObject 663; orig width=128 height=128 colorspace=/Dev iceRGB bpc=8 filter=/FlateDecode dp=0 size=11029 gs_device=png16m info: saving PNG to pso.conv-663.parse.png info: written 10965 bytes to PNG info: will optimize image XObject 664; orig width=128 height=128 colorspace=/Dev iceRGB bpc=8 filter=/FlateDecode dp=0 size=11068 gs_device=png16m info: saving PNG to pso.conv-664.parse.png info: written 11017 bytes to PNG info: will optimize image XObject 665; orig width=128 height=128 colorspace=/Dev iceRGB bpc=8 filter=/FlateDecode dp=0 size=11855 gs_device=png16m info: saving PNG to pso.conv-665.parse.png info: written 11803 bytes to PNG info: will optimize image XObject 675; orig width=128 height=128 colorspace=/Dev iceGray bpc=8 filter=/FlateDecode dp=0 size=12626 gs_device=pnggray info: saving PNG to pso.conv-675.parse.png info: written 12670 bytes to PNG info: using identical image obj 675 for obj 676 info: using identical image obj 675 for obj 677 info: optimizing 4 images of 46578 bytes in total info: executing image optimizer sam2p_np: sam2p -pdf:2 -c zip:1:9 -s Gray1:Index ed1:Gray2:Indexed2:Rgb1:Gray4:Indexed4:Rgb2:Gray8:Indexed8:Rgb4:Rgb8:stop -- pso .conv-663.parse.png pso.conv-663.sam2p-np.pdf This is sam2p v0.46. Available Loaders: PS PDF JAI PNG JPEG TIFF PNM BMP GIF LBM XPM PCX TGA. Available Appliers: XWD Meta Empty BMP PNG TIFF6 TIFF6-JAI JPEG-JAI JPEG PNM GIF 89a+LZW XPM PSL1C PSL23+PDF PSL2+PDF-JAI P-TrOpBb. sam2p: Notice: PNM: loaded alpha, but no transparent pixels sam2p: Notice: job: read InputFile: pso.conv-663.parse.png sam2p: Notice: writeTTT: using template: p02 sam2p: Notice: applyProfile: applied OutputRule #11 sam2p: Notice: job: written OutputFile: pso.conv-663.sam2p-np.pdf Success. info: loading image from: pso.conv-663.sam2p-np.pdf info: loading PDF from: pso.conv-663.sam2p-np.pdf info: loaded PDF of 11525 bytes info: separated to 6 objs info: loaded PNG IDAT of 10815 bytes info: executing image optimizer sam2p_pr: sam2p -c zip:15:9 -- pso.conv-663.pars e.png pso.conv-663.sam2p-pr.png This is sam2p v0.46. Available Loaders: PS PDF JAI PNG JPEG TIFF PNM BMP GIF LBM XPM PCX TGA. Available Appliers: XWD Meta Empty BMP PNG TIFF6 TIFF6-JAI JPEG-JAI JPEG PNM GIF 89a+LZW XPM PSL1C PSL23+PDF PSL2+PDF-JAI P-TrOpBb. sam2p: Notice: PNM: loaded alpha, but no transparent pixels sam2p: Notice: job: read InputFile: pso.conv-663.parse.png sam2p: Notice: applyProfile: applied OutputRule #14 sam2p: Notice: job: written OutputFile: pso.conv-663.sam2p-pr.png Success. info: loading image from: pso.conv-663.sam2p-pr.png info: loaded PNG IDAT of 9068 bytes info: optimized image XObject 663 file_name=pso.conv-663.sam2p-pr.png size=9307 (84%) methods=sam2p_pr:9307,sam2p_np:11005,#orig:11029,parse:11029 info: executing image optimizer sam2p_np: sam2p -pdf:2 -c zip:1:9 -s Gray1:Index ed1:Gray2:Indexed2:Rgb1:Gray4:Indexed4:Rgb2:Gray8:Indexed8:Rgb4:Rgb8:stop -- pso .conv-664.parse.png pso.conv-664.sam2p-np.pdf This is sam2p v0.46. Available Loaders: PS PDF JAI PNG JPEG TIFF PNM BMP GIF LBM XPM PCX TGA. Available Appliers: XWD Meta Empty BMP PNG TIFF6 TIFF6-JAI JPEG-JAI JPEG PNM GIF 89a+LZW XPM PSL1C PSL23+PDF PSL2+PDF-JAI P-TrOpBb. sam2p: Notice: PNM: loaded alpha, but no transparent pixels sam2p: Notice: job: read InputFile: pso.conv-664.parse.png sam2p: Notice: writeTTT: using template: p02 sam2p: Notice: applyProfile: applied OutputRule #11 sam2p: Notice: job: written OutputFile: pso.conv-664.sam2p-np.pdf Success. info: loading image from: pso.conv-664.sam2p-np.pdf info: loading PDF from: pso.conv-664.sam2p-np.pdf info: loaded PDF of 11552 bytes info: separated to 6 objs info: loaded PNG IDAT of 10842 bytes info: executing image optimizer sam2p_pr: sam2p -c zip:15:9 -- pso.conv-664.pars e.png pso.conv-664.sam2p-pr.png This is sam2p v0.46. Available Loaders: PS PDF JAI PNG JPEG TIFF PNM BMP GIF LBM XPM PCX TGA. Available Appliers: XWD Meta Empty BMP PNG TIFF6 TIFF6-JAI JPEG-JAI JPEG PNM GIF 89a+LZW XPM PSL1C PSL23+PDF PSL2+PDF-JAI P-TrOpBb. sam2p: Notice: PNM: loaded alpha, but no transparent pixels sam2p: Notice: job: read InputFile: pso.conv-664.parse.png sam2p: Notice: applyProfile: applied OutputRule #14 sam2p: Notice: job: written OutputFile: pso.conv-664.sam2p-pr.png Success. info: loading image from: pso.conv-664.sam2p-pr.png info: loaded PNG IDAT of 9537 bytes info: optimized image XObject 664 file_name=pso.conv-664.sam2p-pr.png size=9776 (88%) methods=sam2p_pr:9776,sam2p_np:11032,#orig:11068,parse:11068 info: executing image optimizer sam2p_np: sam2p -pdf:2 -c zip:1:9 -s Gray1:Index ed1:Gray2:Indexed2:Rgb1:Gray4:Indexed4:Rgb2:Gray8:Indexed8:Rgb4:Rgb8:stop -- pso .conv-665.parse.png pso.conv-665.sam2p-np.pdf This is sam2p v0.46. Available Loaders: PS PDF JAI PNG JPEG TIFF PNM BMP GIF LBM XPM PCX TGA. Available Appliers: XWD Meta Empty BMP PNG TIFF6 TIFF6-JAI JPEG-JAI JPEG PNM GIF 89a+LZW XPM PSL1C PSL23+PDF PSL2+PDF-JAI P-TrOpBb. sam2p: Notice: PNM: loaded alpha, but no transparent pixels sam2p: Notice: job: read InputFile: pso.conv-665.parse.png sam2p: Notice: writeTTT: using template: p02 sam2p: Notice: applyProfile: applied OutputRule #11 sam2p: Notice: job: written OutputFile: pso.conv-665.sam2p-np.pdf Success. info: loading image from: pso.conv-665.sam2p-np.pdf info: loading PDF from: pso.conv-665.sam2p-np.pdf info: loaded PDF of 12328 bytes info: separated to 6 objs info: loaded PNG IDAT of 11618 bytes info: executing image optimizer sam2p_pr: sam2p -c zip:15:9 -- pso.conv-665.pars e.png pso.conv-665.sam2p-pr.png This is sam2p v0.46. Available Loaders: PS PDF JAI PNG JPEG TIFF PNM BMP GIF LBM XPM PCX TGA. Available Appliers: XWD Meta Empty BMP PNG TIFF6 TIFF6-JAI JPEG-JAI JPEG PNM GIF 89a+LZW XPM PSL1C PSL23+PDF PSL2+PDF-JAI P-TrOpBb. sam2p: Notice: PNM: loaded alpha, but no transparent pixels sam2p: Notice: job: read InputFile: pso.conv-665.parse.png sam2p: Notice: applyProfile: applied OutputRule #14 sam2p: Notice: job: written OutputFile: pso.conv-665.sam2p-pr.png Success. info: loading image from: pso.conv-665.sam2p-pr.png info: loaded PNG IDAT of 10405 bytes info: optimized image XObject 665 file_name=pso.conv-665.sam2p-pr.png size=10645 (90%) methods=sam2p_pr:10645,sam2p_np:11808,#orig:11855,parse:11855 info: executing image optimizer sam2p_np: sam2p -pdf:2 -c zip:1:9 -s Gray1:Index ed1:Gray2:Indexed2:Rgb1:Gray4:Indexed4:Rgb2:Gray8:Indexed8:Rgb4:Rgb8:stop -- pso .conv-675.parse.png pso.conv-675.sam2p-np.pdf This is sam2p v0.46. Available Loaders: PS PDF JAI PNG JPEG TIFF PNM BMP GIF LBM XPM PCX TGA. Available Appliers: XWD Meta Empty BMP PNG TIFF6 TIFF6-JAI JPEG-JAI JPEG PNM GIF 89a+LZW XPM PSL1C PSL23+PDF PSL2+PDF-JAI P-TrOpBb. libpng warning: Extra compressed data. libpng warning: Extra compression data pnmtopng: fatal libpng error: IDAT: CRC error sh: pngtopnm: not found sam2p: Error: Filter::PipeE: system() failed: (png22pnm -rgba /tmp/tmp__sam2p__2 1311_0 || (pngtopnm </tmp/tmp__sam2p__21311_0 && pngtopnm -alpha </tmp/tmp__sam2 p__21311_0)) >/tmp/tmp__sam2p__21311_1 info: sam2p_np failed, status=0x200 Traceback (most recent call last): File "/home/user/pdfsizeopt/pdfsizeopt.py", line 6157, in ? main(sys.argv) File "/home/user/pdfsizeopt/pdfsizeopt.py", line 6143, in main pdf.OptimizeImages(use_pngout=use_pngout, use_jbig2=use_jbig2) File "/home/user/pdfsizeopt/pdfsizeopt.py", line 5027, in OptimizeImages cmd_name='sam2p_np')) File "/home/user/pdfsizeopt/pdfsizeopt.py", line 4541, in ConvertImage assert 0, '%s failed (status)' % cmd_name AssertionError: sam2p_np failed (status) What's wrong with the optimized PDF? There isn't one!
Original issue reported on code.google.com by lev.bishop on 25 Jan 2010 at 4:07
lev.bishop
Attachments:
Thank you for reporting this bug. I've fixed it in r150.
Original comment by pts...@gmail.com on 11 Feb 2011 at 12:15
pts...@gmail.com
Original issue reported on code.google.com by
lev.bishop
on 25 Jan 2010 at 4:07Attachments: