php - TCPDF 180° 旋转文本,Y 轴错误?
问题描述
我想将旋转的文本放置在 A4 文档的底部,但我无法将其固定到低于此处的位置:
$pdf = new TCPDF('P', 'mm', 'A4', true, 'UTF-8');
// set document information
$pdf->SetCreator(PDF_CREATOR);
$pdf->SetAuthor('visioncode');
$pdf->SetTitle('test');
$pdf->setPrintFooter(false);
$pdf->setPrintHeader(false);
// set header and footer fonts
$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
// set default monospaced font
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
// set margins
$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
// set auto page breaks
$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
// set image scale factor
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
// set some language-dependent strings (optional)
if (@file_exists(dirname(__FILE__).'/lang/eng.php')) {
require_once(dirname(__FILE__).'/lang/eng.php');
$pdf->setLanguageArray($l);
}
$pdf->setJPEGQuality(80);
$pdf->AddPage();
$pdf->SetFont('helvetica', 'B', 18);
$pdf->WriteHTMLCell(94, 20, 5, 33, 'lorem ipsum lorem ipsum', 0, 0, false, true, 'C');
$pdf->StartTransform();
$pdf->Rotate(180);
$pdf->SetY(0);
$pdf->WriteHTML('lorem ipsum lorem ipsum');
$pdf->StopTransform();
$pdf->output(null, 'I');
如果我将 SetY 设置为负值,则文本将完全消失。不知道,如何在上面的屏幕截图中将文本设置得更低。
解决方案
推荐阅读
- python-3.x - NameError:名称“Ptime”未使用 tkinter 比例滚动条定义
- r - 使用 R 和 RCurl 连接到 SFTP 的问题
- r - 如何训练具有大量分类特征的模型 :: RStudio 崩溃
- javascript - 请求方法未显示在 this.props 中
- python - Pytest 在尝试运行测试时给我一个错误
- numpy - 将 numpy.datetime64 转换为纪元时间
- r - 在 r 中的数据表中找到前 1 个百分位数
- c++ - 检查数组中的所有对是否都可以被 k 整除
- html - 如何在componentDidMount(使用react.js)中将div滚动到底部?
- deep-linking - 如何将路由与 Branch.io 后备 utl 一起使用