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

Free Support Forum - aspose.com

Error IsHtmlTagSupported incompatible with others properties aspose pdf

Hi,


When I use IsHtmlTagSupported with other properties in aspose pdf. That doesn’t work.

static void Main(string[] args)
{
Aspose.Pdf.Generator.Pdf pdf1 = new Aspose.Pdf.Generator.Pdf();
Aspose.Pdf.Generator.Section section = pdf1.Sections.Add();

Aspose.Pdf.Generator.Text text1 = new Aspose.Pdf.Generator.Text(section,“IsHtmlTagSupported”);
text1.IsHtmlTagSupported = true;
text1.TextInfo.IsTrueTypeFontBold = true;

section.Paragraphs.Add(text1);

pdf1.Save(@“C:\test.pdf”);
}

why my text “IsHtmlTagSupported” doesn’t in FontBold? when I change the property text1.IsHtmlTagSupported = false; It’s work perfectly.

Hi Zozoanraje,

Thanks for using our products.

I tested the scenario and able to notice the same problem. For rectification, I logged this problem with ID: PDFNEWNET-33454 in our Issue Tracking System. We will further look into the details of this issue and will keep you updated via this forum thread on the status of correction.

We apologize for your inconvenience.

Thanks & Regards,

Hi Zozoanraje,

Thank you for your patience.

Kindly change the source code as mentioned below and check if it fits your need.

