Creating a PDF

  • Thread starter Thread starter jmrasmus
  • Start date Start date
J

jmrasmus

I am trying to create a PDF file in C# .NET from a string. Here is my
code...

Encoding unicode = Encoding.Unicode;
byte[] unicodeBytes = unicode.GetBytes(sBuffer);

Response.BinaryWrite(unicodeBytes);
Response.End();

where sBuffer is a string.


I am getting an Acrobat error that states the file is corrupted and
cannot be repaired.

Can anyone please help, I have been stuck on this for days.

TIA

Jim
 
Hi,

What are you using to create the pdf?
You need some third party tool or control that generate the PDF file.
 
Hi,

What are you using to create the pdf?
You need some third party tool or control that generate the PDF file.




I am trying to create a PDF file in C# .NET from a string. Here is my
code...
Encoding unicode = Encoding.Unicode;
byte[] unicodeBytes = unicode.GetBytes(sBuffer);
Response.BinaryWrite(unicodeBytes);
Response.End();

where sBuffer is a string.
I am getting an Acrobat error that states the file is corrupted and
cannot be repaired.
Can anyone please help, I have been stuck on this for days.

Jim- Hide quoted text -

- Show quoted text -

Sorry, PDFLib
 
I am trying to create a PDF file in C# .NET from a string. Here is my
code...

Encoding unicode = Encoding.Unicode;
byte[] unicodeBytes = unicode.GetBytes(sBuffer);

Response.BinaryWrite(unicodeBytes);
Response.End();

where sBuffer is a string.


I am getting an Acrobat error that states the file is corrupted and
cannot be repaired.

Can anyone please help, I have been stuck on this for days.

TIA

Jim
Unicode != PDF. PDF is a specific file format for Adobe Acrobat
compatible files. See
http://www.adobe.com/devnet/pdf/pdf_reference.html for details.

rossum
 
Back
Top