Telerik Forums
Telerik Document Processing Forum
4 answers
528 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
411 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
726 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
244 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
373 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
223 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
162 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
427 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
8 answers
253 views
Hi.

I have recently started using the ZipLibrary and I am facing an Issue when adding streams to a ZipPackage.

Here is my code below, aswell as the stack trace. Is there anything wrong with it or is it an issue from the ZipLibrary ?

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 Samples
SendZipToClient(memStream, Package);

Stack Trace: 

at System.IO.MemoryStream.set_Capacity(Int32 value)
at System.IO.MemoryStream.EnsureCapacity(Int32 value)
at System.IO.MemoryStream.Write(Byte[] buffer, Int32 offset, Int32 count)
at Telerik.Web.Zip.ZipOutputStream.StreamCopy(Stream dstStream, Stream srcStream, UInt32 len)
at Telerik.Web.Zip.ZipOutputStream.WriteCompressedData(ZipPackageEntry item)
at Telerik.Web.Zip.ZipOutputStream.AddCompressed()
at Telerik.Web.Zip.ZipOutputStream.Close(Boolean shouldCloseStream)
at Telerik.Web.Zip.ZipOutputStream.Close()
at Telerik.Web.Zip.ZipPackage.AddEntry(ZipCompression method, Stream recordStream, String fileNameInZip, DateTime dateTime, CompressionType compressionType)
at Telerik.Web.Zip.ZipPackage.AddStream(Stream stream, String fileNameInZip, ZipCompression method, DateTime dateTime)
at MyCode.DownloadZip_Click() 

Additionnal Infos:
.NET version: 4.5
Telerik version for ASP.NET AJAX: 2013.1.417.45
Phil
Top achievements
Rank 2
 answered on 16 Apr 2015
1 answer
131 views

Hi,

Is it possible to add text with outline (halo) ?

/Brian 

 

 

 

Todor
Telerik team
 answered on 09 Apr 2015
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?