profile
viewpoint
Wojciech Maj wojtekmaj Kraków, Poland https://wojtekmaj.pl Hi! I'm a React developer from Krakow, Poland. I work for Intive and I'm the maintainer of React-PDF, React-Calendar and many other successful packages.

nnarhinen/react-pdf 172

React component for showing pdf documents

wojtekmaj/get-user-locale 21

A function that returns user's locale as an IETF language tag, based on all available sources.

wojtekmaj/make-cancellable-promise 7

Make any Promise cancellable.

wojtekmaj/merge-class-names 6

A function that merges given class names, no matter their format: string with single or multiple class names or an array of class names. Filters out invalid class names as well.

wojtekmaj/date-utils 4

A collection of date-related utilities.

wojtekmaj/make-event-props 4

Returns an object with on-event callback props curried with provided args.

wojtekmaj/detect-element-overflow 3

A function that tells you whether a given element is overflowing its container or not. Useful for creating dropdowns and tooltips.

wojtekmaj/predict-input-value 3

Predicts the input value during KeyDown or KeyPress events, before the input is actually changed

wojtekmaj/country-code-to-flag-emoji 2

A function that returns a flag emoji given IETF language tag.

wojtekmaj/eslint-staged-files 2

Run ESLint on staged files only.

issue commentwojtekmaj/react-pdf

PDF displaying boxes and images but no font. Warning: Unimplemented operator paintImageMaskXObjectGroup

@namedoc, by default React-PDF uses canvas rendering. You need to opt in to SVG rendering manually.

namedoc

comment created time in 9 hours

issue closedwojtekmaj/react-pdf

PDF displaying boxes and images but no font. Warning: Unimplemented operator paintImageMaskXObjectGroup

Before you start - checklist

  • [x] I have read documentation in README
  • [x ] I have checked sample and test suites to see real life basic implementation
  • [x] I have checked if this question is not already asked

What are you trying to achieve? Please describe.

I am trying to view PDFs but there are select PDFs that do not render the font on the pdf. Only outlines, boxes, and images. I can download the response as a PDF file and open it with adobe and it works as expected.

Describe solutions you've tried

I have tried updating the versions of react-pdf and renderer. I am now using "react-pdf": "^4.2.0" and "@react-pdf/renderer": "^1.6.10". The PDF viewer works for most documents but certain PDFs are causing this issue. I've verified that the PDF itself opens and displays fine in adobe.

Additional information Any time I try to view these documents I am getting this warning in the console and I cannot find anything on it. Sounds like a masking issue but I am not entirely sure what it means. I've added some screenshots of what the PDFs look like when they are not showing the details/fonts.

Warning: Unimplemented operator paintImageMaskXObjectGroup

consoleWarning pdfviewermissingfont

Environment

  • Browser (if applicable) [Chrome 81]:
  • React-PDF version [e.g. 4.2.0]:
  • React version [e.g. 16.12.0]:

closed time in 11 hours

namedoc

issue commentwojtekmaj/react-pdf

PDF displaying boxes and images but no font. Warning: Unimplemented operator paintImageMaskXObjectGroup

In this case, there's nothing we can do, until pdf.js team implements said operator. Sorry about that!

namedoc

comment created time in 11 hours

issue commentuber/react-vis

Support React 17

Looks like it does not remove these methods after all! Postponed to React 18+.

Xiot

comment created time in 13 hours

issue commentwojtekmaj/react-pdf

Copy/paste text selection not working correct from rendered pdf

Unfortunately this PDF is not properly encoded. Copying text on Firefox, Chrome and Adobe Reader all results in gibberish.

frontSoftFront

comment created time in 14 hours

issue closedwojtekmaj/react-pdf

Copy/paste text selection not working correct from rendered pdf

Before you start - checklist

  • [+] I have read documentation in README
  • [+] I have checked sample and test suites to see real life basic implementation
  • [+] I have checked if this question is not already asked

What are you trying to achieve? Please describe.

I'd like to copy/paste the text of my PDF.

Describe solutions you've tried

On canvas mode, I can't correct select text. On SVG mode incorrect pdf rendering.

Additional information

Please, see my screens and file I working on Coyote #20262583 LC.pdf Screenshot from 2020-08-11 12-29-01 Screenshot from 2020-08-11 12-28-41 Screenshot from 2020-08-11 12-07-05 Screenshot from 2020-08-11 12-06-27 Screenshot from 2020-08-11 12-06-12

Environment

  • Browser (if applicable) [e.g. Chrome 57, Firefox 59]: Chrome 72
  • React-PDF version [e.g. 3.0.4]: 3.0.6
  • React version [e.g. 16.3.0]: 15.6.2
  • Webpack version (if applicable) [e.g. 4.16.2]: 3.3.0

closed time in 14 hours

frontSoftFront

issue commentwojtekmaj/react-pdf

Copy/paste text selection not working correct from rendered pdf

Just like on Canvas layer, text on SVG isn't meant to be copied.

Use renderTextLayer to render selectable text.

See also https://github.com/mozilla/pdf.js/issues/10205

frontSoftFront

comment created time in 14 hours

issue commentwebpack/webpack

Feedback on the webpack 5 stats output

Yes, I'm talking about this...

obraz

sokra

comment created time in 14 hours

push eventwojtekmaj/react-hooks

Wojciech Maj

commit sha e497e6649abca492304ec667dde56d602b1d26f7

Fix React 17 compatibility

view details

push time in 16 hours

push eventwojtekmaj/react-lifecycle-methods-diagram

Wojciech Maj

commit sha 8ade5b1be3b558fc76f5bbf51e49adcfec3b3a16

Replace React-🔥-Loader with React Fast Refresh

view details

push time in 17 hours

create barnchwojtekmaj/react-pdf

branch : react-fast-refresh

created branch time in 17 hours

startedpmmmwh/react-refresh-webpack-plugin

started time in 18 hours

issue closedwojtekmaj/react-pdf

Saving the PDF to backend

Before you start - checklist

  • [x] I have read documentation in README
  • [x] I have checked sample and test suites to see real life basic implementation
  • [x] I have checked if this question is not already asked

What are you trying to achieve? Please describe. I want to save the pdf displayed to the backend

Describe solutions you've tried I have not seen any solution

closed time in 19 hours

MarErnest

issue commentwojtekmaj/react-pdf

Saving the PDF to backend

React-PDF only reads the PDF, so I won't be able to help you. You need to save the PDF yourself, as any other file.

MarErnest

comment created time in 19 hours

issue commentwebpack/webpack

Feedback on the webpack 5 stats output

display assets in stats in a list instead of a table

Can I get the old behavior somehow via config? I find the new output a little too hard to read.

sokra

comment created time in a day

pull request commentwebpack/webpack

Related assets

display assets in stats in a list instead of a table

Can I get the old behavior somehow via config? I find the new output a little too hard to read.

sokra

comment created time in a day

issue commentactions/setup-node

GITHUB_TOKEN does not have access to other private packages

For those struggling to do the same with Yarn 2 (Yarn Berry):

        run: yarn --immutable
        env:
          YARN_NPM_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Ignigena

comment created time in a day

push eventwojtekmaj/react-date-picker

Wojciech Maj

commit sha 0303d3b52dfabf2269b6e3886ef033c9d20046d2

Turn on jest env in test files only

view details

push time in 2 days

push eventwojtekmaj/react-daterange-picker

Wojciech Maj

commit sha b879e411255019902f56b2162c7c99ff0850d174

Turn on jest env in test files only

view details

push time in 2 days

push eventwojtekmaj/react-time-picker

Wojciech Maj

commit sha 50d1f5bd7a2984903b8afd8dd84ab630548b99de

Turn on jest env in test files only

view details

push time in 2 days

push eventwojtekmaj/react-timerange-picker

Wojciech Maj

commit sha 8eafd06293e602c58030fc6b00be0411332e8660

Turn on jest env in test files only

view details

push time in 2 days

push eventwojtekmaj/react-datetime-picker

Wojciech Maj

commit sha 239963310a0690c370b55f7d25789f5d24683bbb

Turn on jest env in test files only

view details

push time in 2 days

push eventwojtekmaj/react-datetimerange-picker

Wojciech Maj

commit sha 4722fc3690c9efb7d6524fcc51da5c54d2c3a4ba

Turn on jest env in test files only

view details

push time in 2 days

push eventwojtekmaj/react-calendar

Wojciech Maj

commit sha f39759395f7bd3b8ea2846bad42ba3a5f29c376d

Turn on jest env in test files only

view details

push time in 2 days

push eventwojtekmaj/react-clock

Wojciech Maj

