PDA

View Full Version : Any experts on PDFs and PDF editing? I want to invert colours without loss of quality



Agent_24
26-02-2013, 12:42 AM
I wish to take a black and white image (PCB layout in fact) in PDF format and invert the colour. It appears to be in vector format, as zooming in for an extreme close up shows no loss of quality. I want to try to keep it in a vector format.

I have tried opening it in GIMP and Photoshop CS2, however both require conversion to a raster, and this I believe is why when printed it looks terrible.

fred_fish
26-02-2013, 12:52 AM
You could bodge it by just zooming to the required detail level, taking screenshots, and stitching them together.
Or is this an ongoing issue?

bob_doe_nz
26-02-2013, 12:54 AM
Try Inkscape Portable. (http://portableapps.com/apps/graphics_pictures/inkscape_portable)
Whether it can invert, I don't know. But it might be able to convert it to SVG which hopefully should natively import into GIMP.

kahawai chaser
26-02-2013, 01:37 AM
Maybe be able to invert it online, if not then convert from SVG to allow inversion to suit. Convert hub or Online Utility org may help.

Agent_24
26-02-2013, 09:49 AM
You could bodge it by just zooming to the required detail level, taking screenshots, and stitching them together.
Or is this an ongoing issue?

I guess I could, but that would be very slow and painful. Also there's no guarantee it would work, either. Even importing to GIMP at 1200dpi which looked perfect on screen still had issues when printing. Stuffed if I know why. It may even be the printer itself, which is why I want to keep it vector based.


Try Inkscape Portable. (http://portableapps.com/apps/graphics_pictures/inkscape_portable)
Whether it can invert, I don't know. But it might be able to convert it to SVG which hopefully should natively import into GIMP.

I did end up trying Inkscape, after realizing from your post that of course a Vector graphics editor makes much more sense! I guess I wrote it off thinking it would never actually open a PDF. Turns out it does.

But, that was not without its problems either. While everything imported as a vector and looked great, actually inverting the colours was not easy. Each piece of the image imported as a path, most without any defined fill or stroke colour (but were still correctly black anyway!) Some stayed as groups which on ungrouping still appeared to be only 1 object. How it actually showed up as such I don't know.

But I was only able to invert about half the items easily, though that was after I found the "Find" tool, to let me select multiple objects of same type\colour at the same time. This let me convert pads and diagonal lines, but everything else refused to change. I could do it manually one-by-one but with the sheer number of little pieces I put that aside as a last resort.

The process seems sound, possibly Inkscape just needs to tweak its PDF import algorithms or something. But I am definitely on the right track with vector rather than raster editing software...


Maybe be able to invert it online, if not then convert from SVG to allow inversion to suit. Convert hub or Online Utility org may help.

Will try that out today. I did find there are some Linux CLI tools that let you convert PDFs to PostScript and\or EPS. Worked well, too. But no inversion that I could see..

Edit: Convert Hub looked good, even has invert feature, but it doesn't work, just gives me back totally empty files.

Online-utility.org looks good, it does convert, but it converts to a raster in very low resolution. No option to invert.

Still, both look like good sites to keep for future reference!



Will try out some other vector graphics editors and see if I can get something that works better than Inkscape for this. I think it's the way to go...

Agent_24
26-02-2013, 11:45 AM
Worked great in Adobe Illustrator. Ungroup everything, invert the graphics, take the bottom background layer and give it a solid black fill.

Now if only there was something free that could do it just as easily...