Telerik Forums
Telerik Document Processing Forum
6 answers
231 views

The documentation for the libraries included in Telerik Document Processing is available at http://docs.telerik.com/devtools/document-processing.

This week's latest resources are described below.

RadPdfProcessing
TextFragment
The content of this article is updated to describe the new properties added to the TextFragment class.

RadSpreadProcessing
Headers and Footers
The article is introduced to describe the new feature in RadSpreadProcessing - applying headers and footers when printing a document or exporting to PDF.

RadSpreadStreamProcessing
RadSpreadStreamProcessing
A new help section that explains how you could use the new RadSpreadStreamProcessing library to achieve fast export of spreadsheet documents with minimal memory usage.

 

Dinko | Tech Support Engineer
Telerik team
 answered on 15 Sep 2017
1 answer
943 views

Dear Telerik,

Currently I'm trying to export docx to pdf but got some errors.

Here is my export code:

            PdfFormatProvider pdfer = new PdfFormatProvider();

            using (Stream input = File.OpenRead("E:\\hd.docx"))
            {
                RadFlowDocument document = provider.Import(input);
                pdfer.Export(document, new FileStream(@"E:\hd.pdf", FileMode.Create));
            }

And I got this error: "cant convert RadFlowDocument to RadFixedDocument", also when I'm using RadDocument and IDocumentFormatProvider to export like some threads, visual studio couldn't found these class, interface.

My references at attachment file, please look at it.

Thank you very much for your help!

Tanya
Telerik team
 answered on 14 Sep 2017
4 answers
822 views
I create a barcode using the barcode library from DevExpress. It can export the barcode in various raster image formats (PNG, JPEG, ...), in vector graphic formats (WMF and EMF) or as a separate PDF file.

Currently I export a JPEG and add it to Telerik RadPdfProcessing using:
myBlock.InsertImage(new ImageSource(myJpegImageStream, ImageQuality.High));

Of course, the image quality is not optimal, because the raster graphics are lossy when zooming. Is there any way to insert a vector graphic or the PDF as described above in a RadPdfProcessing Block/FixedContentEditor? If RadPdfProcessing does not support WMF or EMF, but a different vector graphic format, which a WMF or EMF can be converted to, it would be OK for me to convert the WMF/EMF to this other format.

Using a PdfStreamWriter to manipulate the PDF created by RadPdfProcessing afterwards may be an option, but not a very nice one, because the image is not part of the document flow.
Deyan
Telerik team
 answered on 14 Sep 2017
7 answers
760 views

Hello 

 The following method is supposed to import a PDF file and export it. It works as expected, except that the image is lost. 

private void Test1()
      {
          var provider = new PdfFormatProvider();
 
          var stream = File.OpenRead(@"C:\inputFile.pdf");
 
          var document = provider.Import(stream);
 
          using (var output = new FileStream(@"C:\outputFile.pdf", FileMode.OpenOrCreate))
          {
              provider.Export(document, output);
          }
      }

 

 You might say that the file is in bad format or something, but why would this work?

private void Test2()
    {
        var stream = new FileStream(@"C:\inputFile.pdf", FileMode.Open, FileAccess.Read);
 
        var source = new PdfDocumentSource(stream, FormatProviderSettings.ReadOnDemand);
 
        ViewModel.DocumentSource = source;
    }

DocumentSource is binded to the PdfViewer.DocumentSource.

 

Here is the link to the PDF inputFile: https://goo.gl/3lpe9O

 Thank you

Maurício
Top achievements
Rank 1
 answered on 13 Sep 2017
1 answer
222 views

The documentation on this page (http://docs.telerik.com/devtools/document-processing/libraries/radziplibrary/features/protect-ziparchive) says 
"RadZipLibrary supports traditional PKWARE encryption only. The settings for this encryption type are represented by the DefaultEncryptionSettingsclass."

PKware has shifted it's focus to providing encryption products, and now offers a multitude of different encryption methods, products, and supported algorithms. 

Does anything know specifically what is meant by "traditional PKWARE encryption?"  I'm hoping for something like AES-256 ? 
Tanya
Telerik team
 answered on 13 Sep 2017
1 answer
656 views

Hi

How can I clone a RadFixedPage and added to a new RadFixedDocument

 

I tried with this code but I get an error so I think that I need to clone the page before I can added to another document

RadFixedDocument originalDocument = pdfProcessingProvider.Import(inputPdfStream);
                       RadFixedDocument newDocument = new RadFixedDocument();
                      
                       foreach (var page in originalDocument.Pages)
                       {                    
                                                 
                               newDocument.Pages.Add(page);//ERROR!!
                          
                       }

 

Thank you

Tanya
Telerik team
 answered on 08 Sep 2017
1 answer
2.0K+ views

Hello, I need to export / convert an Excel file to Pdf file.

Unfortunately using Microsoft.Interop everything works in development but not in production.

I have been able to use the RadFlowDocument features to convert a Word file to pdf using the following code.

public void TransformPdf(string fileSource, string fileDestination)
       {
           IFormatProvider<RadFlowDocument> fileFormatProvider = new DocxFormatProvider();
           using (FileStream input = new FileStream(fileSource, FileMode.Open))
           {
               RadFlowDocument document = fileFormatProvider.Import(input);
 
               byte[] renderedBytes = null;
 
               IFormatProvider<RadFlowDocument> formatProvider = new RtfFormatProvider();
               using (MemoryStream ms = new MemoryStream())
               {
                   formatProvider.Export(document, ms);
                   renderedBytes = ms.ToArray();
 
                   File.WriteAllBytes(fileDestination, renderedBytes);
               }
           }
       }

My question is: Do you have a similar or alternative way to make a pdf conversion using the Telerik libraries?

Thank you, Mario

Tanya
Telerik team
 answered on 07 Sep 2017
2 answers
191 views

hello i have docx file in memorystream  and open in telerik zip.

I see all entries,files  how to replaced some files in this zippackage and save to memorystream?

Tanya
Telerik team
 answered on 05 Sep 2017
1 answer
258 views

Hi, I wonder if you can help with my issue

How to put text in two columns as shown in the image?

 

 

Mihail
Telerik team
 answered on 22 Aug 2017
1 answer
118 views
Whether support .Net Core  2.0  
Mihail
Telerik team
 answered on 21 Aug 2017
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?