Font Line Height is wrong in PDF with v9.2.0

Hi,

Please check the attached PDF and .DOC files, you’ll see that upgrading Aspose.Words from v9.1.0 to v9.2.0 yields a different PDF rendering. With some TTF fonts, the line breaks are wrong in the PDF, but are ok in the Doc format. Some lines overlap over one another instead of being one after the other.

I also attached many fonts used in this test.

This is pretty important as v9.2.0.0 will be unusable until this issue is fixed…

Thanks,

Dominic.

Here is the code used :

public static void TestAsposeWords06()
{
    // OTF Fonts do not seem to work...
    Aspose.Words.Document wordDocument = new Aspose.Words.Document();
    wordDocument.RemoveAllChildren();

    Aspose.Words.Style style;

    // Normal
    style = wordDocument.Styles[Aspose.Words.StyleIdentifier.Normal];
    style.Font.Size = 10;

    style = wordDocument.Styles.Add(Aspose.Words.StyleType.Paragraph, "Whitney Light");
    style.BaseStyleName = wordDocument.Styles[Aspose.Words.StyleIdentifier.Normal].Name;
    style.Font.Name = "Whitney-Light";

    style = wordDocument.Styles.Add(Aspose.Words.StyleType.Paragraph, "Whitney Light Bold");
    style.BaseStyleName = wordDocument.Styles["Whitney Light"].Name;
    style.Font.Bold = true;

    style = wordDocument.Styles.Add(Aspose.Words.StyleType.Paragraph, "Whitney Medium");
    style.BaseStyleName = wordDocument.Styles[Aspose.Words.StyleIdentifier.Normal].Name;
    style.Font.Name = "Whitney-Medium";

    style = wordDocument.Styles.Add(Aspose.Words.StyleType.Paragraph, "Whitney Semibold");
    style.BaseStyleName = wordDocument.Styles[Aspose.Words.StyleIdentifier.Normal].Name;
    style.Font.Name = "Whitney-Semibold";

    style = wordDocument.Styles.Add(Aspose.Words.StyleType.Paragraph, "Folio Light");
    style.BaseStyleName = wordDocument.Styles[Aspose.Words.StyleIdentifier.Normal].Name;
    style.Font.Name = "Folio-Light";

    style = wordDocument.Styles.Add(Aspose.Words.StyleType.Paragraph, "Folio Lt BT");
    style.BaseStyleName = wordDocument.Styles[Aspose.Words.StyleIdentifier.Normal].Name;
    style.Font.Name = "Folio Lt BT";

    style = wordDocument.Styles.Add(Aspose.Words.StyleType.Paragraph, "Folio Medium");
    style.BaseStyleName = wordDocument.Styles[Aspose.Words.StyleIdentifier.Normal].Name;
    style.Font.Name = "Folio-Medium";

    style = wordDocument.Styles.Add(Aspose.Words.StyleType.Paragraph, "Calibri");
    style.BaseStyleName = wordDocument.Styles[Aspose.Words.StyleIdentifier.Normal].Name;
    style.Font.Name = "Calibri";

    style = wordDocument.Styles.Add(Aspose.Words.StyleType.Paragraph, "Californian FB");
    style.BaseStyleName = wordDocument.Styles[Aspose.Words.StyleIdentifier.Normal].Name;
    style.Font.Name = "Californian FB";

    style = wordDocument.Styles.Add(Aspose.Words.StyleType.Paragraph, "Californian FB Bold");
    style.BaseStyleName = wordDocument.Styles["Californian FB"].Name;
    style.Font.Bold = true;

    style = wordDocument.Styles.Add(Aspose.Words.StyleType.Paragraph, "VAG Rounded Light");
    style.BaseStyleName = wordDocument.Styles[Aspose.Words.StyleIdentifier.Normal].Name;
    style.Font.Name = "VAG Rounded";

    style = wordDocument.Styles.Add(Aspose.Words.StyleType.Paragraph, "VAGRounded-Light");
    style.BaseStyleName = wordDocument.Styles[Aspose.Words.StyleIdentifier.Normal].Name;
    style.Font.Name = "VAGRounded-Light";

    Aspose.Words.DocumentBuilder builder = new Aspose.Words.DocumentBuilder(wordDocument);

    builder.ParagraphFormat.StyleIdentifier = Aspose.Words.StyleIdentifier.Normal;
    builder.Writeln("This should be in Normal" + " ╔trangement, dΘjα ambiguδ, α MontrΘal je prΘfΦre ha∩r ce garτon.");
    builder.ParagraphFormat.ClearFormatting();

    builder.Writeln();

    builder.ParagraphFormat.Style = builder.Document.Styles["Whitney Light"];
    builder.Writeln("This should be in " + builder.ParagraphFormat.Style.Name);
    builder.Writeln("╔trangement, dΘjα ambiguδ, α MontrΘal je prΘfΦre ha∩r ce garτon.");
    builder.ParagraphFormat.ClearFormatting();

    builder.Writeln();

    builder.ParagraphFormat.Style = builder.Document.Styles["Whitney Light Bold"];
    builder.Writeln("This should be in " + builder.ParagraphFormat.Style.Name);
    builder.Writeln("╔trangement, dΘjα ambiguδ, α MontrΘal je prΘfΦre ha∩r ce garτon.");
    builder.ParagraphFormat.ClearFormatting();

    builder.Writeln();

    builder.ParagraphFormat.Style = builder.Document.Styles["Whitney Medium"];
    builder.Writeln("This should be in " + builder.ParagraphFormat.Style.Name);
    builder.Writeln("╔trangement, dΘjα ambiguδ, α MontrΘal je prΘfΦre ha∩r ce garτon.");
    builder.ParagraphFormat.ClearFormatting();

    builder.Writeln();

    builder.ParagraphFormat.Style = builder.Document.Styles["Whitney Semibold"];
    builder.Writeln("This should be in " + builder.ParagraphFormat.Style.Name);
    builder.Writeln("╔trangement, dΘjα ambiguδ, α MontrΘal je prΘfΦre ha∩r ce garτon.");
    builder.ParagraphFormat.ClearFormatting();

    builder.Writeln();

    builder.ParagraphFormat.Style = builder.Document.Styles["Folio Light"];
    builder.Writeln("This should be in " + builder.ParagraphFormat.Style.Name);
    builder.Writeln("╔trangement, dΘjα ambiguδ, α MontrΘal je prΘfΦre ha∩r ce garτon.");
    builder.ParagraphFormat.ClearFormatting();

    builder.Writeln();

    builder.ParagraphFormat.Style = builder.Document.Styles["Folio Lt BT"];
    builder.Writeln("This should be in " + builder.ParagraphFormat.Style.Name);
    builder.Writeln("╔trangement, dΘjα ambiguδ, α MontrΘal je prΘfΦre ha∩r ce garτon.");
    builder.ParagraphFormat.ClearFormatting();

    builder.Writeln();

    builder.ParagraphFormat.Style = builder.Document.Styles["Folio Medium"];
    builder.Writeln("This should be in " + builder.ParagraphFormat.Style.Name);
    builder.Writeln("╔trangement, dΘjα ambiguδ, α MontrΘal je prΘfΦre ha∩r ce garτon.");
    builder.ParagraphFormat.ClearFormatting();

    builder.Writeln();

    builder.ParagraphFormat.Style = builder.Document.Styles["Calibri"];
    builder.Writeln("This should be in " + builder.ParagraphFormat.Style.Name);
    builder.Writeln("╔trangement, dΘjα ambiguδ, α MontrΘal je prΘfΦre ha∩r ce garτon.");
    builder.ParagraphFormat.ClearFormatting();

    builder.Writeln();

    builder.ParagraphFormat.Style = builder.Document.Styles["Californian FB"];
    builder.Writeln("This should be in " + builder.ParagraphFormat.Style.Name);
    builder.Writeln("╔trangement, dΘjα ambiguδ, α MontrΘal je prΘfΦre ha∩r ce garτon.");
    builder.ParagraphFormat.ClearFormatting();

    builder.Writeln();

    builder.ParagraphFormat.Style = builder.Document.Styles["Californian FB Bold"];
    builder.Writeln("This should be in " + builder.ParagraphFormat.Style.Name);
    builder.Writeln("╔trangement, dΘjα ambiguδ, α MontrΘal je prΘfΦre ha∩r ce garτon.");
    builder.ParagraphFormat.ClearFormatting();

    builder.Writeln();

    builder.ParagraphFormat.Style = builder.Document.Styles["VAG Rounded Light"];
    builder.Writeln("This should be in " + builder.ParagraphFormat.Style.Name);
    builder.Writeln("╔trangement, dΘjα ambiguδ, α MontrΘal je prΘfΦre ha∩r ce garτon.");
    builder.ParagraphFormat.ClearFormatting();

    builder.Writeln();

    builder.ParagraphFormat.Style = builder.Document.Styles["VAGRounded-Light"];
    builder.Writeln("This should be in " + builder.ParagraphFormat.Style.Name);
    builder.Writeln("╔trangement, dΘjα ambiguδ, α MontrΘal je prΘfΦre ha∩r ce garτon.");
    builder.ParagraphFormat.ClearFormatting();

    string asmVersion = typeof(Aspose.Words.Document).Assembly.GetName().Version.ToString();
    wordDocument.Save("c:\temp\asposeWords06-v" + asmVersion + ".doc");
    wordDocument.Save("c:\temp\asposeWords06-v" + asmVersion + ".pdf", Aspose.Words.SaveFormat.Pdf);
}

Hi

Thank you for reporting this problem to us. I managed to reproduce the problem on my side. Your request has been linked to the appropriate issue. You will be notified as soon as it is resolved.
Best regards.

Hi,

Can you provide an estimated time of delivery for this fix ?

Thanks,

Dominic.

Hi

Thanks for your inquiry. Most likely, the issue will be resolved before the next hotfix, which comes out in a month or so.
Best regards.

The issues you have found earlier (filed as 18453) have been fixed in this update.

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