Skip to content

Conversation

csavelief
Copy link

@csavelief csavelief commented Mar 1, 2020

Add the ability to set HTTP headers in order to be able to load PDF files from protected APIs.

Example :

<vue-pdf-viewer
    :url="url"
    :httpHeaders="{'X-CSRF-TOKEN': '<your-csrf-token>', 'X-XSRF-TOKEN': '<your-xsrf-token>'}"/>

@csavelief
Copy link
Author

This commit does two things :

  1. Add a text layer on top of the canvas ;
  2. Give the user the ability to find and highlight text fragments. The caller has the ability to target a specific page and set the color of the highlighted text.

Example :

<vue-pdf-viewer
    :selections="[{text: 'dommages aux biens', color: '#ff9704', page: 3}, {text: 'Moselle', color: 'red', page: 3}]"
    :url="url"/>

Output :

pdf-text-highlight

Closes issues #2 and #17.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant