Hi, is it possible to use a cropper for pdf in angular?

207 Views Asked by At

i search everywhere but no one can help me. I need to crop a pdf file using some library for angual 10 or more

i have allready try ngx-image-cropper but it can't be use for pdf files

2

There are 2 best solutions below

1
louenjli On

I think it's not possible to crop a pdf directly. You can to convert the pdf to an image and then you can to crop it.

0
K J On

PDF cropping is not trivial, since a PDF crop boundary is simply the edge of the viewport so you can easily reset it inside the /Mediabox (even simply rename them) but it should never crop the contents. Here we see the Text now runs off the page boundary,

enter image description here

Thus when asking for a crop tool many users actually need a redaction tool, that cuts away the unwanted external edges, or is highly variable to only encompass the page contents, which for images is not likely to be practical using a programmed approach, thus best done using a GUI like BRISS