3
25
Fork
You've already forked fpdf
10

[probably a question] Cannot set the left margin to 0 #89

Open
opened 2024年10月11日 17:14:18 +02:00 by wsw70 · 1 comment
wsw70 commented 2024年10月11日 17:14:18 +02:00 (Migrated from github.com)
Copy link

I tried to create a cell that would start on the edge of the page:

pdf.SetMargins(0,0,0)pdf.SetX(0)pdf.SetY(0)pdf.Cell(0,0,"QR")

I get this:

image

Where does the space marked in red come from?

Note: I guess that this is not due to the font - I changed its size but the gap stays the same. It would also seem that the gap is exactly 1 mm wide:

image

I tried to create a cell that would start on the edge of the page: ```go pdf.SetMargins(0,0,0) pdf.SetX(0) pdf.SetY(0) pdf.Cell(0, 0, "QR") ``` I get this: ![image](https://github.com/user-attachments/assets/302979c7-1650-4733-8da0-5dc0de12d8d1) **Where does the space marked in red come from?** Note: I guess that this is not due to the font - I changed its size but the gap stays the same. It would also seem that the gap is exactly 1 mm wide: ![image](https://github.com/user-attachments/assets/060096f0-6e45-4494-ba0a-da5dfd0a9c64)

you probably need this too pdf.SetCellMargin(0)

you probably need this too `pdf.SetCellMargin(0)`
Sign in to join this conversation.
No Branch/Tag specified
main
v0.12.0
v0.11.1
v0.10.0
v0.11.0
v0.9.0
v0.8.0
v0.7.0
v0.6.0
v0.5.0
v1.4.3
v0.4.1
v0.4.0
v0.3.1
v0.3.0
v0.2.0
v0.1.0
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
go-pdf/fpdf#89
Reference in a new issue
go-pdf/fpdf
No description provided.
Delete branch "%!s()"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?