Open abhilashsajeev opened 1 year ago
as of now, go-pdf/fpdf
can only create PDFs from scratch.
to achieve what you want, one would need to add infrastructure and code that reads+parses PDFs and then produces a Fpdf
document (on top of which one would add new instructions).
I am not against adding such capabilities, but that's a bit outside of the current amount of time I can dedicate to go-pdf/fpdf
.
(but I do accept PRs, though.)
Can I suggest the htmx pattern .
it allows you to do pressure enhancement . What does that mean ?
Basically you can add more content to an existing file. It’s used normally for html when you want to change the dom nodes and inject new dom
So it’s a way to add more to a pdf basically
what I don’t know is if the pdf format gives a type of selector / dom where you can add / overwrite existing pdf like you can do with html ??
If there is then it’s a great way to make pdfs editable
Assuming go-pdf/fpdf
maintains some compatibility with jung-kurt/gofpdf
, drawing on the pdf is quite simple.
Check out this example which draws vectors from a remarkable tablet .rm file onto a new layer of a pdf.
The examples in documentation shows adding new pdfs only. I would like to add lines and curves to existing pdf file. Could you please provide minimal working example of doing the same