chengse66 / alivepdf

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

writeFlashHtmlText and getY() error #348

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
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 vant...@gmail.com on 9 Feb 2012 at 2:08

GoogleCodeExporter commented 8 years ago
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 Qroni...@gmail.com on 12 Nov 2012 at 2:21