-
Notifications
You must be signed in to change notification settings - Fork 189
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
error in validating Telephone number entry in pdf text field #1146
Comments
Sounds nasty! I'll have a look at it. Please give me a couple of day - currently I'm very busy, so I can't promise a fast response. At first glance, you've provided the test PDF, so I'm positive I can reproduce the issue. Awesome! Best regards, |
hello @stephanrauh , do you have any update for this bug? |
Oops, sorry. At the moment, new bugs and support question come in faster than I can solve them. It's high time I find volunteers helping me! |
@timvandermeij Joel reports that it's impossible to enter a phone number in pdf.js if it's defined as a phone number field. @joelvargheseg I've managed to reproduce your bug, and I've also managed to reproduce it on https://mozilla.github.io/pdf.js/web/viewer.html. So I suppose it's a pdf.js bug. I've found a constant defining regular expressions for phone number. It looks promising: RE_PHONE_ENTRY: [
// 555-1234 or 408 555-1234
"\\d{0,3}(\\.|[- ])?\\d{0,3}(\\.|[- ])?\\d{0,4}",
// (408
"\\(\\d{0,3}",
// (408) 555-1234
// (allow the addition of parens as an afterthought)
"\\(\\d{0,3}\\)(\\.|[- ])?\\d{0,3}(\\.|[- ])?\\d{0,4}",
// (408 555-1234
"\\(\\d{0,3}(\\.|[- ])?\\d{0,3}(\\.|[- ])?\\d{0,4}",
// 408) 555-1234
"\\d{0,3}\\)(\\.|[- ])?\\d{0,3}(\\.|[- ])?\\d{0,4}",
// international
"011(\\.|[- \\d])*",
] A few lines after that, there's a stricter rule validating the phone number when you're leaving the field. So I guess the validation entered the "commit" mode too early. |
Hm, it looks very closely related to mozilla/pdf.js#14306 which was fixed by mozilla/pdf.js#14429 and mozilla/pdf.js#14430 not too long ago, but if it still happens on the master version apparently there's another issue here. I'd recommend opening an issue for this in the PDF.js repository. |
So there is no fix in ngx-extended-pdf-viewer? this is kinda serious bug that I'm facing right now. will you follow up in PDF.js repo? thanks |
At the moment, there's no fix in ngx-extended-pdf-viewer, unless Tim is right and they've already fixed this bug. But I don't think so, because my "bleeding edge" branch is sort of a nightly build, and I've merged the source this Friday. However, I intend to do some debugging. Maybe it's easy to solve. If it is, I can fix the bug in my branch of pdf.js and kindly ask the Mozilla team to fix it, too. However, I almost always had bad luck when I reported bugs to the pdf.js team in the past, so I can't promise much (apart from trying to fix the bug myself). |
@joelvargheseg In the meantime, I've updated to pdf.js 2.13 as default branch and 2.14 as "bleeding edge" branch. Can you check if the current version of ngx-extended-pdf-viewer solves the issue? |
hello. I checked the new version but now its strictly following the format "(111) 111-1111" which is not an ideal situation. |
@calixteman You're the expert here. Joel has a Acroform with a telephone number. The format of the field is Thanks in advance, |
What are doing Acrobat, Chrome, ... with such a phone number ? |
@joelvargheseg Did you check that? |
PdfValidationTest.pdf |
Ok this is a bug in the implementation. Would you mind to file a bug upstream please ? |
@joelvargheseg Did you open a bug at https://github.com/mozilla/pdf.js/issues? |
I'm closing the ticket now because it has to be solved in pdf.js. |
On Sun, Apr 10, 2022 at 6:00 AM Stephan Rauh ***@***.***> wrote:
@joelvargheseg <https://github.com/joelvargheseg> Did you open a bug at
https://github.com/mozilla/pdf.js/issues?
—
Reply to this email directly, view it on GitHub
<#1146 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AFUPXSXGZ5JF2AUHOV5BJEDVEK7FPANCNFSM5M3RR7CA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
No I didn’t
|
while editing a phone number text field in my pdf, I couldn't enter the number because the popup will always appear when I type in the number as provided in the screenshot. if I try to enter in the format (123) 456-7890, I cannot enter both closing brackets")" or "-".
so the user cannot even enter a 10 digit number in any way. I tried it in pdf.js and I can enter the number if I provide the number exactly in the format provided by them. I'm using version 10.1.0 of your viewer in bleeding edge, also I tried to do the latest version in pdfviewer.net. Nothing works
.
you can try to fill-up the form attached to see yourself. thanks
PdfValidationTest.pdf
The text was updated successfully, but these errors were encountered: