How to read the texts from a pdf file created by Adobe Distiller tool?
I'm currently using ABCPdf tool and I have a code sample to read pdf contents but it can only read the texts from pdfs which have been created by Adobe PDF Library:
public string ExtractTextsFromAllPages(string pdfFileName)
{
var sb = new StringBuilder();
using (var doc = new Doc())
{
doc.Read(pdfFileName);
for (var currentPageNumber = 1; currentPageNumber <= doc.PageCount; currentPageNumber++)
{
doc.PageNumber = currentPageNumber;
sb.Append(doc.GetText("Text"));
}
}
return sb.ToString();
}
I have other pdf files which have been created by Adobe Distiller and the above code doesn't work; I mean it returns the below strange data which seems encoded:
\0\a\b\0\t\n\0\r\n\0\a\b\t\n\n\b\v\f\0\t\r\f\b\0\r\0\r\n\v\b\v\f\f\n\r\0\r\0\0\0\b\r\n\0\a\r\0\0\b\r\b\b\t\n\r\0\b\r\n\t\b\v\n\b\v\v\0\a\b\r\n\r\n\v\r\0\b\b\b\v\r\0\r\n\v\f\r\f\f\r\n !\"\"\v#\t $ %&$% $'\v\"% \0( )% ! !\"\"'*$'\r\n\t $ %&$% $'\v\"% \0( \r\n\f\f\f\f\b\f\f\f\f\a \b\b\f\f\f!\"\r\n\f\a#$\f\f\f\b\f\f\a%\a \b\b\f\a\a&\a\a' \b\a\b\r\n(\f)\f)
How to read the texts from a pdf file created by Adobe Distiller tool?
To be said that I can open such pdf files using my browser easily like other pdfs.
Thanks,