zoukankan      html  css  js  c++  java
  • pdf2swf 转换时报错。This file is too complex to render- SWF only supports 65536 shapes at once

    在使用swftools转换pdf 到swf的时候报错,
    有如下说明:
    if the pdf contains too many images / shapes, pdf2swf will fail with this error :
    ERROR Thisfileistoocomplextorender-SWFonly supports 65536 shapes at once
    There is a very simple fix : add “-s poly2bitmap” to the options given to the transformer’s commandMap in swf-transform-context.xml

    The issue is also discussed in ETHREEOH-3023 , and it can be easily reproduced with the pdf attached to ETHREEOH-3023 .
    With the added options “-s poly2bitmap” (which means converts pdf graphics to bitmaps) allows the transformation to complete successfully, so maybe we could add this option by default.

    Cheers,
    Romain


    问题描述:在线浏览的时候报【转换后的文件不存在】,查看后台是swf 文件转换失败导致的。
    SWF转换问题: ERROR Thisfileistoocomplextorender-SWFonly supports 65536 shapes at once
    经查询是,是后台的程序没有做判断及添加相应的参数进行处理。
    目前(20120319)后台的处理命令为:
     pdf2swf 1.pdf -o 1.swf -f -T 9 -G

    需要添加参数  ,下面列出三种转换的优先级,因为和转换的速度有关系,所以不要都用下面的啦
     pdf2swf 1.pdf -o 1.swf -f -T 9 -G -s poly2bitmap    只对文件中的图形转成点阵
     pdf2swf 1.pdf -o 1.swf -f -T 9 -G -s bitmap    对everything 转成点阵
    pdf2swf 1.pdf -o 1.swf -f -T 9 -G -s enablezlib  bitmap    对everything 转成点阵,并通过enablezlib压缩

    处理这个问题可以按上面的方法,在转换时加入参数-s poly2bitmap 或者其他的来将文件中的图形转成点阵,这个是由于文件大太或者文件图形过多而引起的异常,所以建议在转换的过程时加入了文件的大小的判断,当文件过大时,就加入这个参数,不然就直接转,因为我测试的时候,不加入这个参数时,转换的速度快一点。

  • 相关阅读:
    神不在的星期天
    炸弹问题——一种会引发死锁的情景模式
    JavaScript的类和继承
    没有功劳也有苦劳
    使用http代理服务器解决本地客户端页面的跨域AJAX问题
    04数组 字符数组
    01 数据类型 、常量变量、运算符、表达式、格式化输入输出
    03循环结构
    .NET编译、WOW64注册表访问、同时在X86和X64平台上部署应用程序
    Vistual Studio 2008中的智能感应功能
  • 原文地址:https://www.cnblogs.com/tdskee/p/3767838.html
Copyright © 2011-2022 走看看