yyn0210 / alivepdf

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

Font Size specified in Flex RichText Format (XHTML) is not processed at all #201

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. Type in whatever texts into the RichTextEditor and change the font size
to something other than 12 (a larger font size like 46 could better show
you this feature is not working at all)
3. call PDF.writeFlashHtmlText(RichTextEditor.htmlText);
4. output the pdf file

What is the expected output? What do you see instead?
Text with specific font size is expected;
What I saw was text with a default font size of 12.

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

Please provide any additional information below.
In PDF.as, line 2812 (it is inside the definition of PDF.writeFlashHtmlText().)
Variable "fs" takes the font size from the HTMLTag object array generated
by parseTags() earlier.
However, this variable is never used in this function.

As for the HTMLTag object array, it is not well initialised either.
There is a problem in initialising the HTMLTag object.
I will create another issue discussing this.

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

GoogleCodeExporter commented 9 years ago
I changed that line in my PDF.as file to 
   fontSizePt = parseInt( String ( attr ) );

fontSizePt is the variable actually used to set the size of the text. Combined 
with
changing the HTMLTag.attr type to XMLList (as discussed in your other issue), 
this
seems to work.

Original comment by tcc.se...@gmail.com on 24 Mar 2010 at 1:56

GoogleCodeExporter commented 9 years ago
Hi tcc,

I did that too, I actually changed (added a stack) a bit of PDF.as to try to 
address
all these issues I opened here. Only few of them are solved though.

Here's the class I derived from the original PDF.as, you can take a look if you 
want.

Original comment by stephen....@gmail.com on 24 Mar 2010 at 2:08

Attachments:

GoogleCodeExporter commented 9 years ago
by the way, all my changes are tagged with
// toasted

Original comment by stephen....@gmail.com on 24 Mar 2010 at 2:25

GoogleCodeExporter commented 9 years ago
Good job with the font stack thing, I noticed the same issues and thought the 
same
kind of solution would be needed. Good thing I found this issue before I coded 
it up
myself :)

Original comment by dro...@gmail.com on 29 Apr 2010 at 11:19

GoogleCodeExporter commented 9 years ago
Hi. Where i can get MasterFont.as ?

Original comment by nnikolo...@gmail.com on 29 Oct 2010 at 10:11

GoogleCodeExporter commented 9 years ago
fixed in r281. Now Fontsize are correctly processed. Please refer to the 
"writeFlashHtmlText how-to" in 
http://code.google.com/p/alivepdf/wiki/APIAdditions .

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