Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request for the future: PDF layers #269

Open
Richard-Mlynarik opened this issue Jul 17, 2011 · 17 comments

Comments

@Richard-Mlynarik
Copy link

commented Jul 17, 2011

That is all.

The code looks really promising!

@arturadib

This comment has been minimized.

Copy link
Contributor

commented Oct 7, 2011

Not clear what this means. User is no longer active on Github. Can reopen if asked.

@arturadib arturadib closed this Oct 7, 2011

@Richard-Mlynarik

This comment has been minimized.

Copy link
Author

commented Oct 7, 2011

Let me Google that for You.

http://www.google.com/search?q=site:adobe.com+pdf+layer
http://www.google.com/search?q=site:adobe.com+pdf+%22optional+content+group%22

Standard since PDF specification 1.5.
http://wwwimages.adobe.com/www.adobe.com/content/dam/Adobe/en/devnet/pdf/pdfs/PDF32000_2008.pdf
section 8.11.3 "Making Graphical Content Optional"

Present in the UI of every Adobe PDF viewer for about a billion years now.
PDF layers usefully correspond to Illustrator (and similar) drawing program layers, to layers in GIS output, etc.

I'd be more "active" on github (and with other free software) if I enjoyed being slapped about more. (I've stopped using Firefox since the "upgrade" that killed off the truly useful http://code.google.com/p/firefox-mac-pdf/ plugin, which also lacked PDF layer support but otherwise worked very nicely indeed. Browser with no PDF viewing = useless. Safari at least manages that, for all its other crapitude.)

@arturadib arturadib reopened this Oct 7, 2011

@arturadib

This comment has been minimized.

Copy link
Contributor

commented Oct 7, 2011

Hey there, didn't mean to insult you! We're doing an issue clean-up, so please forgive closing the issue on you.

And thanks for the detailed response - it definitely clarified what you meant.

Second-guessing terse user requests is a tough thing to do -- did the user mean "layers" at the UI/viewer level, or spec level (optional content), etc? I thought about inquiring here, but I wrongly assumed the odds of a response were low given that your only activity on Github was this comment (we're flattered! :)).

As I said, reopening is definitely an option - consider it done.

Thanks again.

@ghost ghost assigned notmasteryet Nov 18, 2011

@blerner

This comment has been minimized.

Copy link

commented Jan 8, 2013

I've uploaded a tiny file here that demonstrates broken rendering behavior for optional content groups and/or clipping paths (I'm not sure which thing is actually causing the bad behavior). If you try adding #textLayer=visible to the url, you can see that pdf.js is correctly finding and rendering the text, but is just not handling the rest of the rendering correctly.

(This particular PDF came about due to my working on this approach to rendering links in LaTeX using highlighting instead of boxes. The text is rendered into the current clipping path (7 Tr) rather than as normal text (0 Tr), then the clipping path is filled with the normal text color and, within an optional content group, filled again using the highlight color. IIRC, canvas.js#L982 already has some support for adding text to the clipping path, but it doesn't seem to be working here... As a result, this comment may not be 100% applicable to t his bug; feel free to redirect me to a more appropriate one if it exists ;-))

@brendandahl

This comment has been minimized.

Copy link
Contributor

commented Jan 8, 2013

@blerner I think this issue is different than what you're asking about. Can you open a new issue with your comment above?

@gitspeare

This comment has been minimized.

Copy link

commented Apr 19, 2014

I'm looking for OCG functionality as well... is this on the plans? Can someone point me to the roadmap?

@mothershipsoft

This comment has been minimized.

Copy link

commented Dec 4, 2014

Any news on supporting layers? Would be incredible useful. Getting object names would be useful too (as in object and group names you can set in Illustrator)

@Woodgnome

This comment has been minimized.

Copy link

commented Apr 27, 2015

I'm also interested in knowing when layers will be supported (specifically showing/hiding them).

@timvandermeij

This comment has been minimized.

Copy link
Contributor

commented Apr 27, 2015

There is no implementation for this yet and as far as I know no-one is working on this. If someone wants to work on this, feel free to create a pull request.

@THausherr

This comment has been minimized.

Copy link
Contributor

commented Jun 16, 2016

Files with OCGs:
http://ims.er.usgs.gov/images/USTopo/
(not all, only the huge ones)

@boundaryfree

This comment has been minimized.

Copy link

commented Mar 1, 2017

Also expect this feature. Get layers info/showing layer/hiding layer.

@boundaryfree

This comment has been minimized.

Copy link

commented Oct 20, 2017

Hi, also expect OCGs (layer) supports. Any schedule?
@timvandermeij The attachment is a pdf file exported from a architectural drawing containing hundreds of layers.
OCGs_demo.PDF

@timvandermeij

This comment has been minimized.

Copy link
Contributor

commented Oct 20, 2017

Currently this feature is not planned to be implemented. If someone wants to work on this, please let us know. If you can attach more example PDF files here, that would help to get people started and verify their work.

@THausherr

This comment has been minimized.

Copy link
Contributor

commented Mar 7, 2019

Here's a simple one:
PDFBOX-4103-OCG.pdf

@gitspeare

This comment has been minimized.

Copy link

commented Mar 7, 2019

an old example with transparency and ocgs, it'd be nice if the ocgs were selectable from within a browser/ page
_myChessboardv1.2_mockup_ImageArray_beta0.7 - public.pdf

@timvandermeij timvandermeij added the 1-core label Mar 7, 2019

@2Owy

This comment has been minimized.

Copy link

commented Mar 19, 2019

I'm trying to identify some content from PDF.
I understand that I can't use the layers because they are not supported.
Is that corect ?
And is there another way ?

@mkubdev

This comment has been minimized.

Copy link

commented Aug 7, 2019

I'm also expect this feature. Get layers info/showing layer/hiding layer. This will be very usefull for Solidworks/Inventor usage.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
You can’t perform that action at this time.