Skip to content
Discussion options

You must be logged in to vote

There are two ways to achieve what you need:

  1. If you want to undergo some tedious details you can extract the text via the low-level method get_texttrace. This output also has the "layer" key. But as you will see, some comfort compared to get_text() is missing there.
  2. Use the document's feature directly to overall activate a certain layer. Then everything in the PDF will be switched to that view: page renderings, text extractions, vector graphics, etc. This is method set_layer_ui_config. Get information about available such configurations via layer_ui_configs. These methods are equivalent to what you would achieve in a supporting PDF viewer when clicking on a layer.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by BMaxV
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants