We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Convert Docx with AltChunk (HTML file) into PDF

Hi all.


I’m trying to convert a docx file into pdf file and my docx file have a altchunk element, a html file with css styles (see attachment).

The entire docx file is converted to PDF, with one exception: the CSS styles defined in HTML header in altchunk are not apllied.

This is the code used to convert

public BinaryDataResponse DocX2Pdf(PdfServiceRequest request) {
LoadOptions lo = new LoadOptions();
lo.LoadFormat = LoadFormat.Docx;
MemoryStream stream = new MemoryStream();
MemoryStream outStream = new MemoryStream();

stream.Write(request.Content, 0, request.Content.Length);
Document doc = new Document(stream, lo);
doc.Save(outStream, SaveFormat.Pdf);
outStream.Flush();

BinaryDataResponse response = new BinaryDataResponse();
response.Content = outStream.ToArray();
outStream.Close();
}

This is the HTML file in altChunk


body { text-align: justify;font-family:Arial;font-size:10pt;line-height:18pt; }
  • Item 1
  • Item 2
  • Item 3



  • Thanks for your help.


    Hi Alexandre,

    Thanks for your inquiry. Could you please attach your input Word document here for testing? I will investigate the issue on my side and provide you more information.

    Hi.


    These are de input (docx) and the output document (pdf). As you can see the line height, font-size are different between docx document and PDF document.

    Thanks for your help.

    Hi Barbosa,

    Thanks for sharing the detail. I have tested the scenario and have managed
    to reproduce the same issue at my side. For the sake of correction, I
    have logged this problem in our issue tracking system as WORDSNET-12171.
    I have linked this forum thread to the same issue and you will be
    notified via this forum thread once this issue is resolved.

    We apologize for your inconvenience.

    Many thanks Tahir.


    About this issue, do you have any news? When it is expected that the patch is available?

    Thanks.
    AB.

    Hi Barbosa,

    Thanks
    for your inquiry. I regret to share with you that this issue has been postponed. We will inform you as soon as there are
    any further developments.

    We apologize for your inconvenience.

    Hi Tahir,


    do you have any news about this issue?
    I have a problem in a customer and need to solve this problem.
    Actually i use the Aspose.Words 15.1.0.0 and i am a colleague of Alexandre Barbosa and the issue is the same from his post.

    Many Thanks
    Nuno Semedo
    Fujitsu


    Hi Nuno,

    Thanks for your inquiry. We have verified the status of this issue from our issue tracking system and regret to share with you that this issue is still postponed. We will inform you via this forum thread once this issue is resolved.

    We apologize for your inconvenience.


    Just wondering…has this issue been resolved?

    Hi Nuno,

    Thanks for your inquiry. We regret to share with you that your issue is still postponed. However, we have asked for the ETA of this issue from our product team. As soon as any information is shared by them, we will be more than happy to share that with you.

    We apologize for your inconvenience.

    The issues you have found earlier (filed as WORDSNET-12171) have been fixed in this Aspose.Words for .NET 17.4 update and this Aspose.Words for Java 17.4 update.


    This message was posted using Notification2Forum from Downloads module by aspose.notifier.