Welcome Guest Search | Active Topics | Sign In | Register

Importing an image from a UNC path Options
Vercuski
Posted: Wednesday, August 24, 2011 10:31:58 AM
Rank: Newbie
Groups: Member

Joined: 8/24/2011
Posts: 2
I'm having an issue importing an image from a UNC path.

I have a program that generates an HTML based invoice. It then stores the HTML and also converts it into a PDF. Within the invoice I have the following image link ...

<img src="\\server\e$\images\signatures\signature_XYZ.png">

When I export the HTML straight into a file and view it, the image shows up fine. When I run it through the HtmlToPDF converter, everything imports correctly except the image file. I need to find out why this file is not importing. Where might I start debugging this issue? Does the EO library have any internal error codes I could reference as to why the image is not being pulled in.

Thank you,
Scott Vercuski
eo_support
Posted: Wednesday, August 24, 2011 1:37:10 PM
Rank: Administration
Groups: Administration

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

Please check two things:

1. Whether you were calling ConvertHtml. If you call ConvertHtml, then you must also set HtmlToPdf.Options.BaseUrl. This is necessary to enable local file access. Otherwise the convert consider the resource as "internet only" and would not access local files for security reasons;

2. Whether you have the latest version (dll version number 3.0.62.2). This build added some additional code to handle both local and remote UNC path;

Please let us know if it works for you.

Thanks!
Vercuski
Posted: Wednesday, August 24, 2011 1:52:37 PM
Rank: Newbie
Groups: Member

Joined: 8/24/2011
Posts: 2
Thank you for the reply.

I am using DLL version 3.0.62.2 so I'm on the latest.

Question about the BaseUrl option. What would I set it to in order to access the UNC path? The path I have in the image tag is an absolute path.

Thanks,
Scott
eo_support
Posted: Wednesday, August 24, 2011 2:05:20 PM
Rank: Administration
Groups: Administration

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

If all the images are in absolute path, then it really doesn't matter what you set BaseUrl ---- you just have to set it to a local path (for example, "file:///c:/" instead of "http://something"). Once you set it to a local file path, it will allow you to access local files. Otheriwse it will only recognize anything comes from "http" or "https".

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.