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

Add the ability to set HTTP headers #18

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

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