I have a PDF, in it is raster image and SVGs, I want to keep the SVG and remove the raster image (that raster image appears in every page of the PDF, and the PDF is over 600 pages). After some researching, I found the following code can do the job:
every time there’s I have a problem to solve on windows and I google for a solution, there’s never something saying what needs to be done instead there’ll be an executable complete with GUI for the tiniest tasks like syncing the clock on boot
makes me look around for someone to blame for the situation, clearly someone needs to get shot
@kutada there’s probably a file in your bin directory named sed or sed.exe, that’s what you would run, with those arguments. but since you’re running something that you … well, don’t even know how to run, don’t be too surprised if it doesn’t do anything resembling what you want
For example, it would not correctly deal with:
It would leave the opening svg tag but not the closing one.
It would match on <defs> but not on <defs > so that would lead to skipping or if it’s the closing one that doesn’t match exactly then everything gets deleted from that point because the closing tag is never found
There may be 600 pages, but there might not be all that many defs tags. You’d want to inspect it anyway to figure out what you’re doing so grab a text editor.