Hi,
We are trying to convert PDF documents to Word documents, but the files generated by Spire.PDF have several issues, including incorrect layouts, overlapping content, and missing text.
We compared the Spire.PDF output with the same document exported using Adobe. The Adobe-generated Word document preserves the content and layout much more accurately, while the Spire.PDF-generated documents appear to have issues extracting and positioning data from the original PDF.
There is also a significant difference in file size. The Word document generated by Adobe is approximately 25 KB, while the same document generated by Spire.PDF is approximately 3 MB.
See the comparison below:
The three files show different results depending on how document recognition is handled.
**Recognition Mode ON:** Recognition is enabled, so the system attempts to identify text and other elements in the document. However, the recognition is only partially successful. Some text, such as the “Try it” paragraph, is extracted, while much of the remaining content is represented as images or graphical elements. As a result, the original page structure becomes fragmented and much of the text is not available as readable or searchable text.
**Adobe:** The Adobe-generated version provides the best recognition result of the three. Most of the document content is correctly available as text, including the introductory paragraphs, “Welcome to Word,” the “Write eloquently, with a little help” section, and the instructions about spelling and grammar. The visual content is also retained. This makes the document much more suitable for searching, text extraction, accessibility, or further processing.
**Recognition Mode OFF:** With recognition disabled, essentially no text is extracted from the document. The page is represented primarily through visual or image elements, and the parser explicitly reports that no text could be parsed. This means that although the document may still look correct visually, its text is not available as searchable or machine-readable content.
Overall, **Recognition Mode OFF** preserves the visual representation but provides essentially no text extraction. **Recognition Mode ON** attempts to recognize the content and extracts some text, but the result is incomplete and fragmented. **Adobe** successfully extracts most of the text while retaining the visual content and therefore provides the strongest result for this particular document.
Is there away to improve those results?
Spire.Pdf.PdfDocument f = new Spire.Pdf.PdfDocument();
f.LoadFromFile(inputFile);
f.ConvertOptions.SetPdfToDocOptions(true, serviceInfo.useRecognition);
if (f.Pages.Count > 0)
{
f.SaveToFile(outPutFile, FileFormat.DOCX);
}
Thanks