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?

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);
}
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
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();
}
}
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?
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.
MemoryStream memStream = new MemoryStream();ZipPackage Package = ZipPackage.Create(memStream);foreach (MyItem item in myCollection) { Stream stream = default(Stream); byte[] bData = GetPdfBytes(item); //Average size is {Length=3150000} stream = new MemoryStream(bData); Package.AddStream(stream, string.Format("MyFileName_{0}.pdf", item.UniqueID), Telerik.Web.Zip.CompressionType.Default, item.Date); //Out of memory exception here //offset: 65855158, Headers: 23, ZipPackageEntries: 23 }//Code from Telerik SamplesSendZipToClient(memStream, Package);Hi,
Is it possible to add text with outline (halo) ?
/Brian