PDFsharp & MigraDoc Foundation
https://forum.pdfsharp.net/

MemoryStream: FileHeader is missing
https://forum.pdfsharp.net/viewtopic.php?f=2&t=267
Page 1 of 1

Author:  Tom [ Sat Nov 24, 2007 10:54 pm ]
Post subject:  MemoryStream: FileHeader is missing

Hi,

If I save a document into a MemoryStream and send it via email, the file header (%PDF-1.4 %ÓôÌá % PDFsharp Ver...) is missing. The document cannot be opened, too.

How can I fix it?

ms(i) = New MemoryStream
pdf.Save(ms(i), False)
msg.Attachments.Add(New Attachment(ms(i), "Document.pdf", "application/pdf"))

Author:  Tom [ Sat Nov 24, 2007 11:44 pm ]
Post subject:  Re: MemoryStream: FileHeader is missing

definately gotta get more sleep
ms(i) = New MemoryStream
pdf.Save(ms(i), False)
ms(i).Position = 0
msg.Attachments.Add(New Attachment(ms(i), "Document.pdf", "application/pdf"))

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/