Project

General

Profile

Task #1731

Bottom border line missing

Added by Jerry Quinnell about 5 years ago. Updated almost 4 years ago.

Status:
Closed
Priority:
Normal
Target version:
-
Start date:
01/21/2019
Due date:
% Done:

0%

Estimated time:

Description

In the previous version of the software the table outline was always present or generate at a new page or new table - the bottom line of the table is now missing. I don't necessarily know what the last line of the table is programmatically to be able to control the 'BORDER_TYPE' - is there an easy setting somewhere to turn this on/off ?

Regards
Jerry


Files

Border Line Missing.jpg View Border Line Missing.jpg 210 KB Jerry Quinnell, 01/21/2019 10:22 AM
Capture.JPG View Capture.JPG 95.3 KB Jerry Quinnell, 01/21/2019 11:45 AM
Screenshot_289.png View Screenshot_289.png 1.19 MB Andrei Bintintan, 02/06/2019 10:07 PM
pdf2-1-2NEW - Copy.php pdf2-1-2NEW - Copy.php 11.9 KB Jerry Quinnell, 02/10/2019 02:54 PM
MyPdf.php MyPdf.php 4.79 KB Jerry Quinnell, 02/10/2019 02:55 PM
example-table-1731.php example-table-1731.php 3.22 KB Andrei Bintintan, 02/10/2019 09:40 PM
#1

Updated by Jerry Quinnell about 5 years ago

Extra information - it just happens at a new page .. so I am writing a table which spans pages and the top and bottom border lines are not printed ... so its not just at table close(), its mainly at a page flip ..

#3

Updated by Andrei Bintintan about 5 years ago

The table close has to be called only at the end. On the page break the borders are drawn if they are set so. Check your BORDER_TYPE settings.
Make sure your table has a border, cause even if your row has border set to: "TLR" as it can be in your case, then the border is drawn on page end. In the attached screenshot are my thoughts.

If still not working, please send me a code to reproduce this, as I don't this being a bug.

#4

Updated by Jerry Quinnell about 5 years ago

Hi Andrei,

Thanks for the reply.

Ok I am drawing a LRTB at row level ..

And I have the /library/interpid/Pdflib/table.config.php set to :- (and the same file in /examples/table.config.php)

'TABLE' => array(
   'TABLE_ALIGN' => 'L', //table align on page
    'TABLE_LEFT_MARGIN' => 10, //space to the left margin
    'BORDER_COLOR' => [ 0, 92, 177 ], //border color
    'BORDER_SIZE' => '0.3', //border size
    'BORDER_TYPE' => 'LRTB', //border type, can be: 0, 1
),

I guess what I'm asking is do I then have the right config setting at TABLE level, and then secondly do I have to define a bottom_border another way ? Whats the parameter setting ?

Thanks
Jerry

#5

Updated by Andrei Bintintan about 5 years ago

The definition seems ok, it must be something else. There might be something that overrides the footer or I cannot tell with the provided information.

Please provide an example code that generates this case.

#6

Updated by Jerry Quinnell about 5 years ago

Ok well I spent a couple of hours yesterday tracing your code to see what the BORDER_TYPE setting was.

So in your code /library/interpid/Pdflib/Table.php - I put in a trace error_log msg to display the BORDER_TYPE in your function 'public function drawBorder()' - The value changed from the setting in the config table (1 or TLRB) to 0 sometimes. I cant work out where this is getting set to 0 away from the config setting. Maybe the addRow()'s are changing it somehow ? Its the fact its changing to ZERO and not something ( T or L or R or B) which is odd.

So I enclose one of the programs that this is happening too - I've enclosed the whole program (sorry) but the PDF code starts at line 151. In essence I'm reading some text from a database and then this text may or may not have a picture for that piece of text. Now I could put a 'B' in the string for the BORDER_TYPE and yes I get some bottom borders but not all - it happens a page flip away from a normal table close, or addpage. So its when your code calculates a page flip that the error happens.

Is it something to do with the multicell too ? maybe one or other is changing to '0'.

Extra info : library/interpid/Pdfexamples/MyPdf.php - I have changed this for my header and footer - enclosed is the code just to check I haven't done anything there.
Extra Info : I have a control program which builds the whole 80 page report up - so php programs for each of the sections. This is where the PDF libraries are defined etc. This work so I haven't enclose this. This program INCLUDES the attached code where I am getting the errors.

And to reiterate this worked fine in the previous release that we had before the upgrade ...

Hope all ok ..

Kind Regards

Jerry

#7

Updated by Andrei Bintintan about 5 years ago

Ok, I had a look at your code and I don't see anything obvious. I also tried to regenerate your pdf, but it's difficult, cause a lot of infos are missing, how pdf is initialized etc... I will attach a php file, maybe you can try that out to see how it works with your settings. See example-table-1731.php

Jerry Quinnell wrote:

So in your code /library/interpid/Pdflib/Table.php - I put in a trace error_log msg to display the BORDER_TYPE in your function 'public function drawBorder()' - The value changed from the setting in the config table (1 or TLRB) to 0 sometimes. I cant work out where this is getting set to 0 away from the config setting. Maybe the addRow()'s are changing it somehow ? Its the fact its changing to ZERO and not something ( T or L or R or B) which is odd.
If it's 0... it's not good, this might be a good starting point. The table properties are read-only, they are not changed anywhere in the library.
Do a debug_print_backtrace() if it's 0, or debug the code with the editor if it's 0.

Also... please try to disable the footer/header functions for a test, make sure that they do not throw anything over on the page that covers content.

#8

Updated by Jerry Quinnell about 5 years ago

Hi Andrei,

Thank-you again for your time on this ...

Ok I've found the issue, i had the following code to remove the border for my front page of the report

$aCustomConfig = array( 'TABLE' => array( 'BORDER_TYPE' => '0',));
$oTable->initialize( array( 30, 55, 85 ), $aCustomConfig);

And this appears to overide and reset the table config file for everything ... the only way out of it is to do this at the end of that table ...

$aCustomConfig = array( 'TABLE' => array( 'BORDER_TYPE' => '1',));

$oTable->initialize( array( 22, 156 ), $aCustomConfig );

This doesn't seem correct operation ?

Anyhow I now have a font problem with the Helvetica font being one point smaller ?! - I'll wade through this now !

Thank-you so much so far ...
Rgds
Jerry

#9

Updated by Andrei Bintintan about 4 years ago

This is an old one. Can it be closed?

#10

Updated by Andrei Bintintan almost 4 years ago

  • Status changed from Feedback to Closed

Closing due to lack of feedback.

Also available in: Atom PDF