Hi!
We are trying to extract text from a PDF file. We found that 4.5-5GB of RAM is allocated for a 15MB file. Please help me find the cause of the behavior and reduce RAM consumption.
The following code snippet is used.
public static string GetContent(byte[] content)
{
using (MemoryStream input = new MemoryStream(content))
using (Document document = new Document(input))
{
TextAbsorber textAbsorber = new TextAbsorber();
document.Pages.Accept(textAbsorber);
return textAbsorber.Text;
}
}
test.pdf (14.7 MB)