【问题标题】:mime decode pdf quoted-printablemime decode pdf 引用可打印
【发布时间】:2011-03-05 08:07:07
【问题描述】:

我一直在构建一个简单的票务系统,除了它通过电子邮件接收使用quoted-printable 编码发送的 PDF 文件时,它已全部完成并正常工作。我试过使用quoted_printable_decode()quoted-printable.decode 流过滤器,后者只是创建了一个空文件。我也试过使用$input = preg_replace('/=([a-f0-9]{2})/ie', "chr(hexdec('\\1'))", $input)

但 PDF 文件始终无法读取。我将原版与重建版进行了比较,发现很多00 缺失,并且替换了一些其他字符。

original file

rebuilt file

【问题讨论】:

    标签: php encoding mime mime-message


    【解决方案1】:

    通过在每一行而不是整个 mime 部分上使用 quoted_printable_decode() 来修复

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2018-11-23
      • 2016-08-27
      • 2011-06-12
      • 2011-02-15
      • 1970-01-01
      • 1970-01-01
      • 2021-11-02
      • 1970-01-01
      相关资源
      最近更新 更多