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

Free Support Forum - aspose.com

Color and size attributes are not recognizing correctly in PDF

Hi,

We are generating pdf using aspose.pdf and observed that color and size attributes are not recognizing correctly in genenated pdf. Color and font size are not displaying correctly fo the following is the code we used:

string comments = "

  1. this is sample test.
  2. this is second test.
  3. third line
";

TextInfo textinfoComment = new TextInfo();
textinfoComment.Alignment = AlignmentType.Justify;

Aspose.Pdf.Table tab14 = new Aspose.Pdf.Table();
tab14.DefaultCellPadding = margin;
tab14.ColumnWidths = "5% 95%";

Row row00 = tab14.Rows.Add();
Cell cell = row00.Cells.Add("Conclusion");
cell.ColumnsSpan = 2;
cell.DefaultCellTextInfo = textinfo;

Text commentText = new Text(comments);
commentText.IsHtmlTagSupported = true;

Row row20 = tab14.Rows.Add();
row20.Cells.Add("");

Aspose.Pdf.Cell cell2 = row20.Cells.Add();
cell2.DefaultCellTextInfo = textinfoComment;
cell2.Paragraphs.Add(commentText);

section.Paragraphs.Add(tab14);

Regards,

Surya

Hi Surya,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thank you for considering Aspose.Pdf.

I tested your sample code with the latest version of Aspose.Pdf for .NET and it works fine. Please see the attached resultant file. Please download the latest version of Aspose.Pdf for .NET v6.4.0 and let us know if you still face any issue.

Thank You & Best Regards,

Hi,

We have upgraded the product and observed color and size are working perfectly. We also observed that image size is increasing in generated pdf. Image is displaying correctly in html view but size is increasing in pdf document. We are using following code:

string comments = "

  1. this is sample test.
  2. this is second test.
  3. third line

http://10.11.164.232:8092/Uploads/propscilogo.GIF" width=251 height=59>

";

TextInfo textinfoComment = new TextInfo();
textinfoComment.Alignment = AlignmentType.Justify;

Aspose.Pdf.Table tab14 = new Aspose.Pdf.Table();
tab14.DefaultCellPadding = margin;
tab14.ColumnWidths = "5% 95%";

Row row00 = tab14.Rows.Add();
Cell cell = row00.Cells.Add("Conclusion");
cell.ColumnsSpan = 2;
cell.DefaultCellTextInfo = textinfo;

Text commentText = new Text(comments);
commentText.IsHtmlTagSupported = true;

Row row20 = tab14.Rows.Add();
row20.Cells.Add("");

Aspose.Pdf.Cell cell2 = row20.Cells.Add();
cell2.DefaultCellTextInfo = textinfoComment;
cell2.Paragraphs.Add(commentText);

section.Paragraphs.Add(tab14);

Regards,
Surya
v

Hi Surya,

I can see the similar problem that image size is increasing in generated PDF and I have also observed that its been already reported in other thread at <A href="https://forum.aspose.com/t/102658</A>. I hope it will get fixed soon.</P>