commit sha 230946413d3e45269bc85dfb11b1639aea242453

Turn on jest env in test files only

view details

push time in 2 days

push eventwojtekmaj/react-fit

Wojciech Maj

commit sha c05f200204945522f0417176ba7b9f86f166d02e

Turn on jest env in test files only

view details

push time in 2 days

push eventwojtekmaj/react-pdf

Wojciech Maj

commit sha 8745bf21b1305c1a6fdbf73f16d9d8fb58fbf042

Turn on jest env in test files only

view details

push time in 2 days

push eventwojtekmaj/react-hooks

Wojciech Maj

commit sha 31295e763d055a179ea1168ab0a361434bf90157

Turn on jest env in test files only

view details

push time in 2 days

push eventwojtekmaj/react-separated-number-input

Wojciech Maj

commit sha 0edcf05917a55c66ccc64a1120a9cf8be1e82ee8

Turn on jest env in test files only

view details

push time in 2 days

push eventwojtekmaj/async-array-utils

Wojciech Maj

commit sha 3a38b4e0cd7c3ee30b7b9f51c2d47b8a87589976

Turn on jest env in test files only

view details

push time in 2 days

push eventwojtekmaj/date-utils

Wojciech Maj

commit sha d39e71b8933c2a2bfc3ec03c95de18a9ad5e56c8

Turn on jest env in test files only

view details

push time in 2 days

push eventwojtekmaj/country-code-to-flag-emoji

Wojciech Maj

commit sha 94c38fa10fee4056354125c170847a704be5698f

Turn on jest env in test files only

view details

push time in 2 days

push eventwojtekmaj/get-user-locale

Wojciech Maj

commit sha 5f8a44a7776bf21eb51359d8e5ca83b66bc16dbc

Turn on jest env in test files only

view details

push time in 2 days

push eventwojtekmaj/detect-element-overflow

Wojciech Maj

commit sha 5cd8742319170f2a9948df09d85807640d99a007

Turn on jest env in test files only

view details

push time in 2 days

push eventwojtekmaj/nightmare-advanced-click

Wojciech Maj

commit sha 730025360901dcaaf7b89a761abd5e0d3551e620

Turn on jest env in test files only

view details

push time in 2 days

push eventwojtekmaj/make-cancellable-promise

Wojciech Maj

commit sha 9275bd0df6eea9f06c35b29fb0d951acb1f7e167

Turn on jest env in test files only

view details

push time in 2 days

push eventwojtekmaj/make-event-props

Wojciech Maj

commit sha 9ee0f4db9be1019e70c90b26f855e735bffa8b5f

Turn on jest env in test files only

view details

push time in 2 days

push eventwojtekmaj/merge-class-names

Wojciech Maj

commit sha 6b817934121f4de72df5b5418a290d22eef1f0f9

Turn on jest env in test files only

view details

push time in 2 days

push eventwojtekmaj/merge-refs

Wojciech Maj

commit sha 84c32ac28b5d2eccb1dd886d53acf8de39204926

Turn on jest env in test files only

view details

push time in 2 days

push eventwojtekmaj/nightmare-wait-for-url

Wojciech Maj

commit sha cafcf6d99d8e466d13e15c4cceb05188440205ad

Turn on jest env in test files only

view details

push time in 2 days

push eventwojtekmaj/predict-input-value

Wojciech Maj

commit sha 6954756c55a5dd021bc061a01976522fc5590cfc

Turn on jest env in test files only

view details

push time in 2 days

push eventwojtekmaj/update-input-width

Wojciech Maj

commit sha c4dd0f28db4020aa32a38b0a99878688d8172165

Turn on jest env in test files only

view details

push time in 2 days

delete branch wojtekmaj/babel

delete branch : no-non-inclusive

delete time in 2 days

issue commentwojtekmaj/react-calendar

Calendar not Displaying Properly

Usually it's not required. Webpack and Parcel pick the import up correctly.

AnkitBagaria24

comment created time in 2 days

delete branch wojtekmaj/lighthouse

delete branch : fix/security-vulnerability

delete time in 2 days

issue commentwojtekmaj/react-datetime-picker

Wrapper Styling

Unfortunately there is a number of elements in React-DateTime-Picker which all would require passing props, and I don't think this is a good idea.

My suggestion for using React-DateTime-Picker with styled-components is treating React-DateTime-Picker like a native control: applying class name to the root element and work on "normal" classes from here, like so:

