Hi,
I have attached two images “Screen shot A” and “Screen shot B”.
The “Screen shot A” is produced by using the following code.
Definition
$cell_pd_tests_undertaken = array(‘posx’ => 30, ‘posy’ =>113, ‘data’ => {pd_tests_undertaken}, ‘width’ => 0, ‘align’ => ‘L’, ‘font_type’ => $this->default_font, ‘font_size’ => 8, ‘color_r’ => ‘0’, ‘color_g’ => ‘0’, ‘color_b’ => ‘0’, ‘font_style’ => $this->default_style);
$cell_pd_microbiology_results = array(‘posx’ => 36, ‘posy’ => 117, ‘data’ => {pd_microbiology_results}, ‘width’ => 0, ‘align’ => ‘L’, ‘font_type’ => $this->default_font, ‘font_size’ => 8, ‘color_r’ => ‘0’, ‘color_g’ => ‘0’, ‘color_b’ => ‘0’, ‘font_style’ => $this->default_style);
$cell_pd_histology_results = array(‘posx’ => 31, ‘posy’ => 121, ‘data’ => {pd_histology_results}, ‘width’ => 0, ‘align’ => ‘L’, ‘font_type’ => $this->default_font, ‘font_size’ => 8, ‘color_r’ => ‘0’, ‘color_g’ => ‘0’, ‘color_b’ => ‘0’, ‘font_style’ => $this->default_style);
$cell_pd_inpatient_antibiotics = array(‘posx’ => 29, ‘posy’ => 140, ‘data’ => {pd_inpatient_antibiotics}, ‘width’ => 0, ‘align’ => ‘L’, ‘font_type’ => $this->default_font, ‘font_size’ => 8, ‘color_r’ => ‘0’, ‘color_g’ => ‘0’, ‘color_b’ => ‘0’, ‘font_style’ => $this->default_style);
Body
//Investigations
$pdf->SetFont(‘Arial’,‘BU’,9,‘U’);
$pdf->Text(5,108,‘Investigations’);
$pdf->SetFont(‘Arial’,‘B’,8);
$pdf->Text(5,114,‘Tests Undertaken:’);
sc_pdf_print($cell_pd_tests_undertaken);
$pdf->SetFont(‘Arial’,‘B’,8);
$pdf->Text(5,118,‘Microbiology Results:’);
sc_pdf_print($cell_pd_microbiology_results);
$pdf->SetFont(‘Arial’,‘B’,8);
$pdf->Text(5,122,‘Histology Results:’);
sc_pdf_print_mult($cell_pd_histology_results,2.8222222222222);
//Medications on Discharge
$pdf->SetFont(‘Arial’,‘BU’,9,‘U’);
$pdf->Text(5,135,‘Medications on Discharge’);
$pdf->SetFont(‘Arial’,‘B’,8);
$pdf->Text(5,141,‘Medicine Details:’);
//sc_pdf_print($cell_pd_inpatient_antibiotics);
The “Screen shot B” is produced by using exactly the same code as above, except that right at the end of the body section, another cell is printed i.e. $cell_pd_inpatient_antibiotics, which is commented out in the “Screen shot A” code.
…
…
$pdf->SetFont(‘Arial’,‘B’,8);
$pdf->Text(5,141,‘Medicine Details:’);
sc_pdf_print($cell_pd_inpatient_antibiotics);
By simply adding “sc_pdf_print($cell_pd_inpatient_antibiotics);” towards the end, some lines from the multi field i.e. “sc_pdf_print_mult($cell_pd_histology_results,2.8222222222222);” are messed up, and are now printed below “sc_pdf_print($cell_pd_inpatient_antibiotics);”, as can be seen in “Screen shot B”.
Can someone please explain as to why the last two lines of the multi-line field are messed up after you print something under it?
Thanks
razaw