Closed jaredhall05 closed 12 years ago
That's a stupid question to ask after thirteen days, but do you get the same error when you've got 'http://' in front of image url in img tag?
Tested page
<html>
<body>
<h1>Hello world!</h1>
<img src='http://www.dogbreedinfo.com/images17/NorthernInuitDogFreya14wks.JPG' />
<a href='http://www.google.com'>Google</a>
</body>
</html>
with this code:
SynchronizedPechkin sc = new SynchronizedPechkin(new GlobalConfig().SetPaperSize(PaperKind.Letter).SetPaperOrientation(true));
byte[] buf = sc.Convert(new ObjectConfig(), htmlText.Text);
it worked. Really don't think that those options are relevant. SimplePechkin also didn't throw any error (I was testing in WinForms).
The error could be thrown even in SynchronizedPechkin
, if you first use SimplePechkin
somewhere else in the code. Could you check for that too?
When I removed http://
from link it didn't crash either, it just showed small empty square.
Sorry, forget to update this post, the problem went away after moving to a server. This only occurred when running locally.
Thanks for looking into this.
That's weird. But not relevant now, I guess.
If you'll need to run the program locally, just reopen the ticket :)
I'm trying to use the following code:
with requestData.HtmlContent =
Without the img tag it works fine, but with the image I get the following error:
I've tried a few different images all with the same problem. I even tried using the example and having it render http://google.com but that didn't help either.
If I use SynchronizedPechkin the error still occurs but is hidden away and I don't actually get the error message in visual studio
I'm using this in .NET 4.5 with WebApi in Visual Studio 2012.