-
-
Notifications
You must be signed in to change notification settings - Fork 937
Overlapping texts in RN webview #1864
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
Comments
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
@RondipB @wojtekmaj Code SnippetBrowser (Web) <Document file="sample.pdf" onLoadSuccess={onDocumentLoadSuccess}>
{Array.from(new Array(numPages), (_el, index) => (
<Page
key={`page_${index + 1}`}
pageNumber={index + 1}
width={window.innerWidth}
scale={1}
renderTextLayer={false}
/>
))}
</Document> Env"react": "18.1.0", Application (App) <WebView
key={webkey}
source={{ uri: "http://34.22.66.247:3000/" }}
javaScriptEnabled
onLoadEnd={() => {
if (!ready) {
setWebkey(Date.now());
setReady(true);
}
}}
scalesPageToFit={true}
/> Env"react-native-webview": "^13.12.2" Here's sample URI: http://34.22.66.247:3000/ |
Sure, will check and update here. Thanks |
Nope this is still not resolved. Tried with |
This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this issue will be closed in 14 days. |
Uh oh!
There was an error while loading. Please reload this page.
Before you start - checklist
Description
The pdf is not rendering properly in React Native Webview. The text seems to be overlapping. It renders properly in web.
Steps to reproduce
Get a pdf file link and render in React
Code snippet
`<Document
file={file}
onLoadSuccess={onDocumentLoadSuccess}
options={options}
loading={}
error={}
`
Render the component into a route.
Run in localhost, and render the same in RN Webview using your ip
<WebView source={{ uri: ${your_ip}/${path_to_pdf} }} />
Expected behavior
To render properly without text overlapping
Actual behavior
Text are overalpping
Additional information
No response
Environment
The text was updated successfully, but these errors were encountered: