Welcome Guest Search | Active Topics | Sign In | Register

Error on converting html to pdf Options
Dev Magnet
Posted: Wednesday, April 20, 2016 12:12:59 PM
Rank: Newbie
Groups: Member

Joined: 9/30/2014
Posts: 4
Our clients are getting these errors but we cannot reproduce in house.

VersFailed to convert Url 'T:\XXXXXXXXXX\XXXXXXXXX\XXXXXXXXXXXXX\XXXXXXXXXXXXXXXXXXXXXXXXXX\XXXXXXXX\Resources\front.html'.(1037:Can not read from the file.)
at EO.Internal.ak6.b(BinaryReader A_0)
at EO.Internal.aik.a(ak6 A_0)
at EO.Pdf.HtmlToPdf.ConvertUrl(String url, PdfDocument doc, HtmlToPdfOptions options)
at M.App.C.Export.ExportPdf.SaveFile(String path, String art)
eo_support
Posted: Wednesday, April 20, 2016 4:14:32 PM
Rank: Administration
Groups: Administration

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

You can try the latest build and see if you still see the same problem. If the problem still occurs, then you can try to isolate the problem into a test project and then send the test project to us. See here for more information on how to send the test project to us:

http://www.essentialobjects.com/forum/test_project.aspx

Thanks!
Dev Magnet
Posted: Wednesday, April 27, 2016 5:04:45 PM
Rank: Newbie
Groups: Member

Joined: 9/30/2014
Posts: 4
So we have isolated the issue to html file paths that have the "#" in it.

Ie. C:\Users\Test\htmlpage#.html

We get exception in my first post, but windows allows # as a path character.
eo_support
Posted: Wednesday, April 27, 2016 5:44:19 PM
Rank: Administration
Groups: Administration

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

"#" has special meaning in a Url as fragment identifier:

https://en.wikipedia.org/wiki/Fragment_identifier

If you do not want it to be interpreted as fragment identifier, try to call HttpUtilty.UrlEncode on the file Url before you pass it to ConvertUrl. It will replace # with %23 and then it should work.

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.