For Programmers: Free Programming Magazines  


Home > Archive > Visual Basic Crystal Reports > April 2005 > Problem using a binary stream to generate a PDF in Visual Studio .NET









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Problem using a binary stream to generate a PDF in Visual Studio .NET
Oliviero Dall'Asta

2005-04-28, 8:59 am

I'm using this code to generate a DOC file with CR .NET and it's working
fine:

..........
Dim MyStream As System.IO.Stream

'MyStream = reportObject.ExportToStream(ExportFormatType.WordForWindows) '
for word type

MyStream = reportObject.ExportToStream(ExportFormatType.PortableDocFormat) '
for PDF

Response.ClearHeaders()

Response.ClearContent()

'Response.ContentType = "application/msword" ' for word type

Response.ContentType = "application/pdf" ' for PDF type

Dim MyBuffer(CType(MyStream.Length, Integer)) As Byte

MyStream.Read(MyBuffer, 0, CType(MyStream.Length, Integer))

Response.BinaryWrite(MyBuffer)

Response.End()



If I'm trying to generate a PDF files ( using commented lines) I've this
message error when Acrobat is starting on my client browser:

"Trovato token sconosciuto: '0,05'" ( in English,something like:
Unknow token found....)

What does it mean?

No problems generating DOC files !!

Thanks. Oliviero






Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com