Telerik Forums
Telerik Document Processing Forum
4 answers
804 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
738 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
216 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
639 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
1.9K+ 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
186 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
253 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
4 answers
419 views

Hello,

I am importing a docx file to a radflowdocument and I need to be able to find some elements (such as list items) and see what the font properties are of text and make adjustments. I can see all of the lists in the document, but can't figure out how to get the associated text/text properties for them. Is this possible?

Thanks!

Tanya
Telerik team
 answered on 17 Aug 2017
1 answer
171 views

I'm looking into the possibilities of using Telerik Document Processing instead of Telerik Reporting in order to get some better control over the "widows and orphans" problem that my report in Telerik Reporting has, specifically when table headers appear at the bottom of a page and the data appears at the top of the next, and when a table's footnote (or the last line of a paragraph) appears at the top of a new page by itself, separated from all other data.

I imagine that using a RadFixedDocument could (hypothetically) allow me to control exactly where a paragraph or table breaks across a page, or gets pushed to a new page entirely, but that would be a lot of extra work to implement when I would expect that RadFlowDocument should already be able to do that. The problem is, I haven't found anything in the documentation or online about widow/orphan control in Telerik Document Processing, or even about how or when it determines where to wrap to a new page.

Is there anything built in for this, or can I even see when a page is supposed to break at design-time to prevent stray lines at the top and bottom of pages?

Anna
Telerik team
 answered on 08 Aug 2017
Narrow your results
Selected tags
Tags
+? more
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?