Spire.PDF is a professional PDF library applied to creating, writing, editing, handling and reading PDF files without any external dependencies. Get free and professional technical support for Spire.PDF for .NET, Java, Android, C++, Python.

Tue Sep 30, 2014 12:39 pm

Hello All,

I am trying to convert html to pdf; but somehow I am not able to do that.
There are two projects one is web application to call Spire methods and other is Library Project which consists Spire.PDF methods.

Now, I am sending html in string format to the pdf project; the string is as follows
Code: Select all
String str = "<div id=\"c1\" style=\"background-image: url('Image/Tulips.jpg'); height: 1030.0px; width: 796.0px; position: relative;\"></div>"


The string contains image path; But this image is not getting added into the PDF. It is generating the blank PDF.

We have tried with localhost, physical path and path given in the above string; Still the image is not getting added.

What is the possible solution on this ? Why it not accessing any path. Reference of Spire.PDF is already given in the web application and Image folder resides in web application.

Regards,
David

davidfernandes
 
Posts: 7
Joined: Fri Sep 12, 2014 5:51 am

Wed Oct 01, 2014 7:01 am

Dear davidfernandes,

Thanks for your inquiry.

Sorry for the problem you encountered.
I have posted this issue to our dev team, we will inform you as soon as it is resolved.

Best regards,
Burning
E-iceblue Support Team
Best Regards,
Burning
E-iceblue Support Team
User avatar

burning.liu
 
Posts: 406
Joined: Mon Aug 04, 2014 6:47 am

Mon Oct 13, 2014 4:17 am

Why no one is replying on this issue ?
Regards,
David

davidfernandes
 
Posts: 7
Joined: Fri Sep 12, 2014 5:51 am

Mon Oct 13, 2014 6:23 am

Dear davidfernandes,

Sorry for the delay reply.

I got news from the dev team that when you call the method
Code: Select all
LoadFromHtml(sourceCode,true,settings,format)
It just reads the sourceCode of the html file, the image is not read. So when it converted, it turned out to be blank.

Please try this method:
Code: Select all
LoadFromHTML("convert.html", false, true, true, settings, format);

Best regards,
Burning
E-iceblue Support Team
Best Regards,
Burning
E-iceblue Support Team
User avatar

burning.liu
 
Posts: 406
Joined: Mon Aug 04, 2014 6:47 am

Thu Oct 16, 2014 7:05 am

Dear davidfernandes,

Has your problem been resolved?
If not, please provide more information to help us resolve it.

Best regards
Burning
E-iceblue Support Team
Best Regards,
Burning
E-iceblue Support Team
User avatar

burning.liu
 
Posts: 406
Joined: Mon Aug 04, 2014 6:47 am

Mon Oct 20, 2014 9:08 am

Yes, it has been solved
Thanks !

davidfernandes
 
Posts: 7
Joined: Fri Sep 12, 2014 5:51 am

Mon Oct 20, 2014 9:18 am

Dear davidfernandes,

Please feel free to contact us if you have any problems.

Best Regards,
Burning
E-iceblue Support Team
Best Regards,
Burning
E-iceblue Support Team
User avatar

burning.liu
 
Posts: 406
Joined: Mon Aug 04, 2014 6:47 am

Return to Spire.PDF