Telerik Forums
Telerik Document Processing Forum
3 answers
194 views
Since ZipPackage is now deprecated, is there a replacement to the IsZipFile method?  I haven't come across anything in the documentation yet...
Pavlina
Telerik team
 answered on 31 Mar 2015
1 answer
262 views
Hi,

Is there the equivalent of wpf RadSpreadSheet in winform ?

I mean the usercontrol allowing to display data in Excel style.


Regards,

Pixie.
Dess | Tech Support Engineer, Principal
Telerik team
 answered on 30 Mar 2015
1 answer
128 views
Hi,

How do you decompress a stream now that this class is obsolete?  I used to have:

        public static byte[] Decompress(byte[] settings)
        {
            using (var zippedStream = new ZipInputStream(new MemoryStream(settings)))
            {
                return ReadFully(zippedStream);
            }
        }

        public static byte[] ReadFully(System.IO.Stream input)
        {
            var buffer = new byte[16 * 1024];
            using (var ms = new MemoryStream())
            {
                int read;
                while ((read = input.Read(buffer, 0, buffer.Length)) > 0)
                {
                    ms.Write(buffer, 0, read);
                }
                return ms.ToArray();
            }
        }

Is it still ok to use CompressedStream directly and if so how do you create the CompressionSettings as the Method setter is protected?

Thanks,

Scott
Scott Waye
Top achievements
Rank 2
Iron
Iron
Veteran
 answered on 27 Mar 2015
1 answer
382 views
Hi,

I found no direct option for Landscape formats.
So what I do ATM is to set the size with
Size sZ = PaperTypeConverter.ToSize(PaperTypes.A4);
swap width / height a this size and assign it to the page.size

Did I miss something (some "hidden" property) - or is this the way to do it?

Manfred
Tanya
Telerik team
 answered on 25 Mar 2015
2 answers
209 views
Hi,

I have a view which looks something like this:
<Viewbox>
    <Canvas Width="800" Height="1050" x:Name="caContent">
        <Image x:Name="imgBackground" Source="Images/Proto1.png" Stretch="UniformToFill" Width="800" Height="1050"/>
    </Canvas>
</Viewbox>

At runtime I load a background image an after that I place controls (TextBlock) on the Canvas which are bound to data.
So after all I have some kind of a report "printed" on the screen.
I can also print this report (it's designed to fit on A4 paper format).

Now my question - is there an easy way to save this report as PDF?

I've seen your samples where FirstLook looked promising - but I had to learn that it displays an image "resultDocument...png" and not the data.
And the "rendering code" is working with a "FixedContentEditor" and special rendering.

My idea was that I can "print" to your PDF component like to a printer - or in other words - use the existing (for screen rendering) code and simply render the result to PDF.
Is this possible?

Thank you
Manfred
ManniAT
Top achievements
Rank 2
 answered on 24 Mar 2015
2 answers
255 views
Is there a way to output one specific worksheet to a PDF document?  Or, must I always rely on spreadsheet formatting?
Joel Palmer
Top achievements
Rank 2
 answered on 18 Mar 2015
3 answers
286 views
Hi,

we are currently using a free PDF Library to convert some XPS documents to PDF.
The XPS document has pages with different heights (so for an example page 1 is 6 cm high while page 2 has 11 cm).

Is this (render an XPS to PDF) also possible with telerik PDFProcessing?

The reason why I ask - we love your products (and quality, support,...) and the PDF library is the only "external component" (except telerik controls) we use in a pretty large project. It would be great to get rid of "the others" and instead use your PDFProcessing.

Thanks
Manfred
Tanya
Telerik team
 answered on 17 Mar 2015
1 answer
149 views
I love you output to PDF option.  Do you also have an export to XPS?
Tanya
Telerik team
 answered on 17 Mar 2015
1 answer
226 views
Hi!

Using RadFixedDocumentEditor.SectionProperties I can set PageSize and PageMargins, but I can't find a way to set the page orientation. Am I missing something?

Regards
Neils
Tanya
Telerik team
 answered on 12 Mar 2015
1 answer
520 views
The help is little bit scarce on registering a font: see http://docs.telerik.com/devtools/wpf/controls/radpdfprocessing/concepts/fonts

There is a data parameter at the end, which should contain the raw data for the font. Looking for more information about the subject I came across https://github.com/telerik/xaml-sdk/blob/f5002a15eb1def98405472bee700f20ad8b65cc9/SpreadProcessing/RegisterAndExportPdfFonts.Web/PdfFontsService.svc.cs where 

public class FontData {
  public bool IsValid { get; set; }
  public byte[] Bytes { get; set; }
  public string FontFamilyName { get; set; }
  public bool IsItalic { get; set; }
  public bool IsBold { get; set; }
}

is defined. Which is used from https://github.com/telerik/xaml-sdk/blob/f5002a15eb1def98405472bee700f20ad8b65cc9/SpreadProcessing/RegisterAndExportPdfFonts/MainPage.xaml.cs to get the Bytes property of the above class to register a font:

PdfFontsServiceFontData result = e.Result;
FontFamily fontFamily = new FontFamily(result.FontFamilyName); FontStyle fontStyle = GetFontStyle(result.IsItalic); FontWeight fontWeight = GetFontWeight(result.IsBold);
FontsRepository.RegisterFont(fontFamily, fontStyle, fontWeight, result.Bytes);

So is this the right way to create the font data:

FontFamily fontFamily = new FontFamily(fontFamilyName);
FontStyle fontStyle = isItalic ? FontStyles.Italic : FontStyles.Normal;
FontWeight fontWeight = isBold ? FontWeights.Bold : FontWeights.Normal;
Typeface typeface = new Typeface(fontFamily, fontStyle, fontWeight, FontStretches.Normal);
GlyphTypeface glyphTypeface;
if (typeface.TryGetGlyphTypeface(out glyphTypeface)) {
   using (var memoryStream = new MemoryStream()) {
       glyphTypeface.GetFontStream().CopyTo(memoryStream);
       data.Bytes = memoryStream.ToArray();
       data.IsValid = true;
   }
}

Thanks

Mike

Kammen
Telerik team
 answered on 04 Mar 2015
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?