Spire.PDF is a professional PDF library applied to creating, writing, editing, handling and reading PDF files without any external dependencies within .NET ( C#, VB.NET, ASP.NET, .NET Core) application and Java (J2SE and J2EE) application.

Mon Jul 16, 2012 11:50 am

I'm trying to insert this html code in a document:

Dim htmlText as String = "<a href=""http://www.google.com""><img alt=""Picture"" src=""C:\picture.png"" /></a>"

document.Sections(0).AddParagraph().AppendHTML(htmlText)

If I save the document as FileFormat.Doc, it will be saved OK, but if i save it as PDF, the the picture appears twice.

Can you reproduce this?

catalin
 
Posts: 48
Joined: Wed Mar 14, 2012 12:56 pm

Mon Jul 16, 2012 12:03 pm

And if i put this in a table, and then in a div, like:

html= "<div><table><tr><td><a href=""www...""><img src=".." alt="..." /></a></td></tr></table></div>"

then the resulting pdf document will be empty. I think the problem is the link tag, "<a>", containing an image tag "<img>". Can this be fixed? thanks

catalin
 
Posts: 48
Joined: Wed Mar 14, 2012 12:56 pm

Tue Jul 17, 2012 6:03 am

Hi catalin,

We have reproduced the issue you met, but we need some more time to fix it.Once it has be fixed, we will notify you immediately.
Thanks for your understanding and cooperation.

Have a nice day!

Amy
e-iceblue support
User avatar

amy.zhao
 
Posts: 2328
Joined: Wed Jun 27, 2012 8:50 am

Tue Aug 07, 2012 7:22 am

Hello, i would like to know if you found a solution for this problem. We already purchased Spire.Doc and this bug fix would really be necessary for us (for others also, im sure)
Thank you for support.

catalin
 
Posts: 48
Joined: Wed Mar 14, 2012 12:56 pm

Wed Aug 08, 2012 2:12 am

Hi catalin,

Thanks for your patience and so sorry for a long-time waiting.

Please dont mind that I add the answers after your problems.
#"1.if i save it as PDF, the the picture appears twice."
The problem has be fixed, please download the latest hotfix(Spire.doc_4.4.6) from here(http://www.e-iceblue.com/Download/download-word-for-net-now.html ).

#"2.if i put this in a table, and then in a div,the resulting pdf document will be empty."
The problem has some difficult, we need more time to fix it. However, we will inform you immediately once it has be fixed.

I am sorry that inconvenience caused by us again.

Best wishes.

Amy
e-iceblue support
User avatar

amy.zhao
 
Posts: 2328
Joined: Wed Jun 27, 2012 8:50 am

Wed Sep 05, 2012 10:38 am

Dear catalin,

Thanks for you waiting.
The bug putting a table in a div and then the resulting pdf document will be empty has been fixed, please download Spire.Doc Pack (Hot Fix) Version:4.4.24 from the link http://www.e-iceblue.com/Download/download-word-for-net-now.html.
If you have any problems, please feel free to contact us.

Amy
e-iceblue support
User avatar

amy.zhao
 
Posts: 2328
Joined: Wed Jun 27, 2012 8:50 am

Thu Sep 06, 2012 6:46 am

Hello Amy,

Yes, it seems that the bug is fixed now.

Unfortunately, i have discovered a new one :)

when the HTML code looks like this:

Code: Select all
<div>
  <table>
    <tr>
        <td><a target=""_blank"" href=""http://www.something.com""><img alt=""Image"" src=""C:\Test.jpg""/></a></td>
        <td>asdfasdfasdf</td>
    </tr>
   </table>
</div>


When the first cell of a table contains an <a> link, containing an <img> image, and no text at all, then if there is a second cell, containing whatever, the pdf document wont append the html code, and the resulting pdf document will be empty.

It is funny, because, if the first cell contains some text, like:
Code: Select all
<td><a ...><img ... /></a> text text text</td>


then the code is correct appended, and the pdf will be ok. But i have no text in that cell, and therefore the resulting pdf is not good.
Please check if you can reproduce this error.

Thank you.
Catalin.

catalin
 
Posts: 48
Joined: Wed Mar 14, 2012 12:56 pm

Thu Sep 06, 2012 10:09 am

Dear catalin,

We have reproduced the error which you met, and have defined it as a bug, sorry for that. We are struggling to fix it. Once it has been fixed, we will inform you immdiately.

Best wishes,
Amy
e-iceblue support
User avatar

amy.zhao
 
Posts: 2328
Joined: Wed Jun 27, 2012 8:50 am

Thu Sep 20, 2012 5:47 am

Dear catalin,

Thanks for you waiting.

The bug that the resulting pdf document is empty if only adding text into second cell has been fixed, please download Spire.Doc Pack (Hot Fix) Version:4.4.30 from the link http://www.e-iceblue.com/Download/download-word-for-net-now.html.
If you hava any problem, please feel free to contact us.

Best regards,
Amy
e-iceblue support
User avatar

amy.zhao
 
Posts: 2328
Joined: Wed Jun 27, 2012 8:50 am

Thu Sep 20, 2012 6:21 am

Yes, it works, thank you very much :)

catalin
 
Posts: 48
Joined: Wed Mar 14, 2012 12:56 pm

Thu Sep 20, 2012 7:07 am

Dear catalin,

You are welcome. :lol:
If you have any problems, please feel free to contact us.

Best regards,
Amy
e-iceblue support
User avatar

amy.zhao
 
Posts: 2328
Joined: Wed Jun 27, 2012 8:50 am

Mon Dec 03, 2012 1:20 pm

Hmm ... I dont know what you did to Spire.PDF, but trying to append HTML images that have as source .PNG images, it doesnt work again.

Code: Select all
Dim doc As New Document
doc.AddSection()
doc.Sections(0).AddParagraph().AppendHTML("<img alt=""Picture"" src=""C:\image.png"" />")
doc.SaveToFile("C:\image.pdf", FileFormat.PDF)


I remember you saying that Spire.Doc Version 4.4.6 made this function.
Thank you

catalin
 
Posts: 48
Joined: Wed Mar 14, 2012 12:56 pm

Tue Dec 04, 2012 2:27 am

Dear catalin,

Thanks for your inquiry.
We have done some tests, but we don't reproduce your problem. We use spire.doc.dll(v4.5.25.3040),spire.pdf.dll(v2.6.29.3040),spire.license.dll(v1.3.2.40) in bin/.net of Spire.Doc Pack (Hot Fix) Version:4.5.25 to do a test demo. It runs smoothly on our side. We provide you the demo. Please download Spire.Doc Pack (Hot Fix) Version:4.5.25 from the link http://www.e-iceblue.com/Download/download-word-for-net-now.html. Please try to run the demo, and tell us whether it works fine on your side. Thank you!

Best regards,
Amy
E-iceblue support
You do not have the required permissions to view the files attached to this post.
User avatar

amy.zhao
 
Posts: 2328
Joined: Wed Jun 27, 2012 8:50 am

Tue Dec 04, 2012 6:58 am

Yes, it seems that the problem is with the images i try to insert. They're somehow wrong encoded or something. I'll figure that out.Thank you for your sample.

catalin
 
Posts: 48
Joined: Wed Mar 14, 2012 12:56 pm

Wed Dec 05, 2012 1:24 am

Dear catalin,

You are welcome.
If you encounter any problem, please feel free to contact us.

Have a nice day!

Best regards,
Amy
E-iceblue support
User avatar

amy.zhao
 
Posts: 2328
Joined: Wed Jun 27, 2012 8:50 am

Return to Spire.PDF