Sign In  Sign Up Live-Chat

HTML to PDF

Last post 09-19-2007, 5:46 AM by Hans.firefox. 5 replies.
Sort Posts: Previous Next
  •  08-31-2007, 8:54 AM 93094

    HTML to PDF

    Good day.

    I have an HTML-file containing &nbsp; special characters (<div>&nbsp;</div>). I create a Word document from that HTML and formatting is correct, just great. But then I create a PDF document from the Word doc and the problem comes out.

    Aspose's Words API removes all &nbsp; characters with #$NBS symbols during AsposePdf file generation and PDF doc created after that contains "#$NBS " strings, not empty spaces. I'm quite confused about it, so what can be done to avoid this situation? Is it a bug or am I doing something wrong?

    P.S. When the input is, for example, <div>&nbsp;&nbsp;&nbsp;&nbsp;</div> it shows only one "#$NBS" string, not four, so it seems to me it's something wrong with "&nbsp;</div>" combination.

    Aspose.Words.Document doc = new Aspose.Words.Document(docFullPath, LoadFormat.Doc, "");

    string xmlFullPath = String.Format(@"{0}{1}.xml", tempPath, fileName);

    doc.Save(xmlFullPath, SaveFormat.AsposePdf);

    Aspose.Pdf.Pdf pdf = new Aspose.Pdf.Pdf();

    pdf.IsImagesInXmlDeleteNeeded = true;

    pdf.BindXML(xmlFullPath, null);

    string pdfFullPath = String.Format(@"{0}{1}.pdf", tempPath, fileName);

    pdf.Save(pdfFullPath);

     
  •  08-31-2007, 11:46 AM 93113 in reply to 93094

    Re: HTML to PDF

    Hi,

    I have logged this issue as PDFNET-3678. We will investigate this issue and will let you know as soon as the bug has been fixed.

    Thanks.

     
  •  09-04-2007, 12:38 PM 93447 in reply to 93094

    Re: HTML to PDF

    Hi,

    I think this is a bug. We are working on this issue now. I hope we can fix it in three days. Once we have any progress, we will let you know.

    Best regards
    Hans

    Hans Zhang
    Product Developer
    Aspose Changsha Team
    About Us
    Contact Us
     
  •  09-11-2007, 3:01 PM 94472 in reply to 93094

    Re: HTML to PDF

    Attachment: Present (inaccessible)
    Hi,

    The bug has been fixed. Please try the attached dll. Thanks for your patience.

    Best regards.

    Hans Zhang
    Product Developer
    Aspose Changsha Team
    About Us
    Contact Us
     
  •  09-19-2007, 3:52 AM 95395 in reply to 94472

    Re: HTML to PDF

    Thank you very much, it works just perfect now. Except one more thing. Aspose.PDF doesn't aplly the license of mine with the following exception:

    Cannot find black listed licenses resource. Please report this error to Aspose.

    I'm trying to execute the following code:

    (new Aspose.Pdf.License()).SetLicense("Aspose.Custom.lic");

     
  •  09-19-2007, 5:46 AM 95410 in reply to 95395

    Re: HTML to PDF

    Attachment: Present (inaccessible)
    Sorry,please try this version.

    Best regards.

    Hans Zhang
    Product Developer
    Aspose Changsha Team
    About Us
    Contact Us
     
View as RSS news feed in XML