Exception on PDF with Dropdowns and/or grouped Checkbox

Hi,

I am trying to incorporate a PDF provided by government, in my UWP application to fill in that PDF and print/save.  I can open the document, process it via Syncfusion's PDF,  access its fields etc.  However, I find two issues when I ad the file as in the code at the end of this post.

1) if there are grouped checkboxes on the file, the first checkbox is not selectable (can't check it) and the other checkboxes do not work as grouped ones - ie I can check more than one checkboxes from that group (except the first one which is not selectable).  The file works fine in Adobe Acrobat Reader (ie any of the 3 checkboxes, and only one of those can be checked). 
2) Dropdown does not work as dropdown - the first option is selected by itself and can't be changed.

In debug mode I see some exceptions on GotFocus and LostFocus of the fields (as attached).  I also attach the PDF file for your ready reference. The grouped checkbox is field[10].  Another example is field[8].  There is no dropdown on this file though.

I am using Syncfusion 18.3.0.35 with community license and with VS 2019 Ver 16.7.2 on Windows 10 - 1909 - build 18363.1082. It's a UWP project.

Hope to hear of the solution soon.

Thanks


Code:
        private async void openPdfAsync()
        {
            var picker = new FileOpenPicker();
            Stream fileStream;

            picker.FileTypeFilter.Add(".pdf");

            //StorageFile file = await picker.PickSingleFileAsync();  // this does not help
            var file = await picker.PickSingleFileAsync();

            var stream = await file.OpenAsync(Windows.Storage.FileAccessMode.Read);
            fileStream = stream.AsStreamForRead();
            await pdfViewer.LoadDocumentAsync(fileStream);
            // pdfViewer.LoadDocument(fileStream); // this does not help either
        }

Attachment: SfPdfError_88c179fa.zip

20 Replies 1 reply marked as answer

AV Ashokkumar Viswanathan Syncfusion Team October 13, 2020 02:29 PM UTC

Hi Harshad, 
 
Greetings from Syncfusion support, 
 
Please find our comments below, 
1) if there are grouped checkboxes on the file, the first checkbox is not selectable (can't check it) and the other checkboxes do not work as grouped ones - ie I can check more than one checkboxes from that group (except the first one which is not selectable).  The file works fine in Adobe Acrobat Reader (ie any of the 3 checkboxes, and only one of those can be checked).  
We were able to reproduce the issue, “Checkbox is not working properly for a particular PDF document”. Currently, we are validating the issue and we will update further details on October 15th 2020. 
 
2) Dropdown does not work as dropdown - the first option is selected by itself and can't be changed. 
 
 
In debug mode I see some exceptions on GotFocus and LostFocus of the fields (as attached).  I also attach the PDF file for your ready reference. The grouped checkbox is field[10].  Another example is field[8].  There is no dropdown on this file though. 
We were unable to reproduce the issue, “Dropdown is not selectable” and “Application throws exception on GotFoucs and LostFocus while checking the checkbox” in our end. 
 
Kindly refer the sample and PDF document in the below link which we created to reproduce the reported issue. 
 
 
Kindly share the following details to analyze more on this issue and assist you with the better solution.      
  1. Simple sample/ modify the above sample(if any changes)
  2. PDF document for DropDown issue.
  3. Complete device specification.
  4. Replication procedure/ video illustrating the issue in detail.
 
 
 
Regards, 
Ashok Kumar Viswanathan. 



HS HSPR October 13, 2020 08:54 PM UTC

Hi Ashok,

Thank you for your prompt response.  I ran the files through your solution and found the same issue with dropdown.  So hopefully it would be straight forward to reproduce.

I am attaching two PDFs - one has the dropdown issue, the other cannot even be opened.  The dropdown is "Preferred Location" field on the DropdownIssue.pdf file. You can just open the files with the previous code to reproduce the issue - given below again with two debug lines.  This method is called directly from a button.

Device for all these tests is a Windows 10 desktop i5 with 6GB RAM.

