parse($stream, $security); } /** * @param bool $useFileCache if set to true, the file will be cached to a temporary file. This will use less memory, but will be significantly slower * @throws PdfParserException */ public function parseString(string $content, bool $useFileCache = false, ?StandardSecurity $security = null): Document { if ($useFileCache) { $stream = FileStream::fromString($content); } else { $stream = new InMemoryStream($content); } return $this->parse($stream, $security); } }