I am trying to Encode one PDF using ASCII in C# and I am facing some problem. If PDF. ContentLenght increases like more that 1000000 then, I am unable to get encoded data in string but If I test in immediate window in VS2015 with same code I can see the encoded data but unable to get in string the same. Here the code which I am using
byte[] data = target.Array(); //PDF value in bytes
string data = Encoding.ASCII.GetString(data); //encoded data in string
This is what I get as a encoded data which is incorrect. can some one help me here.
%PDF-1.7
%????
1 0 obj
<</Type/Catalog/Pages 2 0 R/Lang(en-US) /StructTreeRoot 50 0 R/MarkInfo<</Marked true>>/Metadata 6566 0 R/ViewerPreferences 6567 0 R>>
endobj
2 0 obj
<</Type/Pages/Count 20/Kids[ 4 0 R 12 0 R 14 0 R 16 0 R 18 0 R 20 0 R 22 0 R 24 0 R 26 0 R 28 0 R 30 0 R 32 0 R 34 0 R 36 0 R 38 0 R 40 0 R 42 0 R 44 0 R 46 0 R 48 0 R] >>
endobj
3 0 obj
<</CreationDate(D:20200203070204+00'00') /ModDate(D:20200203070204+00'00') /Producer(??
Thanks in advance