const DatePicker = styled.div`
  .react-datetime-picker__wrapper {
    border: 1px solid red;
  }
`;
steinroe

comment created time in 2 days

issue commentwojtekmaj/react-date-picker

/'s not lining up with dates

Without the code? Nope

kemalturksonmez

comment created time in 5 days

issue commentwojtekmaj/react-pdf

PDF displaying boxes and images but no font. Warning: Unimplemented operator paintImageMaskXObjectGroup

Verify if the PDFs you have issues with are working in Firefox. If they don't, you may want to report the issue to PDF.js project.

namedoc

comment created time in 5 days

issue closedwojtekmaj/react-date-picker

React-Date-Picker with React-Calendar

Is it possible to have the react-date-picker on selection show the react-calendar https://github.com/wojtekmaj/react-calendar component? Reason being is the current calendar that appears on selection does not allow for aria labels for the 'next' and 'previous' button and we are seeking to resolve that for accessibility issues..

Thanks

closed time in 6 days

sirsaula

issue commentwojtekmaj/react-date-picker

React-Date-Picker with React-Calendar

No need to tag me.

This is React-Calendar. You can totally pass ARIA props to it - as per README props are passed to React-Calendar as well.

sirsaula

comment created time in 6 days

issue closedwojtekmaj/react-calendar

Can't find dependent @wojtekmaj/fdate-utils

Having the issue of installing react-calendar. It returns 404 error. npm ERR! code E404 npm ERR! 404 Not Found - GET https://registry.npmjs.org/@wojtekmaj%2fdate-utils - Not found
npm ERR! 404 npm ERR! 404 '@wojtekmaj/date-utils@^1.0.2' is not in the npm registry. npm ERR! 404 You should bug the author to publish it (or use the name yourself!) npm ERR! 404 It was specified as a dependency of 'react-calendar' npm ERR! 404 npm ERR! 404 Note that you can also install from a npm ERR! 404 tarball, folder, http url, or git url.

Is the dependent being removed? Will there be any update on react-calendar? Please assist.

closed time in 6 days

seetoml

issue commentwojtekmaj/react-calendar

Can't find dependent @wojtekmaj/fdate-utils

npm outage indeed.

seetoml

comment created time in 6 days

issue closedwojtekmaj/react-daterange-picker

'@wojtekmaj/react-daterange-picker@latest' is not in the npm registry.

while installing with npm i @wojtekmaj/react-daterange-picker I am getting this error Screenshot 2020-08-06 at 4 48 46 PM

closed time in 6 days

A-tibrewal

issue commentwojtekmaj/react-pdf

Please help me testing React-PDF 5.0 beta update!

@balrampariyarath Unfortunately not. #280/#415 has been addressed not in React-PDF per se, but in one of pdf.js updates, which also introduced a breaking change (dropping IE 11 support). As such, 4.x branch is stuck on this pdf.js version forever.

wojtekmaj

comment created time in 6 days

issue commentwojtekmaj/react-time-picker

How to change text inside option in select "am, pm"

text inside depends on locale and is based on browser's date formatting for a given locale.

For example, on Firefox, en-US locale gives:

> Intl.DateTimeFormat('en-US', { hour: 'numeric' }).format(new Date(2020, 0, 1, 9));
< "9 AM"

> Intl.DateTimeFormat('en-US', { hour: 'numeric' }).format(new Date(2020, 0, 1, 21));
< "9 PM"

which would result in "AM" and "PM" options in dropdown.

candrescastel

comment created time in 6 days

issue commentparcel-bundler/parcel

Error when using Yarn PnP mode

Looks like so - didn't find it because the error message changed 🤦

Although this ticket mentions 1 more case.

wojtekmaj

comment created time in 6 days

issue openedparcel-bundler/parcel

Error when using Yarn PnP mode

🐛 bug report

Error: @parcel/runtime-browser-hmr tried to access @babel/core, but it isn't declared in its dependencies; this makes the require call ambiguous and unsound.

🎛 Configuration (.babelrc, package.json, cli command)

All defaults. Not even React or something, just Yarn 2, yarn init, installed Parcel 2.0.0-beta, added index.html.

🤔 Expected Behavior

No error :P

😯 Current Behavior

