-
Notifications
You must be signed in to change notification settings - Fork 10.1k
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
Comments
Not clear what this means. User is no longer active on Github. Can reopen if asked. |
Let me Google that for You. http://www.google.com/search?q=site:adobe.com+pdf+layer Standard since PDF specification 1.5. Present in the UI of every Adobe PDF viewer for about a billion years now. 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.) |
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. |
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 (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 ( |
@blerner I think this issue is different than what you're asking about. Can you open a new issue with your comment above? |
I'm looking for OCG functionality as well... is this on the plans? Can someone point me to the roadmap? |
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) |
I'm also interested in knowing when layers will be supported (specifically showing/hiding them). |
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. |
Files with OCGs: |
Also expect this feature. Get layers info/showing layer/hiding layer. |
Hi, also expect OCGs (layer) supports. Any schedule? |
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. |
Here's a simple one: |
an old example with transparency and ocgs, it'd be nice if the ocgs were selectable from within a browser/ page |
Hey there, I've been trying to find a solution for this issue during the last week and was hoping someone can point me in the right direction. So far I was able to identify the "hidden" layers inside document.js like this:
But I could not draw the connection between the layers and the actual content that is rendered by pdf.js. So if anyone could give me a hint how to figure out which data is supposed to be hidden, I'd rellay love to put it to use. |
Add a new method to the API to get the optional content configuration. Add a new render task param that accepts the above configuration. For now, the optional content is not controllable by the user in the viewer, but renders with the default configuration in the PDF. All of the test files added exhibit different uses of optional content. Fixes mozilla#269.
Add a new method to the API to get the optional content configuration. Add a new render task param that accepts the above configuration. For now, the optional content is not controllable by the user in the viewer, but renders with the default configuration in the PDF. All of the test files added exhibit different uses of optional content. Fixes mozilla#269.
Add a new method to the API to get the optional content configuration. Add a new render task param that accepts the above configuration. For now, the optional content is not controllable by the user in the viewer, but renders with the default configuration in the PDF. All of the test files added exhibit different uses of optional content. Fixes mozilla#269.
Add a new method to the API to get the optional content configuration. Add a new render task param that accepts the above configuration. For now, the optional content is not controllable by the user in the viewer, but renders with the default configuration in the PDF. All of the test files added exhibit different uses of optional content. Fixes mozilla#269.
Add a new method to the API to get the optional content configuration. Add a new render task param that accepts the above configuration. For now, the optional content is not controllable by the user in the viewer, but renders with the default configuration in the PDF. All of the test files added exhibit different uses of optional content. Fixes mozilla#269.
Add a new method to the API to get the optional content configuration. Add a new render task param that accepts the above configuration. For now, the optional content is not controllable by the user in the viewer, but renders with the default configuration in the PDF. All of the test files added exhibit different uses of optional content. Fixes mozilla#269. Fix test to work with optional content. - Change the stopAtErrors test to ensure the operator list has something, instead of asserting the exact number of operators.
Add a new method to the API to get the optional content configuration. Add a new render task param that accepts the above configuration. For now, the optional content is not controllable by the user in the viewer, but renders with the default configuration in the PDF. All of the test files added exhibit different uses of optional content. Fixes mozilla#269. Fix test to work with optional content. - Change the stopAtErrors test to ensure the operator list has something, instead of asserting the exact number of operators.
Add a new method to the API to get the optional content configuration. Add a new render task param that accepts the above configuration. For now, the optional content is not controllable by the user in the viewer, but renders with the default configuration in the PDF. All of the test files added exhibit different uses of optional content. Fixes mozilla#269. Fix test to work with optional content. - Change the stopAtErrors test to ensure the operator list has something, instead of asserting the exact number of operators.
Add a new method to the API to get the optional content configuration. Add a new render task param that accepts the above configuration. For now, the optional content is not controllable by the user in the viewer, but renders with the default configuration in the PDF. All of the test files added exhibit different uses of optional content. Fixes mozilla#269. Fix test to work with optional content. - Change the stopAtErrors test to ensure the operator list has something, instead of asserting the exact number of operators.
Add a new method to the API to get the optional content configuration. Add a new render task param that accepts the above configuration. For now, the optional content is not controllable by the user in the viewer, but renders with the default configuration in the PDF. All of the test files added exhibit different uses of optional content. Fixes mozilla#269. Fix test to work with optional content. - Change the stopAtErrors test to ensure the operator list has something, instead of asserting the exact number of operators.
Add a new method to the API to get the optional content configuration. Add a new render task param that accepts the above configuration. For now, the optional content is not controllable by the user in the viewer, but renders with the default configuration in the PDF. All of the test files added exhibit different uses of optional content. Fixes mozilla#269. Fix test to work with optional content. - Change the stopAtErrors test to ensure the operator list has something, instead of asserting the exact number of operators.
Add a new method to the API to get the optional content configuration. Add a new render task param that accepts the above configuration. For now, the optional content is not controllable by the user in the viewer, but renders with the default configuration in the PDF. All of the test files added exhibit different uses of optional content. Fixes mozilla#269. Fix test to work with optional content. - Change the stopAtErrors test to ensure the operator list has something, instead of asserting the exact number of operators.
Add a new method to the API to get the optional content configuration. Add a new render task param that accepts the above configuration. For now, the optional content is not controllable by the user in the viewer, but renders with the default configuration in the PDF. All of the test files added exhibit different uses of optional content. Fixes mozilla#269. Fix test to work with optional content. - Change the stopAtErrors test to ensure the operator list has something, instead of asserting the exact number of operators.
Add a new method to the API to get the optional content configuration. Add a new render task param that accepts the above configuration. For now, the optional content is not controllable by the user in the viewer, but renders with the default configuration in the PDF. All of the test files added exhibit different uses of optional content. Fixes mozilla#269. Fix test to work with optional content. - Change the stopAtErrors test to ensure the operator list has something, instead of asserting the exact number of operators.
Add a new method to the API to get the optional content configuration. Add a new render task param that accepts the above configuration. For now, the optional content is not controllable by the user in the viewer, but renders with the default configuration in the PDF. All of the test files added exhibit different uses of optional content. Fixes mozilla#269. Fix test to work with optional content. - Change the stopAtErrors test to ensure the operator list has something, instead of asserting the exact number of operators.
Add a new method to the API to get the optional content configuration. Add a new render task param that accepts the above configuration. For now, the optional content is not controllable by the user in the viewer, but renders with the default configuration in the PDF. All of the test files added exhibit different uses of optional content. Fixes mozilla#269. Fix test to work with optional content. - Change the stopAtErrors test to ensure the operator list has something, instead of asserting the exact number of operators.
@brendandahl how does the new API works? What is "Optional Content"? Can't we simply scan existing layers and hide them? Thanks! |
See https://www.adobe.com/content/dam/acom/en/devnet/acrobat/pdfs/PDF32000_2008.pdf#G7.3858031
Unfortunately it's really quite difficult to understand what you're asking here. |
Sorry, I meant detecting them and having the option to manipulate them (hide, remove, etc...) |
I tried the feature and it works as expected, which is that instead of displaying all layers, it only displays the ones for viewing. |
The full API still needs a bit more work, but you can Useful links: Line 779 in 63e33a5
Line 958 in 63e33a5
|
@brendandahl oh, this looks very interesting! I will give it a go. Thanks! |
@brendandahl a pdf like this doesn't seem to have any |
That is all.
The code looks really promising!
The text was updated successfully, but these errors were encountered: