excel to pdf issue

Topics: Developer Forum, Project Management Forum, User Forum
May 27, 2008 at 4:42 PM
hi again!!!

im trying the new pdf functionality, as it is very handy for me, and i want to thank for all the work you put to in this class. :)

but now i encountered a problem... i have a table in which some fields may occupy more than one line... when that happens, the text on the following columns in the same row will be printed in the line where the previous one ended... and the top and bottom borders are always close together with the text, messing it all up... can you help me so i can print it right?

i'll try to exemplify what i'm saying...


__field1______________field2___________field3_____________field4____________
31312312____|____dslksjgkjsgkjs__|__sdkjfhskjhsgfh_|___ksdfhsihsiuf______|          ----> row ok
3422353_____|  sdfs ggdsgfdsgdg |_________________|_____________________|
_______________|__gergergerger____|__ddscfsdfs______|_____egergergre_____|         -----> row with 2 lines not ok
6434535_____| ......

Coordinator
May 27, 2008 at 6:32 PM
Just to reproduce this... Did you add an explicit line break? (\n or \r\n)
May 27, 2008 at 8:49 PM
i'm not sure if i understood your question correctly...

in the example above yes, i added a line break... but in where i need it, i cant make the columns widths any bigger, so the text in some cells has to be in 2 or more lines.
Jun 3, 2008 at 2:56 PM
greetings!

i dont want to be a pain in the ***, but can you take a look at this issue? i really need it... i already took a look at the code of that part of the class, but i cant figure out what is making this happen... i think it should be something simple...

i would appreciate some help!

thanks
Coordinator
Jun 3, 2008 at 3:32 PM


pjam wrote:
greetings!

i dont want to be a pain in the ***, but can you take a look at this issue? i really need it... i already took a look at the code of that part of the class, but i cant figure out what is making this happen... i think it should be something simple...

i would appreciate some help!

thanks


Try setting the vertical alignment of all the cells in the worksheet to VERTICAL_TOP. The default is VERTICAL_BOTTOM, which may be the cause of your problem.
Jun 4, 2008 at 10:57 AM
thanks for the reply!! :)

but unfortunately that doesn't work, it was the first thing i tried to solve the problem... it seems like "pdf-ing" ignores the vertical alignment of the cells... :(

i guess i will have to try other class for this, not only because of this problem but also cause it takes too much time to compute the data.

thanks anyway
Coordinator
Jun 4, 2008 at 1:54 PM
Fixed in http://www.codeplex.com/PHPExcel/WorkItem/View.aspx?WorkItemId=6295