开发者

FPDF Add text with background color to an x/y co-ordinate

Question explains it all really, I need to add some text to a PDF at positions X / Y with a background color.

I know I can do this using a cell, but i开发者_如何学JAVAt seems that you cannot place a cell using an X and Y co-ord.


What if you modify your current X Y position and then place the cell?

Something like:

SetXY(50, 150)
Cell(100, 50, "This is my text in a box.", 1, 0, 'c', true)


For some reason I found it works only in this sequence: first set Y then X. for the $pdf->Cell() text box.

  $pdf->SetY(30);
  $pdf->SetX(70);
  $pdf->Cell(100, 10, "This is my text in a box.", 1, 0, 'e', true);
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