wmjordan / wmjordan/PDFPatcher

文档内容流存在损坏的压缩流导致文档结构查看器返回的内容流不全

Open
#308 3 comments 0 reactions 1 assignee View on GitHub

@wmjordan is already working on this.

Since Feb 15, 2026.

改进
Dominant language
C#
Stars
12.7k
Forks
1.6k
PR merge metrics
No merged PRs in 30d

Description

error.zip

Image

问题出在 \iTextSharp\core\iTextSharp\text\pdf\PdfReader.cs 的Flate解压缩函数
internal static byte[] FlateDecode(byte[] inp, MemoryStream outS)

//不能直接使用outS,会被close,导致下一句无法执行。 
byte[] b = FlateDecode(inp, true, new MemoryStream(outS.ToArray()));

itext-dotnet 在 FlateDecodeFilter.cs#L44 里已经改成不释放了。也不一定好。

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.