Can I draw a rectangle? #160
-
Hello, I'd like to know if I can draw a rectangle on the page. I'm drawing a text on the page using the Edit: grammar. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
There are no helper methods for it yet, but I think it can be done with the raw API (though I haven't tried this myself yet). Also note that the current |
Beta Was this translation helpful? Give feedback.
There are no helper methods for it yet, but I think it can be done with the raw API (though I haven't tried this myself yet).
FPDFPageObj_CreateNewRect()
andFPDFPageObj_SetFillColor()
should do the trick. Take a look atfpdf_edit.h
.Also note that the current
insert_text()
method has problems and will be removed or replaced with something simpler on the next major release. It currently attempts to insert text using an external text shaping engine (for foreign writing systems) but that is quite complex and the implementation has issues. As long as you don't need to support Hindi etc., you're better off withFPDFPageObj_NewTextObj()
(orFPDFPageObj_CreateTextObj()
) andFPDFText_SetText()
u…