Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Technical Questions
Message Icon Topic: URGENT : Help with parsing the PDF generated by Cr Post Reply Post New Topic
Author Message
uxpalan
Newbie
Newbie


Joined: 28 Oct 2008
Online Status: Offline
Posts: 1
Quote uxpalan Replybullet Topic: URGENT : Help with parsing the PDF generated by Cr
    Posted: 28 Oct 2008 at 11:59am

Hi

I am trying to parse the contents of the PDF with iTextSharp using :

PdfReader reader = new PdfReader("Test.pdf");
reader.GetPageContent(pageNumber);

byte[] pageContentByteArray;

I am using this byte array to search for a partcular text based on a Delimiter pattern by converting this to string by using -

string test = Encoding.ASCII.GetString(pageContentByteArray);

The required text pattern can be matched inside this string.

The above logic works absolutely fine if we use a normal PDF input file.

My requirement is to read a PDF file which is created by CRYSTAL REPORTS (Version-9).

I have a byte array with me. But I tried to convert to string using ASCII, UNICODE , UTF8

            string test = Encoding.ASCII.GetString(invoicePageContentByteArray);
            string test = Encoding.Unicode.GetString(invoicePageContentByteArray);
            string test = Encoding.UTF8.GetString(invoicePageContentByteArray);

I could not find the text pattern in the output string. I guess the PDF generated out of crystal reports is using some other encoding format.

(Note : We verified the template used by crystal reports to generate the PDF. The search delimiter pattern is defined as the Text object)

Can anyone suggest ideas to resolve the above problem.

Thanks,
Uma

IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.016 seconds.