Code:
        private async void openPdfAsync()
        {
            var picker = new FileOpenPicker();
            Stream fileStream;

            picker.FileTypeFilter.Add(".pdf");

            //Browse and chose the file

            //StorageFile file = await picker.PickSingleFileAsync();
            var file = await picker.PickSingleFileAsync();

            var stream = await file.OpenAsync(Windows.Storage.FileAccessMode.Read);
            fileStream = stream.AsStreamForRead();

            String s = "This line is reached while debugging";  
            try
            {
                await LabForm.LoadDocumentAsync(fileStream);
                s = "Crashes before this line";

            }
            catch (Exception ex)
            {
                s = "Does not even catch this exception Crashes before this line"; // for the file that crashes
                int i = 0;
                throw;
            }
            s = "This line is reached while debugging and then crashes";
        }

Thanks 
Best regards
Harshad


Attachment: SfPdfViewerIssue_d661a738.zip


AV Ashokkumar Viswanathan Syncfusion Team October 14, 2020 09:17 AM UTC

Hi Harshad, 
 
Thank you for your update, 
 
Please find our comments below, 
 I am attaching two PDFs - one has the dropdown issue, the other cannot even be opened.  The dropdown is "Preferred Location" field on the DropdownIssue.pdf file. You can just open the files with the previous code to reproduce the issue - given below again with two debug lines.  This method is called directly from a button. 
We were able to reproduce the issue, “Form field are not loaded in a particular PDF document” and “Application crashes while loading a particular PDF document”. Currently, we are validating the issue and we will update further details on October 16th  2020.  
 
As mentioned earlier, we will provide validation details for the issue, “Checkbox is not working properly for a particular PDF document” on October 15th 2020. 
 
Regards, 
Ashok Kumar Viswanathan. 



HS HSPR October 14, 2020 11:14 AM UTC

Thank you once again for your prompt response!


AV Ashokkumar Viswanathan Syncfusion Team October 15, 2020 04:41 PM UTC

Hi Harshad, 
  
We have confirmed that the issue “Checkbox is not working properly for a particular PDF document” is a defect and logged a defect report for this issue. The patch for this issue will be delivered on November 5th , 2020. 
 
Please find the feedback link below, 
 
As mentioned in our last update, we are validating the issue, “Form field are not loaded in a particular PDF document” and ”Application crashes while loading a particular PDF document” and we will update details on October 16th 2020. 
  
Regards 
Ashok Kumar Viswanathan. 



HS HSPR October 15, 2020 05:39 PM UTC

Hi Ashok,

Thank you and your team for prompt response and committed efforts.  I look forward to the patch.

Harshad


AV Ashokkumar Viswanathan Syncfusion Team October 16, 2020 05:37 PM UTC

Hi Harshad, 
 
Please find our comments below, 
Title 
Status 
Form field are not loaded in a particular PDF document 
We have confirmed that the issue “Form field are not loaded in a particular PDF document” is a defect and logged a defect report for this issue. The patch for this issue will be delivered on November 6th , 2020. 
 
Please find the feedback link below, 
 
Application crashes while loading a particular PDF document 
We have analyzed the issue, “Application crashes while loading a particular PDF document” and we found that this is not a defect with our PdfViewer control. We have been using the PdfDocument API to access the PDF pages and we will convert the pdf pages into Image, to view the page content in our control. However, while creating the PdfDocument instance, we are facing exception and we could see the same behavior in Microsoft Edge as they have used same API to display the PDF pages. 
 
Please refer the below simple sample created without using SfPdfViewer control, 
 
In order to log a bug report in the Microsoft Documentation site, we need your permission to use the PDF document in the bug report portal. 
 
Checkbox is not working properly for a particular PDF document 
Patch will be delivered on November 5th 2020. 
 
Regards, 
Ashok Kumar Viswanathan. 



HS HSPR October 16, 2020 06:56 PM UTC

Hi Ashok,

That file is publicly available on the publisher's website.  So I don't see any issue in using it for the purpose.

Thanks for your help.

Regards
Harshad



AV Ashokkumar Viswanathan Syncfusion Team October 19, 2020 06:40 AM UTC

Hi Harshad, 
 
Thank you for your update. We have logged a bug report for the issue, “Application crashes while loading a particular PDF document” in Microsoft Documentation site and we will let you know once we have get a solution. Please find the link below. 
 
 
Please find our comments below, 
Title 
Patch Timeline 
Form field are not loaded in a particular PDF document 
Patch will be delivered on November 6th 2020. 
Checkbox is not working properly for a particular PDF document 
Patch will be delivered on November 5th 2020. 
 
Regards, 
Ashok Kumar Viswanathan. 



