Telerik Forums
Telerik Document Processing Forum
2 answers
632 views

I am trying to create a multi-section PDF report and am getting this error when doing the second .InsertTable:

System.ArgumentException: The document element is associated with another parent.

Something like this:

var pdfDocument = new RadFixedDocument()
{
    DocumentInfo =
    {
        Title = packageTitle,
        Author = packageRunBy
    }
};
pdfDocument.Destinations.AddPageHorizontalFit();
var pdfEditor = new RadFixedDocumentEditor(pdfDocument);

foreach (var report in reports)
{

if (pdfDocument.Pages.Count > 0) pdfEditor.InsertSectionBreak();

var reportTable = new Table();

// Build the Table

pdfEditor.InsertTable(reportTable); // Errors here on the second time around the loop

}

Petya
Telerik team
 answered on 16 Jul 2015
1 answer
106 views
Upon exporting data from gridview the attached format of data is displayed. Please guide me to make it correct
Kostadin
Telerik team
 answered on 10 Jul 2015
4 answers
538 views

I have been scouring the documentation looking for help on the following:

  1. How to set the Overall PDF Orientation to Landscape
  2. How to set the Margins
  3. How to set Footer and Header on all or some pages

My scenario is fairly simple.  I am creating a Table and inserting it into the RadFixedDocument using â€‹.InsertTable(MyTable).  Now I need to set the PDF to Landscape, reduce the Margins and set some Header / Footer information

Dan
Top achievements
Rank 1
 answered on 09 Jul 2015
3 answers
420 views

Are there any examples of dynamically generating a PDF report that is essentially a formatted table containing data by looping through an object - using this new PdfProcessing control?  

Dan
Top achievements
Rank 1
 answered on 07 Jul 2015
9 answers
732 views
Hi!

I'm trying to add files to a zip package and my filename contains swedish characters (ÅÄÖåäö).
This characters are converted into \+' .

Something with the encoding of my filenames isn't right.
How can I fix this?

Regards
Per
Radoslav
Telerik team
 answered on 06 Jul 2015
2 answers
252 views

Hi, I am new to PDFProcessing, was following the example codes, but could not compile...Error 2 Argument 1: cannot convert from 'Telerik.Windows.Pdf.Documents.Fixed.Model.RadFixedPage' to 'Telerik.Windows.Documents.Fixed.Model.Common.IContentRootElement' 

Error 1 The best overloaded method match for 'Telerik.Windows.Documents.Fixed.Model.Editing.FixedContentEditor.FixedContentEditor(Telerik.Windows.Documents.Fixed.Model.Common.IContentRootElement)' has some invalid arguments 
 

I am using version 2015.1.331.40, runtime version v4.0.30319

 

RadFixedDocument document = new RadFixedDocument();
RadFixedPage page = document.Pages.AddPage();
FixedContentEditor editor = new FixedContentEditor(page);
editor.DrawText("Hello RadPdfProcessing!");
PdfFormatProvider provider = new PdfFormatProvider();
using (Stream output = File.OpenWrite("Hello.pdf"))
{
provider.Export(document, output);
}

cwk
Top achievements
Rank 2
 answered on 22 Jun 2015
5 answers
383 views

When I try the examples to download a pdf from chrome, the pdf displays in the viewer but when I click save icon it tries to save with the page name of: 

defaultcs.aspx

How can I get it to save/prompt for save as PDFDocument.pdf?

Marty

 

Kostadin
Telerik team
 answered on 03 Jun 2015
2 answers
236 views

I need to save a compressed byte stream in to a database table, the problem is that whenever i open the file, winZip/winRar/windows reports that the archive is corrupt. I've tried setting leavOpen on the ZipArchive (as suggested in some other posts) but it make no difference.

any ideas?

        private byte[] Compress(byte[] pData, string pFileName)
        {
            CompressionSettings lSettings = new LzmaSettings();

            using (MemoryStream lMemoryStream = new MemoryStream()) {
                using (ZipArchive lArchive = new ZipArchive(lMemoryStream, ZipArchiveMode.Create, false, null)) {
                    ZipArchiveEntry lAttachment = lArchive.CreateEntry(pFileName, lSettings);                   
                    using (var lAttachmentStream = lAttachment.Open()) {
                        using (var lStreamWriter = new StreamWriter(lAttachmentStream)) {
                            lStreamWriter.Write(pData);
                        }
                    }
                }
                return lMemoryStream.ToArray();
            }
        }

Jason
Top achievements
Rank 1
 answered on 04 May 2015
2 answers
168 views

The ScaleFactor property of the WorksheetPageSetup class requires a System.Windows.Size  of the WindowsBase, Version=4.0.0.0 assembly.

The WindowsBase assembly does not seem to exist in .Net 4

Where can I find this assembly?

 

Petya
Telerik team
 answered on 30 Apr 2015
4 answers
434 views

Hello. I am trying to set a default height using the following code:

worksheet.DefaultRowHeight = new RowHeight(UnitHelper.PointToDip(13),true);

 

But it is not working. How can I set it up? Thank you.

cesar
Top achievements
Rank 1
 answered on 24 Apr 2015
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?