ℹ️ Server running at http://localhost:1234
console: (node:75178) [MODULE_NOT_FOUND] Error: @parcel/runtime-browser-hmr tried to access @babel/core, but it isn't declared in its dependencies; this makes the require call ambiguous and unsound.
(Use `node --trace-warnings ...` to show where the warning was created)
✨ Built in 6.16s

When adding React to the party, same error appears:

console: (node:75408) [MODULE_NOT_FOUND] Error: @parcel/runtime-react-refresh tried to access @babel/core, but it isn't declared in its dependencies; this makes the require call ambiguous and unsound.

💁 Possible Solution

Add necessary dependencies in @parcel/runtime-browser-hmr's and @parcel/runtime-react-refresh's package.json

💻 Code Sample

<!-- Please provide a code repository, gist, code snippet or sample files to reproduce the issue -->

🌍 Your Environment

<!--- Include as many relevant details about the environment you experienced the bug in -->

Software Version(s)
Parcel 2.0.0-beta.1
Node 14.5.0
Yarn 2.1.1
Operating System Catalina

created time in 6 days

push eventwojtekmaj/timezone-coworking-tool

Wojciech Maj

commit sha d35508998dd673fec915fcd8595276491dcea128

Remove babel-eslint in favor of Espree

view details

push time in 7 days

push eventwojtekmaj/recreate-from-source-maps

Wojciech Maj

commit sha c173863251a73dab427f9da744b26193cb62c172

Update ESLint configuration

view details

push time in 7 days

push eventwojtekmaj/update-input-width

Wojciech Maj

commit sha 917bef9ecf5e67bb6664cc2c5f2474f4ad2f0120

Update ESLint configuration

view details

push time in 7 days

push eventwojtekmaj/predict-input-value

Wojciech Maj

commit sha 79cbed23192709f746e689efa19cf58858defaa0

Update ESLint configuration

view details

push time in 7 days

push eventwojtekmaj/country-code-to-flag-emoji

Wojciech Maj

commit sha 02be634bb19c0ebcb397c3d97a5082dc34077c91

Update ESLint configuration

view details

push time in 7 days

push eventwojtekmaj/detect-element-overflow

Wojciech Maj

commit sha 6e454b04c87693d3a4c621bacc413311fbdba358

Update ESLint configuration

view details

push time in 7 days

push eventwojtekmaj/make-cancellable-promise

Wojciech Maj

commit sha 7eb71c21dcf821ecee1e4d64d522ab1f4ddf0e5f

Update ESLint configuration

view details

push time in 7 days

push eventwojtekmaj/merge-class-names

Wojciech Maj

commit sha b6e3abb06f74f89c29931b1c8e01d7fc15f3b08b

Update ESLint configuration

view details

push time in 7 days

push eventwojtekmaj/make-event-props

Wojciech Maj

commit sha bdec4c02cad4e48816ee53d2dbb36ee95dc85291

Update ESLint configuration

view details

push time in 7 days

push eventwojtekmaj/merge-refs

Wojciech Maj

commit sha 74fc8979adabb4df09a8b814a8932b21d05a7cef

Update ESLint configuration

view details

push time in 7 days

push eventwojtekmaj/get-user-locale

Wojciech Maj

commit sha 715ee22d93a91ffb2c60551a099bf118d65b0869

Update ESLint configuration

view details

push time in 7 days

push eventwojtekmaj/date-utils

Wojciech Maj

commit sha cc25b3284e5516b2f85a68e5d94bb7f4ac2ff79c

Update ESLint configuration

view details

push time in 7 days

push eventwojtekmaj/async-array-utils

Wojciech Maj

commit sha 85ef96ddf1fe7acfc75bfe6e4ca51f45c3647efa

Update ESLint configuration

view details

push time in 7 days

push eventwojtekmaj/react-lifecycle-methods-diagram

Wojciech Maj

commit sha 507e84e0c0fb41815f71f74a35b0c4bef2d3f636

Remove non-standard export default from syntax

view details

Wojciech Maj

commit sha ca75790aad43a6b7acd64b9506d2af2cb2be0fec

Remove unused Babel plugins

view details

Wojciech Maj

commit sha 5ebbf88255ff2ed0c8854cff90e5a681d72b5cc2

Remove babel-eslint in favor of Espree

view details

push time in 7 days

push eventwojtekmaj/webpack-summary-compare

Wojciech Maj

commit sha a24c7d5daca11a876f5fd0fb74f47bfa56e2d516

Remove unused Babel plugins

view details

push time in 7 days

push eventwojtekmaj/webpack-summary-compare

Wojciech Maj

commit sha 4e0264b21211b5681e3fa6657103e25a126c1d9b

Refactor to functional components

view details

Wojciech Maj

commit sha 85e1ef1c8a24b68093c864144b775586b481a51b

Remove babel-eslint in favor of Espree

view details

Wojciech Maj

commit sha 643bde2cf805f549ea8779c996b382ab038d8cdc

Update dependencies

view details

push time in 7 days

issue closedwojtekmaj/react-pdf

Doesn't render the PDF from url

Hi @wojtekmaj Thanks for your updates of 5.0.0.0-beta.5 I fixed globalEventBus issue using this version. But Document component doesn't render the PDF from url. image

closed time in 7 days

webguru103

issue commentwojtekmaj/react-pdf

Doesn't render the PDF from url

You're only loading document, but are not displaying any pages. Use Page component as per docs and Wiki.

webguru103

comment created time in 7 days

issue commentwojtekmaj/react-pdf

Critical dependency: require function is used in a way in which dependencies cannot be statically extracted

To anyone watching this thread instead of #280: See https://github.com/wojtekmaj/react-pdf/issues/280#issuecomment-641590816.

2208Abhinav

comment created time in 7 days

issue commentwojtekmaj/react-pdf

Please help me testing React-PDF 5.0 beta update!

  • 5.0.0-beta.5 has been released with fix for deprecated globalEventBus, and officially dropped support for IE 11 (should have picked up that sooner - sorry about that).
  • 4.2.0 has been released with long awaited fixes and improvements introduced during 5.0 development.
wojtekmaj

comment created time in 7 days

push eventwojtekmaj/react-pdf

Wojciech Maj

commit sha 207d6b0f6501ea1d57ee50ae595d85eeb0820cdf

Add note on Internet Explorer compatibility

view details

push time in 7 days

issue commentwojtekmaj/react-pdf

Poor safari scroll performance in canvas; no render during scroll in svg

I wonder if that's connected in any way to #599 🤔

jackwshepherd

comment created time in 7 days

issue commentwojtekmaj/react-pdf

How to highlight sentence over multiple lines?

However I noticed that depending on how the pdf is rendered, it may not work.

Absolutely!

Things to consider:

  1. getTextItemWithNeighbors might need to "grab" more neighbors if the text to highlight is particularly large or the text nodes in PDFs are particularly small
  2. getTextItemWithNeighbors is a very naive implementation, e.g. if text nodes are "hello" and "world" it'll simply return "helloworld". You may consider .trim()ming the text nodes and adding spaces by .join(' ') instead of .join('') to make it a little smarter, but in general, it's a separate programming issue and I think you can handle this ;)
psawa

comment created time in 7 days

issue commentwojtekmaj/react-pdf

PDF text not displayed correctly when embedded in popup window using React Portal

Yeah, since fonts are added to the document that loads React-PDF, you would need to load React-PDF in popup. Otherwise the popup doesn't have access to the fonts, and consequently displays gibberish.

Not sure how to achieve this using this specific library, so I'm going to leave this open for the community to help.

lifan0127

comment created time in 7 days

issue closedwojtekmaj/react-pdf

Objects are not valid as a React child

HI @wojtekmaj I'm getting below Error, chould you please help.

image

image

Originally posted by @satyamjha22 in https://github.com/wojtekmaj/react-pdf/issues/52#issuecomment-664272539

closed time in 7 days

wojtekmaj

issue commentwojtekmaj/react-pdf

Objects are not valid as a React child

Your file prop isn't correct.

-          file="{`data:application/pdf;base64,${base64String}`}"
+          file={`data:application/pdf;base64,${base64String}`}
wojtekmaj

comment created time in 7 days

issue closedwojtekmaj/react-pdf

globalEventBus issue on the 5.0.0 beta.4

I installed react-pdf@5.0.0-beta.4 for the pdf viewer because of pdfjs worker version 2.4.456 When to try to open pdf using <Document file={} />, the pdf isn't loaded and it returns the issue that is related to globalEventBus.

The pdf is: https://cvaipatientfiles.s3.us-east-2.amazonaws.com/fax/FXa191895b30b5615087a8995448f5d99d.pdf?X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAS3O6LLAPBFTF7PW2%2F20200804%2Fus-east-2%2Fs3%2Faws4_request&X-Amz-Date=20200804T174950Z&X-Amz-SignedHeaders=host&X-Amz-Expires=86400&X-Amz-Signature=e7d356cafee58b923184024b20327eaa4e12d1bf250a595b4d2fc40d374de8bd

