You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First of all, this library is awesome. But I am missing one key aspect from this library to be able to use it. Also, I am not the only one. I will try to create some a draft of what I need, along while taking into consideration what others need too.
Get all of a type from a page:
To be able to modify a PDF also means to be able to change existing parts of it.
A PDFNode abstract class will be created. It would be the parent to PDFText, PDFImage, PDFSVG and `PDFShape.
classPDFNode{blendMode: BlendMode;opacity: number;rotate: Rotation;x: number;y: number;// Getter for its local width/height.getwidth(): number;getheight(): number;}
PDFPage.getAllTexts(): PDFTextNode[]
This is needed to be able to position one text base on another, Place signature (PNG) into the correct spot etc.
PDFText class is almost a copy of PDFPageDrawTextOptions interface.
The PDFPage.getAllTexts(): PDFText[] function will enable consumer, to find and replace text #564, Aligning new text to ones that are already in place. Or just find if the texts are in vector format, or in native text format.
I would also love to see this feature.
I found an abandoned project which, at least I think, capable of also modifying pdfs maybe it coud be of some help. https://github.com/galkahana/HummusJS
First of all, this library is awesome. But I am missing one key aspect from this library to be able to use it. Also, I am not the only one. I will try to create some a draft of what I need, along while taking into consideration what others need too.
Get all of a type from a page:
To be able to modify a PDF also means to be able to change existing parts of it.
A
PDFNode
abstract class will be created. It would be the parent toPDFText
,PDFImage
,PDFSVG
and `PDFShape.PDFPage.getAllTexts(): PDFTextNode[]
This is needed to be able to position one text base on another, Place signature (PNG) into the correct spot etc.
PDFText
class is almost a copy ofPDFPageDrawTextOptions
interface.The
PDFPage.getAllTexts(): PDFText[]
function will enable consumer, to find and replace text #564, Aligning new text to ones that are already in place. Or just find if the texts are in vector format, or in native text format.PDFPage.getAllImages(): PDFImageNode[]
PDFPage.getAllShapes(): PDFShapeNode[]
The
PDFShapeNode
is an abstract parent class toPDFShapeLineNode
,PDFShapeElipseNode
,PDFShapeRectangleNode
(andPDFShapePathNode
?).TODO: Copy from PDFPageDrawXxxOptions.
Square is a special case of
PDFShapeRectangle
, same goes for circle.PDFPage.getAllSVGs(): PDFSVGNode[]
Edits to
PDFPage
All of the
PDFPageDrawXxx
functions will now return the appropriatePDFNode
.The text was updated successfully, but these errors were encountered: