remove cell gap

Aug 25, 2009 at 5:24 AM
Edited Aug 25, 2009 at 5:25 AM

hi,

I am exporting data to pdf. how can i remove the gap between "probability level" cell  and the 4 cells below it? Thank you!

 

cheers,
vile

Developer
Aug 25, 2009 at 2:46 PM

Can you save as Excel2007 instead of PDF and send me the xlsx file: erik at phpexcel dot net

With that file I will try to find out what the problem is with the PDF.

Aug 26, 2009 at 1:54 AM
Edited Aug 26, 2009 at 1:56 AM

email sent. Can you please check pdf's last date modified. How can i change the last date modified? thanks for your reply

 

Aug 26, 2009 at 8:51 AM

I'm also having problem with color fill in pdf. I think this happens when 2 rows are merged. I not sure if its really the cause. Below are screen shots of pdf report. As you can see below,  there is a blue cell fill is still applied in the succeding rows and it only occurrs when i merge 2 rows before it.. however, the color fill disappears in the page 2. Is there a work around solution or need to be done to fix this? thank you very much/.

page 1

 

Page 2

Developer
Aug 26, 2009 at 9:02 PM

>> How can i change the last date modified?

This is strange. As far as I can tell, that date is set by the operating system and not by any PHP script. Can you try to run a simple test and check the last modified date?

<?php
file_put_contents('test.txt', 'hello');
?>

Aug 27, 2009 at 1:23 AM
koyama wrote:

>> How can i change the last date modified?

This is strange. As far as I can tell, that date is set by the operating system and not by any PHP script. Can you try to run a simple test and check the last modified date?

 

<?php
file_put_contents('test.txt', 'hello');
?>

 

I made a file using php script and the last date modified is correct. I noticed that in General tab, last date modified is incorrect but  in PDF tab the date is working fine..

Aug 27, 2009 at 1:26 AM
vile wrote:

I'm also having problem with color fill in pdf. I think this happens when 2 rows are merged. I not sure if its really the cause. Below are screen shots of pdf report. As you can see below,  there is a blue cell fill is still applied in the succeding rows and it only occurrs when i merge 2 rows before it.. however, the color fill disappears in the page 2. Is there a work around solution or need to be done to fix this? thank you very much/.

page 1

 

Page 2

I am wondering if there's a specific order in coding.. what i mean is that do i need to set cell value before I implement cell style?

Developer
Aug 27, 2009 at 10:18 PM

>> I am wondering if there's a specific order in coding.. what i mean is that do i need
>> to set cell value before I implement cell style?


No, this should not matter. With the files you sent me earlier I am able to reconstruct the problem. This might be a combination of several bugs. I will investigate this over the next days and file the necessary bug reports. Will post back here.

>> I made a file using php script and the last date modified is correct.

I am puzzled about this issue. What complicates this is that some of the dates that are shown are pulled from meta data in the file content itself. Some dates are stored outside the file contents. I think the wrong date comes from outside the file contents.

You have sent me two files, an xlsx file and a pdf file generated by PHPExcel. They both have same problem with wrong "Last modified" date as you can see in the screen shot below. There seems to be a general problem with the operating system on your server. Can you try to do some more debugging?

Aug 28, 2009 at 2:06 AM

Hi,

I tried to download the report generated from other computer, Date modified is correct. maybe my os have some problem.

Developer
Sep 2, 2009 at 5:42 AM

As for the problem with the gaps between the rows, this looks like a bug in TCPDF. Will wait for response for this bug:

https://sourceforge.net/tracker/?func=detail&aid=2848892&group_id=128076&atid=710532

Developer
Sep 2, 2009 at 3:56 PM

TCPDF responded quickly with a fix. Fixed in PHPExcel via upgrade to TCPDF 4.7.003:

http://phpexcel.codeplex.com/WorkItem/View.aspx?WorkItemId=10569

Download source code tomorrow where things should be working:

http://phpexcel.codeplex.com/SourceControl/ListDownloadableCommits.aspx

Sep 3, 2009 at 2:09 AM
Edited Sep 3, 2009 at 2:21 AM

Hi,

