PDFsharp - moved to http://forum.pdfsharp.net/ Forum Index PDFsharp - moved to http://forum.pdfsharp.net/
Please visit the new PDFsharp forum at http://forum.pdfsharp.net/
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Important Notice: We regret to inform you that our free phpBB forum hosting service will be discontinued by the end of June 30, 2024. If you wish to migrate to our paid hosting service, please contact billing@hostonnet.com.
Need Newbie ASP.NET VB Help

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    PDFsharp - moved to http://forum.pdfsharp.net/ Forum Index -> Support - moved to http://forum.pdfsharp.net/
View previous topic :: View next topic  
Author Message
cleanden



Joined: 04 Sep 2008
Posts: 3

PostPosted: Thu Sep 04, 2008 5:07 am    Post subject: Need Newbie ASP.NET VB Help Reply with quote

I borrowed the following code: http://pdfsharp.pastebin.com/f4109e171
to try and create an arbitrary PDF on my site coded in VB but when I run it I see the following: http://i337.photobucket.com/albums/n379/cleandenver/PDFSharpError.gif

Any suggestions what I might be missing?

Thanks,
Alex
Back to top
View user's profile Send private message
Thomas Hoevel



Joined: 16 Oct 2006
Posts: 387
Location: Cologne, Germany

PostPosted: Thu Sep 04, 2008 8:06 am    Post subject: Reply with quote

The server sends PDF - I guess the content type is missing, so the browser shows it as TXT or HTML.

Look here
_________________
Regards
Thomas Hoevel
PDFsharp Team
Back to top
View user's profile Send private message Visit poster's website
cleanden



Joined: 04 Sep 2008
Posts: 3

PostPosted: Thu Sep 04, 2008 11:59 am    Post subject: Reply with quote

Line 61:
Response.ContentType = "application/pdf"

Any other suggestions?
Back to top
View user's profile Send private message
Thomas Hoevel



Joined: 16 Oct 2006
Posts: 387
Location: Cologne, Germany

PostPosted: Thu Sep 04, 2008 12:08 pm    Post subject: Reply with quote

You might try this (for a "Save as" prompt):
Response.AddHeader("content-disposition", "attachment; filename=test.pdf")

Or this (should be the default, but can't harm):
Response.AddHeader("Content-Disposition", "inline; filename=test.pdf")

Are other PDF files showing correct in the Browser?
_________________
Regards
Thomas Hoevel
PDFsharp Team
Back to top
View user's profile Send private message Visit poster's website
cleanden



Joined: 04 Sep 2008
Posts: 3

PostPosted: Thu Sep 04, 2008 12:12 pm    Post subject: Reply with quote

Already there in line 63

However, I changed:
Response.AddHeader("content-disposition", "attachment; filename=test.pdf")

to:
Response.AddHeader("Content-Disposition", "inline; filename=test.pdf")

and it started working.
Changed it back and it's still working!

Thanks for the help!
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    PDFsharp - moved to http://forum.pdfsharp.net/ Forum Index -> Support - moved to http://forum.pdfsharp.net/ All times are GMT
Page 1 of 1

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


Powered by phpBB © phpBB Group. Hosted by phpBB.BizHat.com


Start Your Own YouTube Clone

Free Web Hosting | Free Forum Hosting | FlashWebHost.com | Image Hosting | Photo Gallery | FreeMarriage.com

Powered by PhpBBweb.com, setup your forum now!
For Support, visit Forums.BizHat.com