This is a migrated thread and some comments may be shown as answers.
Are the Telerik Document Processing libraries Windows only?
17 Answers 96 Views
This is a migrated thread and some comments may be shown as answers.
Anthony
Top achievements
Rank 2
Anthony asked on 26 Oct 2019, 07:34 PM
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?

17 Answers, 1 is accepted

Sort by
0
Martin
Telerik team
answered on 30 Oct 2019, 04:13 PM

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.
0
Anthony
Top achievements
Rank 2
answered on 30 Oct 2019, 04:23 PM

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!

0
Anthony
Top achievements
Rank 2
answered on 30 Oct 2019, 04:25 PM
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.
0
Martin
Telerik team
answered on 31 Oct 2019, 09:08 AM

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.
0
Anthony
Top achievements
Rank 2
answered on 04 Nov 2019, 06:24 PM

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!

0
Veselin Tsvetanov
Telerik team
answered on 07 Nov 2019, 12:14 PM

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.
0
Chris
Top achievements
Rank 1
answered on 08 Nov 2019, 01:29 PM

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

0
Veselin Tsvetanov
Telerik team
answered on 12 Nov 2019, 12:54 PM

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.
0
Pts
Top achievements
Rank 1
answered on 21 Nov 2019, 04:39 PM

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()

0
Chris
Top achievements
Rank 1
answered on 21 Nov 2019, 04:48 PM

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

0
Pts
Top achievements
Rank 1
answered on 21 Nov 2019, 05:18 PM
I really appreciate your quick response. Thanks
0
Telerik User
Top achievements
Rank 1
answered on 21 May 2020, 11:25 PM

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?


0
Pts
Top achievements
Rank 1
answered on 22 May 2020, 06:35 AM
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.
0
Veselin Tsvetanov
Telerik team
answered on 26 May 2020, 02:21 PM

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.
0
Telerik User
Top achievements
Rank 1
answered on 27 May 2020, 04:07 PM
Ok,  i see,   thank you  for the answer
0
Joel
Top achievements
Rank 1
Veteran
Iron
Iron
answered on 30 Jun 2020, 09:06 PM

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);
0
Joel
Top achievements
Rank 1
Veteran
Iron
Iron
answered on 30 Jun 2020, 10:42 PM

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

Asked by
Anthony
Top achievements
Rank 2
Answers by
Martin
Telerik team
Anthony
Top achievements
Rank 2
Veselin Tsvetanov
Telerik team
Chris
Top achievements
Rank 1
Pts
Top achievements
Rank 1
Telerik User
Top achievements
Rank 1
Joel
Top achievements
Rank 1
Veteran
Iron
Iron
Share this question
or