I downloaded the lastest version of phpexcel and tcpdf, however  row gaps are still generated. :(

 

Developer
Sep 3, 2009 at 2:14 AM

>> I downloaded the lastest version of phpexcel, however  row gaps are still generated. :(

Oh, sorry, it is not available yet. Source code is released every 24 hours. Can you wait 5 hours, it will be there.

Sep 3, 2009 at 2:23 AM

i see :)  Thank you very much!

Sep 3, 2009 at 9:29 AM
koyama wrote:

TCPDF responded quickly with a fix. Fixed in PHPExcel via upgrade to TCPDF 4.7.003:

http://phpexcel.codeplex.com/WorkItem/View.aspx?WorkItemId=10569

Download source code tomorrow where things should be working:

http://phpexcel.codeplex.com/SourceControl/ListDownloadableCommits.aspx

hi i just tried the latest release. cell gaps are still generated. :(   can you please run test if it is really working. thanks :)

Developer
Sep 3, 2009 at 1:24 PM

Here is my test with the xlsx file you sent me:

$file = 'Pipeline_Health_as_of_2009_Report.Excel2007.xlsx';
$reader = PHPExcel_IOFactory::createReaderForFile($file);

$excel = $reader->load($file);

$writer = PHPExcel_IOFactory::createWriter($excel, 'PDF');
$writer->save('write.pdf');

Result:

 

Looks ok to me?

 

Sep 4, 2009 at 1:10 AM

i see , first  you convert it xlsx  then to pdf. what iam doing is i convert it directly to pdf. I cant do 2 conversion. Generating the report to xlsx takes huge amount of time.
can you please try to convert it directly to pdf. thank you 

Developer
Sep 4, 2009 at 1:38 AM

>> can you please try to convert it directly to pdf.

Well, I would need your code to do that. But I'm puzzled that it is not working for you. Really it should not make a difference whether you are converting xlsx -> pdf, or creating the pdf directly.

Before I do further testing, can you try to run the simple snippet of code I posted above and verify that you get the same ok result as me. Is it possible that you are still using the old PHPExcel code? Here is the direct download link to latest source code:

http://phpexcel.codeplex.com/SourceControl/ListDownloadableCommits.aspx#DownloadLatest

Sep 8, 2009 at 1:52 AM

hi, sorry for late reply. i installed the latest release again and it works! :D thanks! keep up the good work ;)

Jan 18, 2011 at 4:36 PM

Hi,

I have the same issue although I cannot see the original pictures, but seems like the same problem. 

Apperantly I dont see how to attach an image or a document, but my pdf file looks like an html table when it has cellborders, and cellspacing specified. The cells do not touch, like they are alone on one white background. I hope I described it well enough...

I use the latest release, just refreshed. This bug was not present on the 1.7.4 version though (but I had problems to apply any borders there, so.... :))

Thanks in advance

Coordinator
Jan 19, 2011 at 10:53 PM
AValverde13 wrote:

my pdf file looks like an html table when it has cellborders, and cellspacing specified. The cells do not touch, like they are alone on one white background. I hope I described it well enough...

 Probably because it is an html table with cellborders and cellspacing... the PDF writer actually generates just that html table, then feeds it to tcPDF. The cellborders/cellspacing was the only way I could resolve some of the problems with borders manifested in earlier versions.

I am disappointed with tcPDF though. While it allows us to generate reasonable PDF output, it's extremely slow and memory hungry and the code is even larger than the core PHPExcel code, plus there's a lot of functionality that it can't handle (e.g. more columns than will fit on a page). I've decided to take a look at some of the alternatives to tcPDF, to see if they can do the job better and more efficiently.

 

Apr 12, 2011 at 4:55 PM

can you share whit me all your code where you generate that view.pdf please =) i can generate a pdf without cell borders and your code may be help me =D thanx Mark!!!

Apr 12, 2011 at 4:56 PM

can you share whit me all your code where you generate that view.pdf please =) i can generate a pdf without cell borders and your code may be help me =D thanx Mark!!!

Apr 21, 2011 at 5:29 PM

I am having the same problem where the PDF generated has gaps between the cells. Is there a fix for this? I am using the latest download of PHPExcel.

Coordinator
Apr 21, 2011 at 9:17 PM

There is no fix for this yet.... I'm still trying to sort it out while juggling all the other requests for help here, and get settled in my new job. If I'm satisfied with the work that I've done, then it will be part of the 1.7.7 release; but I still need to do some work on the PDF "factory" controller to ensure full backward compatibility with previous versions.