Character ≥ and ≥ tag not supported: square character instead (.NET)

Last post 11-22-2010, 2:40 AM by aspose.notifier. 7 replies.
Sort Posts: Previous Next
  •  02-05-2010, 9:26 AM 220990

    Character ≥ and ≥ tag not supported: square character instead (.NET)

    Attachment: Present (inaccessible)
    Hi,

    Using .NET C#, I have a string containing the " ≥ " character. I add it to a pdf document using a Text object contained in a Paragraph of a Cell.

    When rendered in a PDF file, I get a square character instead. The font used is Arial Unicode MS.

    I've tried the following :
     - use the "≥" html sequence instead with the paragraph's IsHtmlTagSupported property set to true
     - use other true type fonts (Arial, Tahoma)
     - set the TextInfo.IsUnicode property to True (results in a exception)
     - set the TextInfo.FontEncoding property to "builtin", ""... none work ("" throws an exception)

    None works.

    I observe that the font is embedded in the PDF file, but with an Ansi encoding.
    For instance (in the Fonts tab of the Document Properties window in Acrobat Reader): 
    "ArialUnicodeMS (Embedded)
      Type: TrueType
      Encoding: Ansi"


    No other "custom" encoding of that font is embedded (as I'd expect)

    I know that the ≥ doesn't exist in the Ansi encoding, but I can't find a way to make Aspose embed that character.

    We work with v. 4.0.0.0, but a quick test with v. 4.1.2.0 shows that it doesn't work with the lastest version neither (and it breaks our layout, so we'd prefer not to use it).

    Any help is greatly appreciated.

     
  •  02-08-2010, 8:56 AM 221226 in reply to 220990

    Re: Character ≥ and ≥ tag not supported: square character instead (.NET)

    Attachment: Present (inaccessible)

    Hello Vincent,

    Thanks for your interest in our products.

    I've tested the scenario and I'm unable to notice the problem. In my case, the " ≥ " is properly being displayed in the resultant PDF document. In order to test the font embedding, I've used Arial font for the text containing " ≥ ". I've also noticed that Arial font is embedded with Identity-H encoding. I've tested the scenario with Aspose.Pdf for .NET 4.1.2 and the resultant PDF that I've generated is also in attachment. Please take a look.

    [C#]

    Pdf pdf1 = new Pdf();
    Aspose.Pdf.Section
    sec = pdf1.Sections.Add();

    //Instantiate a table object
    Aspose.Pdf.Table tab1 = new Aspose.Pdf.Table();
    //Add the table in paragraphs collection of the desired section
    sec.Paragraphs.Add(tab1);
    //Set with column widths of the table
    tab1.ColumnWidths = "200 50 50"
    ;

    //Set default cell border using BorderInfo object
    tab1.DefaultCellBorder = new BorderInfo((int)BorderSide
    .All, 0.1F);
    //Set table border using another customized BorderInfo object
    tab1.Border = new BorderInfo((int)BorderSide
    .All, 1F);
    //Create MarginInfo object and set its left, bottom, right and top margins
    MarginInfo margin = new MarginInfo
    ();
    margin.Top = 5f;
    margin.Left = 5f;
    margin.Right = 5f;
    margin.Bottom = 5f;

    //Set the default cell padding to the MarginInfo object
    tab1.DefaultCellPadding = margin;

    //Create rows in the table and then cells in the rows
    Aspose.Pdf.Row row1 = tab1.Rows.Add();
    row1.Cells.Add("containing the ≥  character. "
    );
    row1.Cells[0].DefaultCellTextInfo.IsUnicode = true
    ;
    row1.Cells[0].DefaultCellTextInfo.FontName = "Arial"
    ;
    row1.Cells.Add("col2"
    );
    row1.Cells.Add("col3"
    );

    pdf1.Save(@"E:\SpecialCharacterTest.pdf");

    Besides this, you've mentioned that when using the latest version 4.1.2, it breaks our layout, so we'd prefer not to use it. Can you please share some more details regarding this issue and if possible, please share the code snippet that you're using, so that we can test the scenario at our end. We apologize for your inconvenience.


    Nayyer Shahbaz
    Support Developer, Aspose Sialkot Team
    About Us
    Contact Us

    Keep in touch! We're on Twitter and Facebook
     
  •  02-08-2010, 9:43 AM 221233 in reply to 221226

    Re: Character ≥ and ≥ tag not supported: square character instead (.NET)

    Thanks! I works great when using the Cell's DefaultCellTextInfo property to set the FontName and IsUnicode properties.

    What doesn't work: using the TextInfo property of the Text contained in the Paragraph property of the cell.

    Said otherwise:

                                var cell = tmpRow.Cells[0];
                                cell.DefaultCellTextInfo.IsUnicode = true;
                                cell.DefaultCellTextInfo.FontName = "Arial";
    works

    but
                                var cell = tmpRow.Cells[0];
                                var paragraph = (Text)cell.Paragraphs[0];
                                paragraph.TextInfo.IsUnicode = true;
                                paragraph.TextInfo.FontName = "Arial";
    doesn't work.

    I can't develop the other part (the layout is broken when using the latest release) because I lack the time to do it.

     
  •  02-08-2010, 1:05 PM 221276 in reply to 221233

    Re: Character ≥ and ≥ tag not supported: square character instead (.NET)

    Hello Vincent,

    Thanks for your interest in our products.

    I'm afraid I'm unable to test the code that you have shared because, Paragraph class does not contain any definition for TexInfo object. Can you please share some more details regarding your requirement that you're trying to accomplish.

    We're sorry for your inconvenience.


    Nayyer Shahbaz
    Support Developer, Aspose Sialkot Team
    About Us
    Contact Us

    Keep in touch! We're on Twitter and Facebook
     
  •  02-09-2010, 3:24 AM 221381 in reply to 221276

    Re: Character ≥ and ≥ tag not supported: square character instead (.NET)

    Hello Nayyer,

    If you take a closer look, the cell content (property Paragraph[0] aliased to paragraph) is a Text object (therefore the cast to get the object back). 

    I was using the TextInfo property of the Text object contained in Paragraph[0].



     
  •  02-10-2010, 2:05 PM 221743 in reply to 221381

    Re: Character ≥ and ≥ tag not supported: square character instead (.NET)

    Hello Vincent,

    Sorry for replying you late.

    We're looking into the details of this matter and will update you with the status of correction shortly.

    Please spare us little time. We are sorry for your inconvenience.


    Nayyer Shahbaz
    Support Developer, Aspose Sialkot Team
    About Us
    Contact Us

    Keep in touch! We're on Twitter and Facebook
     
  •  02-11-2010, 12:38 AM 221802 in reply to 221381

    Re: Character ≥ and ≥ tag not supported: square character instead (.NET)

    Hi,

    I have tested the issue and I’m able to reproduce the same problem. I have logged it in our issue tracking system as PDFNET-14291. After initial estimates, we've figured out that we can resolve this problem in about 1 month but it's not a promise. We will try our level best to get it resolved ASAP.

     

    We apologize for your inconvenience.


    Nayyer Shahbaz
    Support Developer, Aspose Sialkot Team
    About Us
    Contact Us

    Keep in touch! We're on Twitter and Facebook
     
  •  11-22-2010, 2:40 AM 269896 in reply to 220990

    Re: Character ≥ and ≥ tag not supported: square character instead (.NET)

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


    This message was posted using Notification2Forum from Downloads module by aspose.notifier.
     
View as RSS news feed in XML