i'm using pdf file hosted on firebase
and i want to perform text search on my pdf file
it is working when it is finding some result, but breaking when it doesn't find target text
Hi Boby,
We have searched the
both matched and unmatched text using the following code snippet, and the texts
are searched without any issues. We have shared the sample in which we have
tried to reproduce the issue in the below link, along with a video recording for
your reference.
Sample: https://stackblitz.com/edit/react-pbh64p?file=index.js
Video: https://www.syncfusion.com/downloads/support/directtrac/general/ze/SearchVideo-194766292.zip
Please test the provided sample on your end. If you encounter any issues, could you please confirm if you've made any customizations? If so, please share those details. Additionally, kindly provide a modified sample and relevant code snippets related to the reported issue. These details will assist us in further analysis and providing appropriate assistance.
Hey karthik
thanks for your reply
your code is working fine, but it is breaking with same error (which i've posted above) when i'm using my pdf in
stackblitz
video url - https://www.loom.com/share/39dee1bf75e644ed86eedcd4c5f32e4a
Hi Boby,
We were able to
reproduce the current reported script error, Cannot
read properties of undefined (reading 'replace'). We will analyze
further on this and update you with more details in two business days on May 15, 2024.
Note: The current reported script error differs from the initial one. If the initial error occurred in a different scenario, please provide steps to reproduce the issue
Hi Boby,
We have logged this
as defect as "Script error occurred when
searching the non-matched word in the provided document" and the
fix for the issue will be available in our upcoming weekly NuGet release
on June 05, 2024. You can track the
status of the issue through the following link.
Feedback link: Script error occurred when searching the non-matched word in the provided document | Issue Feedback
Disclaimer: "Inclusion of this solution in the weekly release may change due to other factors including but not limited to QA checks and works reprioritization."
Hi Boby,
We have fixed the
reported issue "Script error occurred when
searching the non-matched word in the provided document" and the
fix for the reported issue was included in our latest weekly
release v25.2.7. Kindly upgrade to that version to get the issue resolved.
Root cause: The provided document contains a landscape-sized page at the end. When searching for non-matching text, the page text becomes undefined for the landscape-sized page, causing a script error when attempting to access the undefined page text variable.
Solution: We have added a condition before accessing the page text and also fixed the issue of getting an undefined value for the landscape page size when the page contains text. This can be resolved by retrieving the data from storage with proper title values.
Packages:
CDN Links:
https://cdn.syncfusion.com/ej2/25.2.7/dist/ej2.min.js
https://cdn.syncfusion.com/ej2/25.2.7/material.css
https://cdn.syncfusion.com/ej2/25.2.7/dist/ej2-pdfviewer-lib/pdfium.js
https://cdn.syncfusion.com/ej2/25.2.7/dist/ej2-pdfviewer-lib/pdfium.wasm