Are the Telerik Document Processing libraries Windows only?

18 posts, 0 answers
  1. Anthony
    Anthony avatar
    10 posts
    Member since:
    Oct 2017

    Posted 26 Oct 2019 Link to this post

    I'm building an ASP.Net Core app that fills PDF documents and saves them. I had planned on building it to run on Linux servers and develop on a Mac. But....it appears the document processing libraries are Windows-only? I get an error stating"Could not load type 'System.Windows.Point' from assembly 'WindowsBase...". Is this the case? Does this have to be built and ran on a Windows machine?
  2. Martin
    Admin
    Martin avatar
    124 posts

    Posted 30 Oct 2019 Link to this post

    Hi Anthony,

    The Telerik Document Processing libraries are cross-platform libraries (RadSpreadProcessing is the only one that is still available for the full .NET Framework only) and they can be run not only on Windows. Please, make sure you are using the latest version of the NuGet packages and you are referencing the version compatible with .NET Standard (it shouldn't contain 'Windows' in its name). If both the requirements are met, please, provide us with more information (i.e. product version) and/or sample project demonstrating the described behavior. Any additional information you could provide will be much appreciated.

    Looking forward to hearing from you.

    Regards,
    Martin
    Progress Telerik

    Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
  3. Anthony
    Anthony avatar
    10 posts
    Member since:
    Oct 2017

    Posted 30 Oct 2019 in reply to Martin Link to this post

    Thanks for the reply. I'll look into referencing packages that target .Net Standard. To be specific, I'm looking to create an ASP.Net Core WebAPI that will perform a mail merge on a word document. I have a prototype written in the full .Net Framework, but I would rather not deploy this solution to a Windows Server, since most of our assets are running as AWS Lambdas, which use some flavor of Linux under the covers. I hope that helps clarify our needs.

    Thank you!

  4. Anthony
    Anthony avatar
    10 posts
    Member since:
    Oct 2017

    Posted 30 Oct 2019 in reply to Martin Link to this post

    I do realize I said in the original post that we were looking to fill PDF documents. Actually, both solutions (Document Mail Merge and PDF filling) are being prototyped. Thanks again for your reply....this should get us back on track.
  5. Martin
    Admin
    Martin avatar
    124 posts

    Posted 31 Oct 2019 Link to this post

    Hi Anthony,

    The WordsProcessing library provides a Mail Merge functionality that allows you to produce personalized documents from a template holding fixed content and variables. For more information and examples, please, check the Mail Merge help topic as well as our GitHub repository where we have a good Mail Merge sample project.

    As for the PDF filling, I am not sure if you need to fill predefined fields (Interactive Forms) in a PDF document or to create a new document, thus, I am giving you information for both cases. With PdfProcessing library you can:

    1. Create your own RadFixedDocument which later to be exported as a PDF document. For more information and examples, please, check the Getting Started help section.
    2. Create PDF files containing text boxes, buttons, list boxes and other interactive controls enabling the PDF file user to interactively fill some data in the PDF document and/or digitally sign the filled document. For more information, please, check the Interactive Forms concept help topic as well as our GitHub repository where we have a good example of Modifying Form Values.

    Regards,
    Martin
    Progress Telerik

    Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
  6. Anthony
    Anthony avatar
    10 posts
    Member since:
    Oct 2017

    Posted 04 Nov 2019 in reply to Martin Link to this post

    This was a huge help. Thank you! I've proven out most of what I need to do so far in a prototype, however, I have another question regarding PDF handling that if you could answer before we begin on it, it would save us a lot of time.

    We have a need to allow users to enter values in a fillable PDF form via the browser. Does the Telerik PDF Viewer allow form field entry? The forms we're using are government fillable PDFs not created by us.

     

    Thanks in advance!

  7. Veselin Tsvetanov
    Admin
    Veselin Tsvetanov avatar
    1228 posts

    Posted 07 Nov 2019 Link to this post

    Hello Anthony,

    The Telerik PDFViewer helper would allow you to display PDF content on the client (browser). It, however, does not currently offer forms support. Having that said, it won't allow the users to fill it in.

    The PDFViewer implementation uses under the hood pdf.js. That currently does not offer full support editable of AcroForms. Further info on that topic could be found in the following thread: https://github.com/mozilla/pdf.js/issues/7613

    Nevertheless, if there is demand from the community for such functionality, we will seriously consider any options to provide that support in our widget. That is why I have created the following feature request in our Feedback portal. We will keep tracking the interest in that. I will also suggest you cast your vote for that request.

    Regards,
    Veselin Tsvetanov
    Progress Telerik

    Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
  8. Chris
    Chris avatar
    4 posts
    Member since:
    Oct 2012

    Posted 08 Nov 2019 in reply to Veselin Tsvetanov Link to this post

    I'll chime in as I actually have a .Net Core web application working with PdfProcessing.

    First of all the specific package to reference to is Telerik.Documents.Core,Telerik.Documents.Fixed, Telerik.Zip . Current version is 2019.3.1021

    For the editing of the AcroForms I do have a suggestion.

    Design a standard view in your application with the fields that are required to be filled in. Then have a button possible called Submit or Download pdf or something similar. That posts the values to the server which takes it and uses the standard RadFixedDocument to open the original pdf, update the AcroForm properties with the new text and export it as a file download

  9. Veselin Tsvetanov
    Admin
    Veselin Tsvetanov avatar
    1228 posts

    Posted 12 Nov 2019 Link to this post

    Hello Chris,

    Using form fields to collect data from the user and then passing it to the AcroForm properties on the server is indeed a suitable approach for the discussed scenario. Many thanks for your input on the above.

    Regards,
    Veselin Tsvetanov
    Progress Telerik

    Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
  10. Pts
    Pts avatar
    3 posts
    Member since:
    Apr 2018

    Posted 21 Nov 2019 in reply to Chris Link to this post

    Hello Chris,

    I am having trouble getting the PdfProcessing to work with a simple .Net core web application. I get System.TypeLoadException error shown below.

    The code fails at line -   PdfFormatProvider provider = new PdfFormatProvider();

    I am using the latest version 2019.3.1021.300 for the three dlls - Telerik.Windows.Documents.Core.dll, Telerik.Windows.Documents.Fixed.dll and Telerik.Windows.zip.dll.

    Any help would be appreciated.

    System.TypeLoadException
      HResult=0x80131522
      Message=Could not load type 'System.Windows.Point' from assembly 'WindowsBase, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.
      Source=Telerik.Windows.Documents.Fixed
      StackTrace:
       at Telerik.Windows.Documents.Fixed.FormatProviders.Pdf.Export.PdfExportSettings..ctor()
       at Telerik.Windows.Documents.Fixed.FormatProviders.Pdf.PdfFormatProvider..ctor()

  11. Chris
    Chris avatar
    4 posts
    Member since:
    Oct 2012

    Posted 21 Nov 2019 in reply to Pts Link to this post

    Hi Pts

    That's easy to fix. You're referring to the wrong version of the files. If you are using telerik's nuget server you need to use Telerik.Documents.Core, Telerik.Documents.Fixed and Telerik.Zip (no .Windows in the name) . Specific file version should end in .20 instead of .300 . The .20 indicates it is compiled for net standard 2.0. The .300 is for .net core 3 with wpf on Windows

    IF you need the direct dll files you can find them at 

    C:\Program Files (x86)\Progress\Telerik UI for ASP.NET Core R3 2019\pdfviewer\binaries\netstandard

    or similar path

    You can also get the nupkg for them at

    C:\Program Files (x86)\Progress\Telerik UI for ASP.NET Core R3 2019\dpl

  12. Pts
    Pts avatar
    3 posts
    Member since:
    Apr 2018

    Posted 21 Nov 2019 in reply to Chris Link to this post

    I really appreciate your quick response. Thanks
  13. Telerik User
    Telerik User avatar
    4 posts
    Member since:
    May 2020

    Posted 21 May 2020 Link to this post

    Hello, I am trying to digitally sign pdf documents, I did it with telerik for asp.net in windows, but I need to run my application in linux so I tried to do the project in Asp.Net Core, but the Telerik.Windows library. Documents.Fixed.Model.DigitalSignatures; seems not available for asp.net Core, I tried to use the Telerik.Documents.Fixed.Model.DigitalSignatures libraries, but it is not available in the libraries for Asp.net Core, could you confirm if it is only for Windows the DigitalSignature option for PDF files?


  14. Pts
    Pts avatar
    3 posts
    Member since:
    Apr 2018

    Posted 22 May 2020 in reply to Telerik User Link to this post

    My Asp.Net core project used Telerik.Windows.Documents.Fixed library to generate pdf documents. I have no knowledge about digital signing of pdf documents using Telerik.
  15. Veselin Tsvetanov
    Admin
    Veselin Tsvetanov avatar
    1228 posts

    Posted 26 May 2020 Link to this post

    Hi Eder,

    What you have noted is correct. The DigitalSignatures are yet not available in the .Net Core PDFProcessing library. 

    Regards,
    Veselin Tsvetanov
    Progress Telerik

    Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
    Our thoughts here at Progress are with those affected by the outbreak.
  16. Telerik User
    Telerik User avatar
    4 posts
    Member since:
    May 2020

    Posted 27 May 2020 in reply to Veselin Tsvetanov Link to this post

    Ok,  i see,   thank you  for the answer
  17. Joel
    Joel avatar
    203 posts
    Member since:
    Jun 2018

    Posted 30 Jun 2020 Link to this post

    I am attempting to use the Merge technique in a REST API (ASP.NET Core 3.1).  Everything seems to work fine until the final step where I convert the stream to a file.  Specifically, in your Kendo.Mvc.Examples.MergeSplitAddContent.cs on line 73 you run this line:

    return File(renderedBytes, mimeType, fileDownloadName);

    This file object is from the Microsoft.AspNetCore.Mvc.ControllerBase class.  This class isn't used in a REST API.  Any idea how I can perform this function?

    Telerik's Example Method:

    mimeType = "application/pdf";
    fileDownloadName = "merge.pdf";
    byte[] renderedBytes = null;
    short filesToMurge = 2;
    MemoryStream ms = new MemoryStream();
     
    using (PdfStreamWriter fileWriter = new PdfStreamWriter(ms, true))
    {
        for (int i = 0; i < filesToMurge; i++)
        {
            if(i == 0)
            {
                using (PdfFileSource fileSource = new PdfFileSource(firstDocument.OpenReadStream()))
                {
                    foreach (PdfPageSource pageSource in fileSource.Pages)
                    {
                        fileWriter.WritePage(pageSource);
                    }
                }
            }
     
            if( i == 1)
            {
                using (PdfFileSource fileSource = new PdfFileSource(secondDocument.OpenReadStream()))
                {
                    foreach (PdfPageSource pageSource in fileSource.Pages)
                    {
                        fileWriter.WritePage(pageSource);
                    }
                }
            }
             
        }
    }
     
    renderedBytes = ms.ToArray();
    return File(renderedBytes, mimeType, fileDownloadName);
  18. Joel
    Joel avatar
    203 posts
    Member since:
    Jun 2018

    Posted 30 Jun 2020 in reply to Joel Link to this post

    Never mind.  I thought the ControllerBase was different in a rest API than in a MVC application.  I was wrong.  The real problem was that I did this in a service.  So, I had the service splice together the files (in the AppendAsync method).  But, then I brought the result stream up to the controller where I added all my tracking and submitted it to Azure.

    StorageFile primaryStorageFile =
        await storageFileService.AppendAsync(primaryId, appendId, containerName, fileName);
     
    FileContentResult file = File(
        primaryStorageFile.MemoryStream.ToArray(),
        Glossary.Pdf, fileName);
     
    CloudBlobContainer blobContainer =
        storageFileService.GetContainer(containerName);
     
    if (blobContainer == null)
    {
        throw new Exception("Unable to capture Blob Container");
    }
     
     // now that they are combined, store to Azure and create a StorageFile record
    string qualifiedFileName = $@"{primaryStorageFile.SessionUniqueId}\{fileName}";
    Upload upload = new Upload();
    await upload.File(file.FileContents, blobContainer, qualifiedFileName);

     

    ...database tracking

Back to Top