[C#]

Aspose.Pdf.Generator.Pdf pdf1 = new Aspose.Pdf.Generator.Pdf();<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Aspose.Pdf.Generator.Section section = pdf1.Sections.Add();

Aspose.Pdf.Generator.Text text1 = new Aspose.Pdf.Generator.Text(section, "IsHtmlTagSupported");

text1.IsHtmlTagSupported = true;

text1.UseTextInfoStyle = true;

text1.TextInfo.IsTrueTypeFontBold = true;

section.Paragraphs.Add(text1);

pdf1.Sections.Add(section);

pdf1.Save(@"d:\pdffiles\test1.pdf");

Please feel free to contact support in case you need any further assistance.

Thanks & Regards,

The issues you have found earlier (filed as PDFNEWNET-33454) have been fixed in Aspose.Pdf for .NET 7.0.0.


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

Hi Zozoanraje,

Thank you for your patience.

Kindly change the source code as mentioned below and check if it fits your need.

[C#]

Aspose.Pdf.Generator.Pdf pdf1 = new Aspose.Pdf.Generator.Pdf();<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Aspose.Pdf.Generator.Section section = pdf1.Sections.Add();

Aspose.Pdf.Generator.Text text1 = new Aspose.Pdf.Generator.Text(section, "IsHtmlTagSupported");

text1.IsHtmlTagSupported = true;

text1.UseTextInfoStyle = true;

text1.TextInfo.IsTrueTypeFontBold = true;

section.Paragraphs.Add(text1);

pdf1.Sections.Add(section);

pdf1.Save(@"d:\pdffiles\test1.pdf");

Please feel free to contact support in case you need any further assistance.

Thanks & Regards,

Hi, I just upgrade our Aspose.PDF from ver6.1 to Ver7.2.0.

If I don't set UseTextInfoStyle=true when set IsHtmlTagSupported=true only, other textinfo properties DON'T work properly but the page is rendered properly.

If I set UseTextInfoStyle=true and IsHtmlTagSupported=true, other textinfo work properly, BUT the page is not rendered properly. Some text goes beyond page borders.

See attached files for comparison. Check page 3 on UsingTextInfoStyle.pdf.

It seems the bug I reported earlier comes back again:

Thanks

Rose

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

Sorry for the delay in response.

We are checking your issue and will get back to you with the results.

Sorry for the inconvenience,

rosezhou10:
Hi, I just upgrade our Aspose.PDF from ver6.1 to Ver7.2.0.

If I don’t set UseTextInfoStyle=true when set IsHtmlTagSupported=true only, other textinfo properties DON’T work properly but the page is rendered properly.

If I set UseTextInfoStyle=true and IsHtmlTagSupported=true, other textinfo work properly, BUT the page is not rendered properly. Some text goes beyond page borders.

See attached files for comparison. Check page 3 on UsingTextInfoStyle.pdf.

It seems the bug I reported earlier comes back again:

37480. Can you please share some sample project/code snippet which can help us in replicating this issue. We are really sorry for your inconvenience.

PS, For your reference, I have also attached the resultant PDF files which I have generated where first I have specified text2.UseTextInfoStyle = true; and have generated PageRenderingIssue_UseTextInfoStyle_True.pdf and in second attempt, I have specified text2.UseTextInfoStyle = false; and have generated PageRenderingIssue_UseTextInfoStyle_False.pdf.

Hi,

Yes, it works with the sample data I shared against with bug 37480. BUT, it does not work with another different record/data set. As I said, we stored all the data in SQL server database. It took me hours to retrieve the data field by field from the database to create the code snipet and share with you. I hope this can help you narrow down the problem and get the problem fixed completely. See attached

By the way, I was told Bug 37480 was fixed in version 6.5. I tried ver. 6.6, 6.9 and 7.2, the rendering problem still happens. Sometime I just need to add/delete a space line to patch the problem.

To further demonstrate that Bug 37480 was not fixed, please see attached AsposeV7.2_UseTextInfoStyle_False2.pdf and AsposeV7.2_UseTextInfoStyle_True2.pdf.

On page 1, even I set UseTextInfoStyle=true, some text still goes beyond page boundary.

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

Thank you for sharing the details.

However, I used your sample code with data you shared and I am unable to notice any problem regarding text going out of page borders using "UseTextInfoStyle = true" with the latest version of Aspose.Pdf for .NET v7.2. I have attached the generated PDF file for your reference. Please share the following system environment details with us so we can test the issue as per your system environment i.e. OS, .NET Framework, 32bit or 64bit processor etc. Also, it will be better if you can create a sample application and share with us, this will help in reproducing the issue at our end.

Sorry for the inconvenience,

Hi,

In my previous post, attachment AsposeV7.2_UseTextInfoStyle_False.pdf has problem regarding text going out of page borders on Page 3. I sent you the code snipet and sample data. But AsposeV7.2_UseTextInfoStyle_True.pdf does not have the same problem with the same data and "UseTextInfoStyle=true".

Attachment AsposeV7.2_UseTextInfoStyle_True2.pdf has the rendering problem on Page 3 when "UseTextInfoStyle=true". That is for different data set. I did not send you the code snipet and sample data.

The Result.pdf you sent me is different from what I got. On Page1 under "Site Boundary Description", the site boundary text used "UseTextInfoStyle=true". But on Page 2, site history text used "UseTextInfoStyle=false". You need to keep consistent for both "Site Bounday" text and "Site History" text regarding to the setting of "UseTextInfoStyle" to replicate the problem.

Rose

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

Thank you for the details.

The file I shared previously was using UseTextInfoStyle = true; in method “ConfigureFieldData”. Now, I changed the UseTextInfoStyle = false; in the same method and attached is my resultant file. I am still not able to see the your mentioned issue (resultant file attached). I would request you to create a sample application and post it here to help us replicate the issue at our end.

Sorry fot the incovnenience,

nausherwan.aslam:

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

Thank you for the details.

The file I shared previously was using UseTextInfoStyle = true; in method “ConfigureFieldData”. Now, I changed the UseTextInfoStyle = false; in the same method and attached is my resultant file. I am still not able to see the your mentioned issue (resultant file attached). I would request you to create a sample application and post it here to help us replicate the issue at our end.

Sorry fot the incovnenience,

Hi Nausherwan:

Please use the attached SiteHistory.txt to replace the one I sent you. You will be able to see the issue on page 3.

Thanks

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

Thank you for the file.

I tested the code with the latest version of Aspose.Pdf for .NET v7.3 and following are my testing results as per your code:

1: UseTextInfoStyle as true: The file is rendering properly. Please see the attachment.

2: UseTextInfoStyle as false: I am able to reproduce the issue regarding page rendering. The issue has been registered in our issue tracking system with issue id: PDFNEWNET-34212. We will notify you via this thread regarding any updates.

Sorry for the inconvenience,

nausherwan.aslam:

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

Thank you for the file.

I tested the code with the latest version of Aspose.Pdf for .NET v7.3 and following are my testing results as per your code:

1: UseTextInfoStyle as true: The file is rendering properly. Please see the attachment.

2: UseTextInfoStyle as false: I am able to reproduce the issue regarding page rendering. The issue has been registered in our issue tracking system with issue id: PDFNEWNET-34212. We will notify you via this thread regarding any updates.

Sorry for the inconvenience,

Nausherwan:

Thanks for registering the issue.

Sometimes when UseTextInfoStyle is set to true, the rendering problem also happens. Please see my reply on Aug.29th with 8 attachments. For the same data, attachment "AsposeV7.2_UseTextInfoStyle_False2.pdf" worked fine with UseTextInfoStyle as false. But attachment "AsposeV7.2_UseTextInfoStyle_True2.pdf" has the page rendering problem with UseTextInfoStyle as true.

So my point is, it seems bug PDFNEWNET-31945 I initially reported in following thread was not completely fixed:

<A href="https://forum.aspose.com/t/103851</A></FONT></P> <P><STRONG><FONT size=2 face=Tahoma>Hope this page rendering problem can be completely fixed soon!</FONT></STRONG></P> <P> </P>

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

Thank you for the feedback.

We will check the issue further and will get back to you with the results.

Sorry for the inconvenience,

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

Please accept our apologies for delay in response.

I further checked your issue as mentioned in and I am still unable to reproduce the issue. I further checked the issue with our upcoming release of Aspose.Pdf for .NET but the results are the same. I would request you to create a sample application with your complete data files and share here. We will check it and get back to you.

Sorry for the inconvenience,

nausherwan.aslam:

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

Please accept our apologies for delay in response.

I further checked your issue as mentioned in and I am still unable to reproduce the issue. I further checked the issue with our upcoming release of Aspose.Pdf for .NET but the results are the same. I would request you to create a sample application with your complete data files and share here. We will check it and get back to you.

Sorry for the inconvenience,

On Sept. 7th, you said you reproduced the problem using the code/data I sent you and registered the bug 34212. See the details below. How come after a month of delay, you come back and say it can't be re-produced? We are so frustrated by this bug.

nausherwan.aslam:
Hi Rose,

Thank you for the file.

I tested the code with the latest version of Aspose.Pdf for .NET v7.3 and following are my testing results as per your code:

1: UseTextInfoStyle as true: The file is rendering properly. Please see the attachment.

2: UseTextInfoStyle as false: I am able to reproduce the issue regarding page rendering. The issue has been registered in our issue tracking system with issue id: PDFNEWNET-34212. We will notify you via this thread regarding any updates.

Sorry for the inconvenience,


Nausherwan Aslam
Support Developer,
Aspose Sialkot Team
Contact Us

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

Well, there is bit confusion. My last comment was not regarding issue PDFNEWNET-34212 but it was regarding your following comments and issue PDFNEWNET-31945.

rosezhou10:

So my point is, it seems bug PDFNEWNET-31945 I initially reported in following thread was not completely fixed:

Hope this page rendering problem can be completely fixed soon!

I tested PDFNEWNET-31945 and I was unable to reproduce the issue. For this issue I requested you to create a sample application and share with us.

I hope the situation is clear now but in case you need any further details, please do let us know.

Sorry for the inconvenience,

nausherwan.aslam:

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

I tested PDFNEWNET-31945 and I was unable to reproduce the issue. For this issue I requested you to create a sample application and share with us.

I hope the situation is clear now but in case you need any further details, please do let us know.

Sorry for the inconvenience,

Hi,

Please see attached code and the PDF file. Check Page 2, you will find the text goes beyond the page boundary.

I tested using Aspose.Pdf ver 7.2 & 7.4, got the same problem.

As I said many times, bug PDFNEWNET-31945 never got fixed completely. You fix it for this bunch of data, but it sometimes fails for other data. Sometimes just delete a line of text from one of the paragraph will workaround the problem.

Hope this helps!

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

I tried testing your code but PutHeader and PutSubSectionTitle methods are missing in your code and when I tested without them, I am unable to notice the problem. Please share the missing code, so we can complete the test and get back to you soon.

Sorry for the inconvenience,