-
Anonymous
Я хочу создать таблицу, в которой текст заголовка будет выровнен по вертикали. Я пробовал разные методы, но ни один из н
Сообщение
Anonymous »
Код: Выделить всё
if (isset($_POST['convert_to_pdf'])) {
require_once('../TCPDF-main/main/tcpdf.php');
$pdf = new TCPDF('landscape', PDF_UNIT, 'LEGAL', true, 'UTF-8', false);
$pdf->SetCreator(PDF_CREATOR);
$pdf->SetTitle('HTML to PDF');
$pdf->SetHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
$pdf->SetFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
$pdf->SetMargins(1, 10, 1); // Adjust margins as needed
$pdf->setCellPaddings(1, 5, 1, 5); // Adjust cell paddings as needed
// Disable header and footer
$pdf->SetPrintHeader(false);
$pdf->SetPrintFooter(false);
// Enable automatic page breaking
$pdf->SetAutoPageBreak(true, 10);
// Set default font
$pdf->SetFont('helvetica', '', 10);
// Add a new page to the PDF
$pdf->AddPage();
// HTML content for the table
$html =
'
Enrollment No.
Источник: [url]https://stackoverflow.com/questions/78132185/i-want-to-create-a-table-where-the-header-text-is-vertically-aligned-ive-tried[/url]
1710035135
Anonymous
[code]if (isset($_POST['convert_to_pdf'])) {
require_once('../TCPDF-main/main/tcpdf.php');
$pdf = new TCPDF('landscape', PDF_UNIT, 'LEGAL', true, 'UTF-8', false);
$pdf->SetCreator(PDF_CREATOR);
$pdf->SetTitle('HTML to PDF');
$pdf->SetHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
$pdf->SetFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
$pdf->SetMargins(1, 10, 1); // Adjust margins as needed
$pdf->setCellPaddings(1, 5, 1, 5); // Adjust cell paddings as needed
// Disable header and footer
$pdf->SetPrintHeader(false);
$pdf->SetPrintFooter(false);
// Enable automatic page breaking
$pdf->SetAutoPageBreak(true, 10);
// Set default font
$pdf->SetFont('helvetica', '', 10);
// Add a new page to the PDF
$pdf->AddPage();
// HTML content for the table
$html =
'
Enrollment No.
Источник: [url]https://stackoverflow.com/questions/78132185/i-want-to-create-a-table-where-the-header-text-is-vertically-aligned-ive-tried[/url]