Telerik Forums
Telerik Document Processing Forum
1 answer
544 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
167 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
203 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
107 views
Whether support .Net Core  2.0  
Mihail
Telerik team
 answered on 21 Aug 2017
4 answers
396 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
143 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
4 answers
462 views

I am currently trying out SpreadProcessing. I am importing an xlsx spreadsheet file using the XlsxFormatProvider, capturing its data into a DataTable and then exporting it (without changes) to a new file (with an xlsx extension).

However, when I subsequently open the exported file in Excel, I get the following message:

We found a problem with some content in <file>. Do you want us to recover as much as we can? If you trust the source of this workbook, click Yes.

If I click Yes, the file appears to load fully and correctly (although I get a further dialog). How can I avoid this message - it's going to be a concern to users of the application I'm intending to use SpreadProcessing in.

Excel Version 2013; Visual Studio 2017; UI for ASP.NET AJAX R2 2017; .NETFramework 4.5.2

Anna
Telerik team
 answered on 08 Aug 2017
2 answers
982 views

I'm attempting to iterate through the rows of each sheet in an opened Excel sheet - I'm replacing code that used the GemBox library. Previously, I used code like the following:

foreach (ExcelRow row in sheet.Rows)
{
   if (row != null)
   {
       ... do stuff ....
   }
}

 

Is the following the best conversion to using the Telerik library? Or is there a better way to only iterate through rows with content?

 

for (int i = 0; i < sheet.Rows.Count; i++)
{
   var row = sheet.Cells[CellRange.FromRow(i)];
 
   if (row != null)
   {
       ... do stuff ....
   }
}
Tanya
Telerik team
 answered on 07 Aug 2017
1 answer
460 views
How to attach/embed xml file into the PDF/A-3 file?
Anna
Telerik team
 answered on 07 Aug 2017
Narrow your results
Selected tags
Tags
+? more
Top users last month
Edmond
Top achievements
Rank 1
Iron
fabrizio
Top achievements
Rank 2
Iron
Veteran
RobMarz
Top achievements
Rank 2
Iron
Fakhrul
Top achievements
Rank 1
Iron
Tejas
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Edmond
Top achievements
Rank 1
Iron
fabrizio
Top achievements
Rank 2
Iron
Veteran
RobMarz
Top achievements
Rank 2
Iron
Fakhrul
Top achievements
Rank 1
Iron
Tejas
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?