Hi together,
checking and extracting text from PDF reults using this PDF in memory leak.
This is my Code
private static bool PdfHasText(Aspose.Pdf.Document pdf)
{
//schnellste Methode zur Prüfung…
//vermeidet übermäßige Speichernutzung bei PDFs mit ausschlieslich Grafiken
var textAbsorber = new Aspose.Pdf.Text.TextAbsorber();
textAbsorber.ExtractionOptions.FormattingMode = Aspose.Pdf.Text.TextExtractionOptions.TextFormattingMode.MemorySaving;
foreach (var p in pdf.Pages)
{
try
{
textAbsorber.Visit(p);
if (textAbsorber.Text.Length > 0)
return true;
}
catch
{
return false;
}
}
return false;
}
This doc causes this behaviour (others are okay)
Averysurfacecleaner_D1900000040262_1_01.pdf (223.5 KB)