gdtiti / alivepdf

Automatically exported from code.google.com/p/alivepdf
0 stars 0 forks source link

HTMLTag in parsing Flex RichText Formatted (XHTML) string #202

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Following discussions are based on the source code of 1.5RC

What steps will reproduce the problem?
1. create a RichTextEditor on your AIR application
2. create a breakpoint at line 3138 in PDF.as
3. Run the application in debug mode and type in whatever texts into the
RichTextEditor
4. call PDF.writeFlashHtmlText(RichTextEditor.htmlText) and check the
HTMLTag object created right before the breakpoint.
5. All attribute values are concatenated together as ONE string, so it is
no way possible for the "for" or "switch" statement at line 2804 and line
2806 to process the attribute values.

What is the expected output? What do you see instead?
Attribute values are expected to be stored in an XMLList object,
individually. So as to be accessed by the writeFlashHtmlText() function.
However, all attribute values are concatenated together as ONE string, so
it is no way possible for the "for" or "switch" statement at line 2804 and
line 2806 to process the attribute values.
Therefore, the program just doesn't know what font size, font face, etc. to
use when producing PDF output.

What version of the product are you using? On what operating system?
AlivePDF 1.5RC
Windows 7

Please provide any additional information below.
I firstly found that the font size and font type is not working in 1.5RC
while it works a bit in 1.4.9, not completely correctly though.
I am surprised that according to PDF.parseTags(), it didn't change much
from 1.4.9 to 1.5RC.
However, HTMLTag.attr is an XMLList in 1.4.9, which makes a lot sense while
HTMLTag.attr is a String in 1.5RC.
A string is not likely to be able to represent several attributes.
This change causes a lot problems in creating the HTMLTag object array.

Original issue reported on code.google.com by stephen....@gmail.com on 2 Mar 2010 at 5:08

GoogleCodeExporter commented 9 years ago
fixed in r263.

Original comment by felix.ge...@gmail.com on 8 Oct 2011 at 5:17