Please give me your help

closed time in 7 days

Eric-Lin-Dev

issue closedwojtekmaj/react-pdf

Does PDFViewer still export?

Before you start - checklist

  • [x] I have read documentation in README
  • [x] I have checked sample and test suites to see real life basic implementation
  • [x] I have checked if this question is not already asked

What are you trying to achieve? Please describe.

I'd like to view a pdf in a viewer which can zoom in and out.

Describe solutions you've tried

I was trying to use this Component PDFViewer (https://react-pdf.org/components#pdfviewer), I feel like it may use the viewer.html from pdfjs-dist.(https://github.com/mozilla/pdf.js#online-demo)

But get an error:

Error: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined. You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.

My code:

import { Document, Page, PDFViewer, pdfjs } from 'react-pdf';
...
<PDFViewer>
 <Document
  file={file}
  onLoadSuccess={this.onDocumentLoadSuccess}
  options={options}
 >
  <Page pageNumber={pageNumber} />
 </Document>
</PDFViewer>

Additional information Screen Shot 2020-07-15 at 5 39 43 PM

My github url: https://github.com/yummyelin/poc/tree/pdf-poc-2

Environment

  • Browser (if applicable) [e.g. Chrome 57, Firefox 59]: Chrome 83.0.4103.116
  • React-PDF version [e.g. 3.0.4]: 4.1.0
  • React version [e.g. 16.3.0]: 16.13.1
  • Webpack version (if applicable) [e.g. 4.16.2]: 4.42.0

closed time in 7 days

yummyelin

issue commentwojtekmaj/react-pdf

Does PDFViewer still export?

Wrong repository.

yummyelin

comment created time in 7 days

issue closedwojtekmaj/react-pdf

Invalid element of type input passed to PDF renderer

I want to create pdfForm like this. samplePdfForm.pdf

this is my code: https://prnt.sc/ttr1z5

<Document><Page size="A4" style={styles.page} renderAnnotationLayer={true} renderInteractiveForms={true} debug={true} > <View style={styles.tableR}> <View style={styles.tableRow}> <View styles={styles.tableCol}> <input type="text" /> </View> </View> </View> </Page> </Document> image

How to add form element in pdf?

closed time in 7 days

mihir-kanzariya

issue commentwojtekmaj/react-pdf

Invalid element of type input passed to PDF renderer

Wrong repository.

mihir-kanzariya

comment created time in 7 days

issue commentwojtekmaj/react-pdf

globalEventBus issue on the 5.0.0 beta.4

Check 5.0.0-beta.5 which has an important fix related to EventBus (#590, #593).

Eric-Lin-Dev

comment created time in 7 days

delete tag wojtekmaj/react-pdf

delete tag : v4.2.0-beta

delete time in 7 days

release wojtekmaj/react-pdf

v5.0.0-beta.5

released time in 7 days

created tagwojtekmaj/react-pdf

tagv5.0.0-beta.5

Display PDFs in your React app as easily as if they were images.

created time in 7 days

created tagwojtekmaj/react-pdf

tagv4.2.0-beta

Display PDFs in your React app as easily as if they were images.

created time in 7 days

push eventwojtekmaj/react-pdf

Wojciech Maj

commit sha e9ff82b0083232a4b08b0e102e7f85cf3a91e7e7

v5.0.0-beta.5

view details

push time in 7 days

push eventwojtekmaj/nightmare-advanced-click

Wojciech Maj

commit sha 21c2a80fede932594e3fdf66269d89e4299757b8

Update badges

view details

push time in 8 days

push eventwojtekmaj/nightmare-wait-for-url

Wojciech Maj

commit sha e89dc0f436d3cca135e8b5354b6048a21078323c

Update badges

view details

push time in 8 days

push eventwojtekmaj/react-daterange-picker

Wojciech Maj

commit sha 93ebf28b4ca38b7930dee6be1069e5fb01953192

Add link to Travis CI

view details

push time in 8 days

push eventwojtekmaj/react-calendar

Wojciech Maj

commit sha b0ccd95661f64caa521c3eb43f9e981f49ef8229

Add link to Travis CI

view details

push time in 8 days

more