mam problem z grubością ramek w pdf'ach generowanych w php.
Obecnie używam biblioteki TCPDF ale nie wykluczam zmiany jeśli w innej da się to rozwiązać.
Mój problem polega na tym że ramka generowana przez metodę Cell jest znacznie cieńsza(i taki efekt potrzebuję) niż ta generowane przez writeHTML.
Przykładowy kod dla Cell
$pdf = new TCPDF(); $pdf->SetAutoPageBreak(true); $pdf->SetMargins(3, 5, -1); $pdf->SetHeaderMargin(PDF_MARGIN_HEADER); $pdf->SetFooterMargin(25); $pdf->SetFont('dejavusans', '', 10); $pdf->setPrintHeader(false); $pdf->setPrintFooter(TRUE); $pdf->SetAutoPageBreak(True, 25); $pdf->AddPage(); $pdf->Cell(95,5,'aaa',1,0); $pdf->Output( '1.pdf', 'D');
i dla writeHTML
$pdf = new TCPDF(); $pdf->SetAutoPageBreak(true); $pdf->SetMargins(3, 5, -1); $pdf->SetHeaderMargin(PDF_MARGIN_HEADER); $pdf->SetFooterMargin(25); $pdf->SetFont('dejavusans', '', 10); $pdf->setPrintHeader(false); $pdf->setPrintFooter(TRUE); $pdf->SetAutoPageBreak(True, 25); $pdf->AddPage(); $pdf->writeHTML('<!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <style type="text/css"> * { font-size:7px; margin:0; padding: 0; text-align: left; } td { border:1px solid #000; } table { border-collapse: collapse; } </style> </head> <body> <table> <tr> <td>aaa</td> </tr> </table> </body> <html>'); $pdf->Output( '2.pdf', 'D');
w teorii w obu przypadkach ramka ma mieć 1px, ale ta html'owa jest wyraźnie grubsza.
czy ktoś może wie w czym jest problem ?