Flexviewer C1PdfDocumentSource PDf file

Posted by: saidnai on 10 March 2021, 11:57 pm EST

  • Posted 10 March 2021, 11:57 pm EST

    Hello,

    I have a small Topic as follow:

    I use the Flexviewer with C1PdfDocumentSource to Show PDF files. This is working fine.

    Over a click button i need to save the same shown file in another Folder for other use.

    I used the following Code :

    C1Flexviewer1.DocumentSource = C1PdfDocumentSource2

    C1Flexviewer1.Export()

    but it doesn’t Show me when savinf the PDF extention.

    Is there a solution to do that?

    Best regards

    Said

  • Posted 11 March 2021, 7:36 pm EST

    Hello Said,

    You can use the below-given code to Export the document to PDF:

    Dim pdfExport = ExportProvider.PdfExportProvider.NewExporter()
    pdfExport.FileName = "demo.pdf"
    C1PdfDocumentSource1.Export(pdfExport)
    

    Regards,

    Prabhat Sharma.

  • Posted 11 March 2021, 10:32 pm EST

    Dear Prabhat,

    I had first an error shone in the Code under “ExportProvider”. For this i added the following declaration:

    Imports C1.Win.C1Document.Export

    Than it is gone but when i run the function i got another error that says that this method is not implemented.

    Any Idee?

    Did your sample asks where to save the PDF file?

    Best regards

    Said

  • Posted 14 March 2021, 9:03 pm EST

    Hi Said,

    We do not face any issues at our end.

    We have attached a demo sample implementing the same, please go through it and let us know if you are doing anything different.

    Regards,

    Prabhat Sharma.

    FlexViewerExport.zip

  • Posted 28 March 2021, 8:03 pm EST

    Dear Prabhat,

    Sorry for the late Reply. Just came back to office.

    At the beginning I have tried you sample as it is no Problem. I have change only the the PDF file Name and i go the attached error and the same in my application.

    Best regards

    Said

  • Posted 28 March 2021, 8:05 pm EST - Updated 3 October 2022, 2:17 pm EST

  • Posted 29 March 2021, 4:45 pm EST - Updated 3 October 2022, 2:17 pm EST

    Hi Said,

    This is really strange as we do not face this issue at our end. Please see the attached GIF for the same and let me know if you are doing anything different.

    Also, let us know the version of controls that you are using at your end.

    Regards,

    Prabhat Sharma.

  • Posted 29 March 2021, 10:08 pm EST - Updated 3 October 2022, 2:17 pm EST

    Dear Prabhat,

    I am doing the same, the PDF document is already loaded in the Flexviewer(FVZ):

    C1PdfDocumentSource2.LoadFromFile(GetString(ZExportName))

    FVZ.DocumentSource = C1PdfDocumentSource2

    Dim pdfExport = ExportProvider.PdfExportProvider.NewExporter()

    Dim savePdfDialog As New SaveFileDialog

    savePdfDialog.FileName = "C:\test" & ZExportFile '“demo”

    savePdfDialog.Filter = “Pdf Files| *.pdf”

    If savePdfDialog.ShowDialog() = DialogResult.OK Then

    pdfExport.FileName = savePdfDialog.FileName

    C1PdfDocumentSource2.Export(pdfExport)

    End If

    Attached the C1-version that i am using.

    Best regards

    Said

  • Posted 30 March 2021, 9:27 pm EST

    Hi Said,

    We have checked with the same build and also with the latest build but did not face the issue.

    Can you please upgrade to the latest version and try again?

    If you still face the issue then please share your environment details[ OS and VS version ] and a GIF showing the issue at your end, so that we can investigate it further.

    Regards,

    Prabhat Sharma.

  • Posted 31 March 2021, 2:43 am EST

    Dear Prabhat,

    I have started C1LiveUI again but it says latest installed. There is no new version available to upgrade.

    I use W10 and VS2017. Please see attached file.

    Best regards

    Said

  • Posted 31 March 2021, 4:04 pm EST

    Hello Said,

    The latest version of ComponentOnen WinForms is 20203.468 and the licensing has been changed from the 2020V2 release so you need to use ComponentOneControlPanel to install a new version or update your installed version.

    You can download the utility from the link: https://www.grapecity.com/componentone/download

    You can follow the below-given steps to do the clean installation of C1 in your machine:

    1: Uninstall the existing products (if any) using System’s ControlPanel/ ComponentOneControlPanel. Make sure that after the uninstallation, there is no folder named “ComponentOne” exists at the location: C:\Program Files (x86)

    2: Download the latest version of ComponentOneControlPanel utility from the given link:

    https://www.grapecity.com/componentone/download

    3: Select the edition, version, and framework of the controls that you want to install and hit the “Proceed” button.

    Note: If you want to install the product samples, you need to select the Product Samples checkbox before hitting the “Proceed” button.

    Regards,

    Prabhat Sharma.

  • Posted 31 March 2021, 6:03 pm EST - Updated 3 October 2022, 2:17 pm EST

    Dear Prabhat,

    I have a huge problem now. I have done what you said. now i cannot work with any application due to licence problem (2020V2) see attached but i have a licence.

    I thought all in when i log on for the instatllation.

    Although the update and licx problem the PDF Export still not working. I get the same error.

    Best regards

    Said

  • Posted 31 March 2021, 6:34 pm EST

    Hi,

    The evaluation message pop up appears in the following two cases:

    1. Your system does not have a valid license key for the controls.
    2. The entries of the licenses.licx file do not match with the controls used in the application.

    In your case, it seems that the licenses file either doesn’t exist, contains wrong information, or is not configured correctly.

    First, try a full rebuild (Rebuild All from the Visual Studio Build menu). This will usually rebuild the correct licensing resources.

    The entry for every C1 control used in the application at design time or run time should be present in the licenses.licx file of the project. If you have added controls at runtime, drag and drop the controls on the form to generate their corresponding entries in the licenses.licx file and then you may delete the controls. You can also use the LicxGenerator to generate a licenses.licx file for your application. You can learn more about the same using the below blog post:

    https://www.grapecity.com/blogs/licensing-and-licenses-licx-file-licxgenerator-tool

    If you still face the issue at your end then please share the screenshot of the licenses.licx file and activated key so that we can assist you in a better way.

    Regards,

    Prabhat Sharma.

  • Posted 31 March 2021, 9:15 pm EST - Updated 3 October 2022, 2:17 pm EST

    Dear Prabhat,

    Thanks for the quick support.

    I have done the 2 steps. Now i am facing the following: See attached.

    My licence is registered 2020V1 and still be valid. The Problem it is not running for 2020V2.

    By the way the Export is now running but the exported document is not like the original loaded under FV. Maybe because of the Licence.

    Till now the changes i have done only for a small test VB application.

    How can i solve the Licence Registration?

    Best regards

    Na

  • Posted 4 April 2021, 4:32 pm EST

    Hello Said,

    It is really strange as you said that your serial key is valid to use the 2020V2 controls.

    As asked in the previous post please share the screenshot of the licenses.licx file and activated key so that we can investigate this issue.

    Also, let us know that are you facing the same license issue when creating a new application using C1 controls?

    I would request you to repair the installed version and deactivate the serial key using C1LicenseDeActivation/GCLM utility and then activate it again using C1LicenseActivation/GCLM utility, The utilities are located at:

    C:\Program Files (x86)\ComponentOne\C1StartMenu



    If the issue still persists then please share the asked details so that we can assist you further.

    Regards,

    Prabhat Sharma.

  • Posted 5 April 2021, 11:36 pm EST

    Dear Prabhat,

    I have deinstalled all the C1 Component now. I also placed a new order for a new key by our supplier. As soon as i get it. I will do a fresh Installation and Fresh Registration. I will inform you then.

    I understand now that C1 has changed the way to update the component. Before when i open a report i get the info that updates are avalaible. I do it than i use the project updater to update all my applications over the “.sln”.

    Best regards

    Said

  • Posted 6 April 2021, 10:44 pm EST

    Hello Said,

    After the installation, if you face any issue in updating your old application then please let us know.

    Regards,

    Prabhat Sharma.

  • Posted 9 April 2021, 12:55 am EST - Updated 3 October 2022, 2:17 pm EST

    Dear Prabhat,

    1. I have deinstalled the old version.
    2. The component one folder under “C:\Program Files (x86)” was also completly

      delete.
    3. I get the new Licence and i register it.
    4. I installed the new compnent 4.5.2

      see attached picture of the folder. It is ambiguous. I do not understand what i

      am using and what the Installation has done and which component from which

      folder i am using.
    5. I copy one of my important project and open it. Unlikily only trouble. I am

      already upset waiting almost one week for licence from the supplier and cannot

      do anything for my company.
    6. Under VS2017 when i open the project i cannot seen the component one

      anymore and i cannot work now.
    7. Generally it should be easy for customer to Register the Licence online and also

      and update their projects but now it is not the case.
    8. If i create a new project the component one will be shown automatically but

      not for existing project. Why?

    I need urgently support. How to solve all this porblems?

    Before the project updater was ok.

    Best regards

    Said

  • Posted 11 April 2021, 6:52 pm EST

    Dear Prabhat,

    I have looked at the problem again and found the following:

    If the target project is not set to 4.5.2 under project properties, the component one 4.5.2 will not be taken in shown.

    This is means all the projects will run under dot.net framwork 4.5.2 and higher.

    As you can see in the windows explorer the installation of 2.0 and 4.0 are also done.

    So i have to open all my projects note which component are used, remove v4.0, change the dot.Net Framework to v4.5.2 save it than reopen and then i have to assign the used component for the project again.

    The good thing is the PDF Export is definitly working with v4.5.2 but not v4.0.

    The question is now,

    1) Is there a simple way to update the projects with the new C1 V4.5.2?

    2) In 2 or 3 month there will be maybe an update.

    How can i know?

    Best regards

    Said

  • Posted 11 April 2021, 9:47 pm EST

    Hello Said,

    The .NET 4.0 and 2.0 controls are in maintenance mode for very long and it is recommended to use 4.5.2 version controls for future support.

    https://www.grapecity.com/forums/winforms-edition/net-40-and-20-support-noti_1

    As I can see in your attached screenshot only the Apps for 4.0 and 2.0 are installed not the controls under the bin folder.

    You can use the ComponentOneControlPanel utility to install the 4.0 and 2.0 controls by making a selection from the right side of the opened dialog.

    >>Is there a simple way to update the projects with the new C1 V4.5.2?

    If you want to migrate your project from 4.0 to 4.5.2 version controls then please remove the 4.0 builds and add the 4.5.2 builds manually. Then create the Licenses.licx file as per your project using the “Add missing entries to licx file” tool from the Tools menu of VS.

    Tools->Grapecity->Update projects->Add missing entries to licx file



    >>In 2 or 3 month there will be maybe an update.

    The new version ComponentOne controls releases every quarter.

    Regards,

    Prabhat Sharma.

  • Posted 11 April 2021, 10:19 pm EST

    Dear Prabhat,

    The following is good tip:

    Tools->Grapecity->Update projects->Add missing entries to licx file

    I am updating my Projects one by one for V.4.5.2.

    Thanks and Best regartds

    Said

  • Posted 12 April 2021, 4:02 pm EST

    Hello Said,

    If you face any issue in updating the projects then please feel free to ask.

    Regards,

    Prabhat Sharma.

Need extra support?

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

Learn More

Forum Channels