Welcome Guest Search | Active Topics | Sign In | Register

HTML to PDF error Options
Diego
Posted: Wednesday, May 18, 2011 3:33:25 AM
Rank: Newbie
Groups: Member

Joined: 5/16/2011
Posts: 3
I was testing your dll, but when I have run your examples, they have crushed.
I've read this forum and I've found a post discussing this problem.
You said that, with the new version of this library, this problem is ok.
if I purchase this library, I will download this version?
eo_support
Posted: Wednesday, May 18, 2011 8:15:19 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Hi,

Can you provide a link about the other post that discusses the problem? Also please post detailed steps about the crash --- such as which sample you are trying to run and the stack trace, error message, etc.

Thanks!
Diego
Posted: Thursday, May 19, 2011 4:26:07 AM
Rank: Newbie
Groups: Member

Joined: 5/16/2011
Posts: 3
htmltopdf2


//Convert to a byte array
MemoryStream stream = new MemoryStream();
doc.Save(stream);
byte[] data = stream.ToArray();

//Send to the client
SetFileName("HtmlToPdf_Demo.pdf", data.Length);
Write(data, 0, data.Length);

In this case,
stream.lenght is 0, but if I save doc to disk and download it after, all it's ok.

/HtmlToPdf1.aspx doesn't work too

this code does works fine

PdfDocument doc = new PdfDocument();
HtmlToPdf.ConvertUrl("http://www.xxxxxx.es/Calendario.aspx", doc);
string filepath = "C:\\xxxxx\\prueba.pdf";

doc.Save(filepath);
HttpResponse response = HttpContext.Current.Response;
response.Clear();
response.ClearHeaders();
response.ContentType = "application/pdf";
response.AddHeader("Content-Type", "application/download");
response.AddHeader("Content-Disposition", string.Format("attachment; filename={0}", "Informe.pdf"));
response.AddHeader("Content-Transfer-Encoding", "binary");
response.AddHeader("Content-Length", new FileInfo(filepath).Length.ToString());

Response.WriteFile(filepath);
Response.End();

Diego
Posted: Thursday, May 19, 2011 4:28:59 AM
Rank: Newbie
Groups: Member

Joined: 5/16/2011
Posts: 3
The post I'm refering to, is:
EO.Pdf - failed to initialize conversion

Posted: domingo, 27 de marzo de 2011 12:50:12
eo_support
Posted: Thursday, May 19, 2011 8:35:00 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Hi,

Yes. That problem is already fixed. You can download the current version from our download page and it should no longer have that problem.

Thanks!


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