AlivePDF
AlivePDF copied to clipboard
writeFlashHtmlText and getY() error
Sorry for my english.
What steps will reproduce the problem?
1. create pdf instance, next put any text into pdf using writeFlashHtmlText
function, test cursor Y position by pdf.getY()
2. create pdf instance, put any text (best if you put the same text like in 1.)
into f.ex. addText or writeText method and get Y position as above.
3.
What is the expected output? What do you see instead?
If you use the same string in 1. and 2., the result should be the same or
something similar, but is not. If you use writeFlashHtmlText and put string
with or without html tags, the result will be always around 400. currentY
position after calling writeFlashHtmlText is broken.
What version of the product are you using? On what operating system?
Vista
Please provide any additional information below.
Original issue reported on code.google.com by [email protected] on 9 Feb 2012 at 2:08
In PDF.as, putting the last line of the writeFlashHtmlText method in a comment
seems to do the trick:
//currentY += currentPage.h;
This line is supposed to set the current Y to the height of the page, enforcing
you to start a new one.
There's probably a reason this was done, but in my project this solution has
given us good results.
Original comment by [email protected] on 12 Nov 2012 at 2:21