Telerik Forums
Telerik Document Processing Forum
1 answer
434 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
260 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
325 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
344 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
208 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
292 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
664 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
1 answer
820 views
I'm playing with 2015Q1 and export a simple text document with PDF/A-3b compliance level.

When I check the resulting pdf file, the validation service states:

Validating file "Testpdf.pdf" for conformance level pdfa-3b
  The font Helvetica must be embedded.
  The document does not conform to the requested standard.
The document contains fonts without embedded font programs or encoding information (CMAPs).Done.

How can I specify, that a standard font should be embedded?

Thanks

Mike
Petya
Telerik team
 answered on 03 Mar 2015
1 answer
943 views
Hello,

I proposed to use the RadRichTextEditor to edit simple Docx documents and use the format providers to convert the docx documents to html (for sending as html e-mail).
But now I found that there is also the new WordsProcessing which can do the same conversions.
If I am right WordsProcessing does not (yet?) have an editor for visual editing. (Is that proposed? Or is the RadRichTextEditor the proposed way to go?).
For the conversion from Docx to Html, are there any pros or cons or difference in quality in using the format providers found in the RichTextEditor assembly or the WordsProcessing assemblies?
Or use they in fact the same code base?
Petya
Telerik team
 answered on 25 Feb 2015
1 answer
735 views
Hello,
I have a huge CSV file (about 3.3M lines), that I had to import for filtering and processing part of it.
I've tried to looked at your CsvFormatProvider class to do the work. Unfortunately, the only possibility to work with it is to create a Workbook and the workbook is limited to about 1M lines.

Is there any possibility to have a "low-level" importing of the CSV file?
For example to import one line of data per call. The import returning an array of String.
Or do you have another solution for this problem?

Patrick
Nikolay Demirev
Telerik team
 answered on 17 Feb 2015
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?