NK Navaneetha Kannan Sudalai Muthu Syncfusion Team November 5, 2020 05:57 PM UTC

Hi Harshad,  

Sorry for the inconvenience caused. We are still working on the issue “Checkbox is not working properly for a particular PDF document”. At present, we are working on this with high priority and we will provide the patch for the fix on November 12, 2020.  

Best, 
Navaneetha Kannan 



HS HSPR November 5, 2020 09:24 PM UTC

Thank you.


AV Ashokkumar Viswanathan Syncfusion Team November 6, 2020 06:03 PM UTC

Hi Harshad 
 
We have resolved the issue, ”Form field are not loaded in a particular PDF document” and the custom NuGet for the same can be downloaded from the following link         
      
Custom NuGet :  
  
Disclaimer:   
Please note that we have created this NuGet for version 18.3.0.47 specifically to resolve the following issue(s) reported in this/the forum. 158618.     
 
    
Note : Kindly follow the steps to clear the NuGet cache and then install patched NuGet to get the issue resolved.    
     
        
This fix will be included in our 2020 Volume 4 Main release which is expected to available in the month of December, 2020.     
 
As mentioned earlier, we will provide patch for the issue, “Checkbox is not working properly for a particular PDF document” on November 12th 2020 without further delay. 
  
Regards,  
Ashok Kumar Viswanathan.  



HS HSPR November 6, 2020 08:06 PM UTC

Thank you and your team for the hard work you all are putting in.
Regards
Harshad



HS HSPR November 6, 2020 09:33 PM UTC

Hi Ashok,

One silly question on nuget.

Originally, I did not install Syncfusion from Nuget - I downloaded Essential Studio and installed it that is integrated with Visual Studio.  That it, VS has Reference to C:\Program Files (x86)\Syncfusion\Essential Studio\Universal Windows\18.3.0.35\Universal Windows\10.0\SDK.  In this implementation, how do I install this fix?  I unzipped CustomNuget158618-911448275.nupkg and I see many files and folders.  Is there a specific files I can replace from this fix package in my install directory? (Tried sfpdfviewer.dll and .xaml but obviously that is not enough.)

Sorry about this question - (I should know).

Thanks
Harshad



AV Ashokkumar Viswanathan Syncfusion Team November 9, 2020 07:31 AM UTC

Hi Harshad, 
 
We have created a demo video to illustrate how to install the provided custom NuGet in your sample. 
 
 
Please check the video and try to install the provided NuGet in the version 18.3.0.47 as like in the video to get the issue resolved in your end. 
 
As mentioned earlier, we will provide patch for the issue, “Checkbox is not working properly for a particular PDF document” on November 12th 2020 without further delay.  
 
Regards, 
Ashok Kumar Viswanathan. 



AV Ashokkumar Viswanathan Syncfusion Team November 12, 2020 06:26 PM UTC

Hi Harshad 
 
We have resolved the issue, ”Checkbox is not working properly for a particular PDF document” and the custom NuGet for the same can be downloaded from the following link         
      
Custom NuGet :  
  
Disclaimer:   
Please note that we have created this NuGet for version 18.3.0.47 specifically to resolve the following issue(s) reported in this/the forum 158618.     
 
    
Note : Kindly follow the steps to clear the NuGet cache and then install patched NuGet to get the issue resolved.    
     
        
This fix will be included in our 2020 Volume 4 Main release which is expected to available in the month of December, 2020.     
  
Regards,  
Ashok Kumar Viswanathan.  


Marked as answer

HS HSPR November 12, 2020 07:03 PM UTC

Hi Ashok,

Thank you for your continued focused support.  

Harshad


AG Aribalakrishnan Govindasamy Syncfusion Team November 13, 2020 04:52 PM UTC

Hi Harshad,   
Welcome, 
Should you require any further assistance please let us know?. 

Regards, 
Aribalakrishnan G. 



HA Harshad November 19, 2020 02:56 AM UTC

Hi Ashok and Team,

Finally I got to update and test both fixes.  Those are working as expected. 

Thank you once again.
Harshad


AV Ashokkumar Viswanathan Syncfusion Team November 19, 2020 06:06 AM UTC

Hi Harshad, 
 
Thank you for your confirmation. Please let us know if you need any further assistance on this. 
 
Regards, 
Ashok Kumar Viswanathan. 


Loader.
Up arrow icon