Skip to content

Releases: gspasov/svelte-pdf-simple

Release v2.0.0

03 Oct 19:54
2bc9e84
Compare
Choose a tag to compare

This release introduces BREAKING CHANGES.

  • Removing next/prev functions/events for goToPage and page_changed. Now uses can move to any page not just forwards and backwards one page at a time.
  • Added rotation api to allows users to rotate PDF. + landscape and upside-down PDFs were not displayed correctly
  • Added better types for props, slots and events
  • Styles for canvas can now be passed directly
  • Unified error type
  • Fixed some bugs

More information on what it brings could be found in this PR - #3

Release v1.0.7

14 Apr 19:09
Compare
Choose a tag to compare

Features added

  • PdfViewer now exports resize function for custom resizing of the PDF after it's been fully loaded. Really useful for setting up zoom functionality.

Release v1.0.6

06 Apr 19:36
Compare
Choose a tag to compare

Breaking Changes

  • pdfUrl is now changed for url.
  • pdfBin is now changed for data.
  • loaded is now changed for load_success.

Features added

  • New load_failure dispatch event. Used to notify if PDF was failed to load.
  • New password_required dispatch event. Used to notify if the PDF is password protected.
  • New incorrect_password dispatch event. Used to notify that the provided password to unlock the PDF is incorrect.
  • Exports new function openWithPassword/1. Used to try to open a locked PDF with a provided password. Usually to be used in conjunction with password_required slot.
  • New password_required slot. Used to display HTML for when the PDF is password protected. Ideal place to hold input for provided necessary password.

New props

  • url for loading PDF from path or url.
  • data for loading binary/Base64 encoded PDF.
  • password for providing password for locked PDF.
  • httpHeaders for providing headers when accessing a pdf from Url that requires auth credentials.
  • additionalProperties for all other properties for initializing a pdfjs Document.

Misc

  • Proper setup of types for pdfjs.
  • Proper setup of SvelteKit to handle the project as library. With these changes we no longer need an example svelte project for demo.
  • Improved overall logic.

Release v1.0.5

02 Apr 07:50
Compare
Choose a tag to compare

Switching to svelte-kit for building the package.
This way types are build automatically by Svelte and there is no need for manual creation of .js or .d.ts files.
Types are now directly taken from pdfjs-dist which are up to date.
For example now annotations are properly typed as Record<string, unknown>[]

Release v1.0.4

31 Mar 18:49
Compare
Choose a tag to compare
  • Exposing annotations when pdf has forms;
  • Exposing textContents of pdf;
  • Created proper types for dispatch functions (next, prev, loaded);
  • Added capability of using base64 encoded pdfs

Breaking changes

  • Prop pdf can now be either pdfUrl when using pdfs from path or url, or pdfBin when using base64 encoded pdfs.

Release v1.0.3 ( Official first release )

27 Mar 08:41
Compare
Choose a tag to compare

Official first release of svelte-pdf-simple