Is PDF layer extraction without acrobat possible?

Anyone ever managed to split a PDF up by layers? oK, now put your hand down if you used full Acrobat.

I’m trying to figure out how to split one without buying (subscribing to)the whole adobe suite.

1 Like

What platform?

PC? Web-based? Whatever we got.

I normally try and respond with solutions, but I’m fairly certain there’s no way to do this without using an Adobe product as that’s a proprietary Adobe PDF feature. It can easily be done in Acrobat (not reader) or in Illustrator, or even in PhotoShop if you don’t mind it being rendered, but I’m assuming if you had access to those programs you wouldn’t be asking. I’ve tried it in Preview (if you’re on a Mac) with no success.

It is possible to Export a PDF with your layers as individual pages, and in that instance, you can easily delete, extract or re-order them in Preview.

So Irksome, because the national map uses layered PDF as its output. This is public data that they chose to put behind a paywalled software. I get why they did it, but i’d love to extract the topo maps from the USGS data, which, you know, taxes paid for and all.

1 Like

If you can include the PDF here, when I have a chance I might be able to save the layers you need, or see if I can save out the layers as individual pages or artboards…

If it’s a vector PDF it should be easy enough to do with any vector drawing program that can open a PDF file. It might take some work to rebuild pieces of the design onto layers you can turn on or off, but since the GF app doesnt read layers anyway, the only practical application of the layers is to aid in assigning colors (operations) to the pieces or just working with the file within a design program.

4 Likes

You would think that, but it’s definitely not in Inkscape’s wheelhouse. I’ve done it once with acrobat on a friend’s computer who had the full license, and it was trivial.

@forhorsman – As for the source pdf, any quadrangle from nationalmap.gov is like this.

Here’s just one, of my hometown growing up:

(603 Glowforgers, represent!)

@mpipes Holy smokes, that worked.

Inkscape cried and screamed the whole time, as these are some massive PDFs, but I was able to get the topo layer out by itself.

It’s nested grouped objects like crazy, I think to get to the individual topo line was 6 or 7 ungroups.

I need a faster computer. Anyone got a dual-xeon machine laying around? Something with about 20 cores would be just fine.

Thanks!

4 Likes

I tried downloading the map of my area and it was just 207 bitmap images grouped together and stuck in a PDF file, no vector data at all. Pooh.

You need to be sure that you are downloading the topo map. What zip code should I look for, let me see if I can pull it. The UI on the site is a bit janky.

You’re right, I think I grabbed one of the historical maps. Inkscape is chugging away at importing now.

It’s ugly, but it sees to work. I pulled 2 topo lines out or the 1200+, and it was over 1000 nodes already. I have no doubt that simplifying the curves would destroy the map, and sending a file that complex to the GF is never going to work with the way the server side software is now. May have to shelve this project for the time being.

1 Like

Not necessarily true. It just depends on the segments. A lot of the individual anchors may be unnecessary - just depends on how the line was generated. I’ve thrown some pretty heavy all-vector stuff at the UI and it has done fine.

1 Like

You’re probably right about how not all vectors are created equal, but this is a tremendous number of nodes (95,453!). Far more than the UI has handled in the past for me. All things being equal, even assuming some nodes are tougher than others, I think this is a very tall order.

Gotcha. Yeah, I’m playing around with it and trying to send you back something useful, with easy to use layers, but not having a lot of luck. Even when I export it just as a generic EPS it ends up flattening all the layer groups into one.

Thanks for the link! (Clicking on thenationmap.gov didn’t work for me. Doing an internet search led me to nationalmap.gov which seems to be correct. Is that what you meant?)

3 Likes

Yep, sorry. Moving too quickly. Edited.

Affinity Designer works great for importing and selecting / deleting / processing the separate layers in a GeoPDF @evansd2 . I have also done it in Inkscape but Affinity Designer is easier.
AD is a pretty amazing software application and cost only about $50. Wow. It also smokes Illustrator in the file sizes it can handle, especially the cloud based version of Illustration.

2 Likes

Inkscape choked on my computer too, but Rhino handled it just fine. It has a “select by color” tool and I used it to select the two colors that are in this file. Is this even close to what you are looking for? This is just a ton of lines at this point, so might be useless. :frowning:
7413930-2

I kept playing with it in Inkscape and came up with this… This one has the original line widths (or, I’m assuming it does).
MoreLines
Actually, once the file opened there was nothing to it - zoom way in and click on one of the lines and drag it. If the lines move when you drag the mouse you know you’ve successfully clicked on the lines. When you release the mouse button the lines should still be selected. Now undo the drag (Ctrl+Z). The group should still be selected. Take note of the XY coordinates of the group. Next copy the group (Ctrl+C), select everything (Ctrl+A), delete everything (Del - :slight_smile: ), and paste the group back into the design (Ctrl+V). If you care and it matters to you, change the coordinates of the pasted group to the coordinates you noted earlier. Alternately, you can paste the copied groups into a new design. Noting the coordinates will let you paste smaller groups into the new design accurately (Inkscape has these rectangles where you can type in squiggles people call numbers - they’re handy!).

Tagging the OP so that @evansd2 gets a notification of the stuff I added about getting the lines extracted using Inkscape only.

6 Likes