PDF viewer control

Posted by: mayur.purandare on 16 March 2020, 4:25 pm EST

  • Posted 16 March 2020, 4:25 pm EST

    I have one query related to the toolbar view of PDF Viewer control.

    My application supports Englihs and Japanese language.
    In ZoomInOut Combobox, FitWidth and One Page string comes in japanese automatically but japanese string is not matching with the string which I wan to show.
    How to restrict the default japanese string with the required string.
  • Replied 16 March 2020, 11:03 pm EST

    Hi Mayur,

    Localizing the application according to Japanese culture, the control shows correct localized string at my end. See attached image.
    As I understand do you want to replace some localized strings with your explicit string values in C1PdfViewer? If that is the case, C1PdfViewer does not have a direct way that allows replacing the localized strings, but you can always access the UI element (VisualTreeHelper) and replace its content.

  • Replied 18 March 2020, 6:29 pm EST

    Regarding the second approach of replacing localized strings with your explicit string, Could you please share some examples of accessing ComboBox using VisualTreeHelper. I have tried this approach but did not get the proper results.
    Could you please share code snippets.
  • Replied 19 March 2020, 2:56 pm EST

    Hi Mayur,

    You are correct, accessing the C1Combobox through VisualTreeHelper and replacing the string in its items seems to be causing some inconsistency and as a result, the rendering of the element is improper.
    So, I am discussing it with our devs [ID: 425663]and will let you the solution/information soon.

  • Replied 29 March 2020, 1:41 am EST

    Dear Team,

    Is there any update on above issue.
    We are waiting for reply.
  • Replied 29 March 2020, 7:14 pm EST


    The team has found the problem, so they will fix it. The fix will be released in one of the future builds (expected: 2020v2 release).
    I will update you when the build fixing it is public.

  • Replied 27 April 2020, 10:52 pm EST

    Dear Team,

    Is there any update on above issue.
    We are waiting for reply.
  • Replied 28 April 2020, 4:51 pm EST

    Hi Mayur,

    As mentioned above, the issue will be fixed in 2020v2 release, estimated around end of July.

  • Replied 3 May 2020, 2:29 pm EST

    Hi Mayur,

    I am happy to inform you that the issue has been fixed in the latest 2020v1 hotfix#2 builds.

    Please download the hot-fix either from http://prerelease.componentone.com/hotfixes/wpf/C1WPFBasicLibrary.4_4.0.20201.706.zip, http://prerelease.componentone.com/hotfixes/wpf/C1WPFBasicLibrary.4.5.2_4.5.20201.706.zip or you may use ComponentOneControlPanel utility with following steps:
    Download URL: https://www.grapecity.com/componentone/download
    1. Run the downloaded utility with Administrator rights.
    2. Login
    3. In the toolbar, select 'Update' and check the checkbox 'Include PreRelease and hotfix versions'
    4. Expand the WPF Editon and click the Update button along 'Control Library for WPF (.NET 4.0)' and/or 'Control Library for WPF (.NET 4.5.2)'

    With best wishes,
  • Replied 12 May 2020, 11:17 pm EST

    Dear Team

    I have downloaded latest files.
    It shown me following Error:
    'Could not load file or assembly 'C1.WPF.4' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515)'
    How to resolve it.
  • Replied 13 May 2020, 7:00 am EST

    Hi Mayur,

    This error occurs because there still exists a reference to an older version of a C1 control in the project.
    Below given two solutions, you can try them to solve this issue :

    Solution 1 : Unblock the control’s dll and then try using it in your application. To unblock the dll, right click on the dll and select 'Properties'. In the 'General' tab of the Properties, select the 'Unblock' option. Refer to the attached image.

    Solution 2 :
    1 : Delete the old references from the References tab in Solution Explorer.
    2 : Delete the licenses.licx file and clean the solution.
    3 : Close Solution and Close VS because at times VS has some weird behavior to keep the cache to hold dll references.
    4 : Delete bin and obj folders from application folder.
    5 : Open VS and check application's framework- it should not be Client Profile version.
    6 : Add a new Window.
    7 : And then drag drop all the controls ( of the latest version) being used in your application. This will create licenses.licx file along with adding references in the solution explorer References tab.
    8 : Rebuild the project. And it should work.

    Note : Also, check the specific control’s dll version in GAC. It should be the same version which you want to use in your application.

    You might want to take a look at the following blog post: https://www.grapecity.com/blogs/a-step-ahead-troubleshooting-common-errors-part-i

  • Replied 14 May 2020, 11:52 pm EST

    Thank you.
    DLL files are successfully running on my PC.

    How to bind Japanese string to Toggle button.
    Normally we used 'content' property to bind a string.
    It gives me error as content is set multiple times.
  • Marked as Answer

    Replied 17 May 2020, 9:52 pm EST

    Hi Mayur,

    I am not sure which toggle button you are mentioning. If however, you're asking the original question how to show Japanese string in zoom combobox then, you should create a new resources file with name like C1.Silverlight.PdfViewer.ja.resx and add to your project.
    I also added resource file to attachment that the customers can use to update key/value.

  • Replied 8 June 2020, 3:32 pm EST

    Dear Ruchir,

    The sample is working OK .
    How are we going to implement in our source code ?
    Can we have teams meeting?
    This is a bit urgent.
    Please reply as soon as possible.

  • Replied 9 June 2020, 2:34 pm EST

    Dear Ruchir,

    Please reply as soon as possible.
    It is bit urgent for us as release is to be planned based on this issue resolution.
    The deadline is already over and hence request to respond as soon as possible.
    We can plan Microsoft teams meeting.

  • Replied 9 June 2020, 9:10 pm EST

    Hi Utkarsha,

    Apologies for the delay. Since Ruchir san is on leave so I'll look into this case.

    > We can plan Microsoft teams meeting.

    Phone support or Support over remote meeting is only available for platinum customer. So, I apologise for the inconvenience.

    > How are we going to implement in our source code ?

    Since the steps are easy and can be conveyed here, so let me clarify the steps once for you:

    1) Create and add a resource file in your project (Right click project in SolutionExplorer > Add > New Item > Select 'Resource File' under 'General' section from dialog box > Add).
    2) Rename the resource file as C1.Silverlight.PdfViewer.[CultureName].resx (for e.g. C1.Silverlight.PdfViewer.jp.resx for Japanese resource).
    3) Specify the expected Values for required Names/Keys in the resource file. You may refer to C1.Silverligh.PdfViewer.ja.resx file, provided by Ruchir earlier, for the various key-values.
    4) Run the application and you should see the overrided values in your application.

    Here are the snapshots for your reference:

    and this will look like:

    If there is any specific issue in this approach that you are concerned about, please elaborate a bit on the same.

    Best Regards,
  • Replied 9 June 2020, 9:12 pm EST

    Hi Utkarsha,

    Just to confirm, have you followed the exact steps as I just mentioned? Please make sure that step-2 (Renaming the file to 'C1.Silverlight.PdfViewer.ja.resx') is important.

  • Replied 10 June 2020, 11:16 pm EST

    Dear Basant,

    Thanks for your answer.
    I am not able to paste screenshots in this forum.
    We are using 4.0.20201.706 and not 4.5.20201.706.

    1)I followed the steps as mentioned by you with the C1.WPF and C1.PDFViewer 4.0.20201.706 and not 4.5.20201.706.
    I didn't rename the file instead during adding the resource file, I named it as C1.Silverlight.PdfViewer.ja.resx.
    2)The strings are appearing in Japanese but the overrided strings defined in C1.Silverlight.PdfViewer.ja.resx are still not appearing in the PDF Viewer.

    Query :
    1) Is the override string change implemented in 4.0.20201.706 or 4.5.20201.706 or both ?
    2) I checked your sample application and it works perfectly with 4.5.20201.706 but does not work with 4.0.20201.706.
    3) If I update my Project --> References to 4.5.20201.706 then it shows the error
    'Could not load file or assembly 'C1.WPF.4.5.2' or one of its dependencies. Operation is not supported.

    I also tried your solution given above for "Could not load file or assembly" error but the error is still appearing.

    We are also facing license issue with 4.0.20201.706. The C1 license pop-up appears.
    However I have deleted the license file but on re-build it does not appear in my Visual Studio solution.

    Please let me know if I am missing any steps ASAP.

  • Replied 11 June 2020, 1:43 am EST

    Hi Utkarsha,

    1) Thanks for sharing the version details. Yes, the support for overriding localized strings is added to 4.5 builds only as I could confirm the same at my end. So, I would request you to use the 4.5 version builds.

    2) To resolve the 'Could not load' error, although the steps provided earlier should have resolved the issue. However, let me simplify the steps for you once considering you have downloaded the 4.5 builds from 'http://prerelease.componentone.com/hotfixes/wpf/C1WPFBasicLibrary.4.5.2_4.5.20201.706.zip'.

    a) Download the zip from the provided link.
    b) Unblock the downloaded zip (RightClick -> Properties -> Click 'Unblock' button)
    c) Extract the zip file.
    d) Remove all the existing C1 dlls from the References list in your project.
    e) Remove the licenses.licx file too.
    f) Add all the required C1 dlls from the extracted zip file in the project References.

    Build and Execute the attached sample, the sample should be running without error (Nag screen would be shown as we don't have licenses.licx file in our project yet)

    3) To remove the Nag screen, you should add a licenses.licx file in your project. You may use the GC utility from VS to add the entries as follows:

    Make sure the licenses.licx file generated file should have entries for 4.5 build as in the attached file.

    In case, the issues are still there, could you please attach your stripped down sample (removing all the logic if that's a concern) and screenshot of the errors and references as zip file? This would help us to investigate the issue further.

    Hope it will help.


    Expected License Entries.zip
  • Replied 11 June 2020, 9:56 pm EST

    Dear Basant,

    Thank you for your answer.
    The solution given above resolved my issue and I can view the override strings in the PDF Viewer.
    I updated the C1 Dll to 4.5.20201.706 and error does not appear.
    However I still see the Nag screen.
    I used Grapecity License Manager, logged in with my credentials. and followed the procedure but still Nag screen is seen.
    I am attaching word file in zip explaining about license manager.

  • Replied 11 June 2020, 9:57 pm EST

  • Replied 12 June 2020, 1:19 am EST

    Hi Utkarsha,

    Good to know that the error got resolved and thank you for providing the snapshots!

    Regarding Nag screen, could you please try including the Licenses.licx file from the attached zip in your project and check if this removes the Nag screen?

    Also, Could you please let me know the current installed C1 version on your machine? If you haven't installed C1 for 4.5 version yet I would request you to install/update to the same using C1ControlPanel (URL: https://www.grapecity.com/componentone/download) and try again with the Project Updater utility.

    Please share any of your observations on above steps if the Nag Screen still remains.


Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels