For some time now we have been well aware of the problems and limitations you have been facing with our export to PDF functionality. This is why I’m excited to announce some really good news for you: Not only have we managed to address two of the most popular limitations, but we also implemented some great new features. This blog post will walk you through all the improvements.

The Facts

Here’s what we achieved in short:
  • Windows 8 / Mobile devices support – you have an Apple (iOS, MacOSX) or Windows 8 device and the exported files appear blank when viewed in the default file preview application? Starting with the Q2 2013 SP1 release of RadControls for ASP.NET AJAX (just shipped yesterday, July 17th, 2013) this will no longer be a problem.
  • FIPS compliancy – our suite used to offer full support for the FIPS standard with a single exception - the PDF export. As you have already guessed, this has also been addressed. 
  • Text wrapping – we have improved the text wrapping support so that it no longer depends on the whitespace characters in the text. Yes, this means that even if you have very long words, residing in very narrow columns, they will be carried over the next line instead of breaking the cell borders.
  • Content filters – another new feature is the content filters support. Now it is possible to use a compressing filter to reduce the file size. We also have two ASCII filters introduced for portability. You can examine the chart below in order to get a better picture of the effects of the content filters.
  • Headers / Footers – this was added for the current official release (Q2 3013) but it is still part of these great new features. We had really a lot of requests to implement support for page headers and footers and I’m happy to see that you already appreciate that.
  • Page numbering – another already implemented functionality (Q2 2013) which we had great demand for. It is closely related to the Headers / Footers support mentioned above.

File size comparison chart.
All filters are compared to the case where no filter is used (NoFilter).

Content Filters Chart

The Technical Details

All of the above are designed to be very easy to use. The mobile devices support and the FIPS compliancy need no configuration of any kind so I will go directly to the technical description of the rest of the items:

  • Text wrapping – it is enabled using the ForceTextWrap property in the Grid Pdf settings. The default value is false for this feature.
  • Content filters – this is set via property named ContentFilter. The corresponding enumeration has four values:
    • NoFilter
    • Ascii85
    • AsciiHex
    • Flate

The first one is indeed self-describing. The ASCII filters will be useful for only a handful of people but yet they are part of the PDF specification. And the last filter is a really useful one – it compresses the contents (primarily images, text, and embedded fonts) in order to reduce the output file size. You can see the filter comparison in the charts above.

  • Headers / Footers – there are dedicated PageFooter and PageHeader settings which have three sub-properties – LeftCell, MiddleCell, and RightCell. This is so, because the header/footer item holds its content in three separate cells. Each cell has a Text and TextAlign properties. Although the behavior of the Text property is obvious, it is important to note that it supports HTML code which is great for formatting purposes. TextAlign is yet another easy to comprehend property. The possible values here are Left, Right, and Center.
  • Page numbering – as mentioned in the beginning, this feature is closely tied to the Header/Footer support. You can insert a page number directly in the Text property of the Header/Footer cells using a special tag - <?page-number?>. Just place it somewhere in the cell text and you will have the current page number shown on each page.

The Wrap Up

I know you have requested these features/improvements many times and I’m glad that we now have them available: just download the Q2 2013 Service Pack1.

Is there anything else you want to see added to the PDF export? I’m interested to see your comments and thus I encourage you to share your opinion about all this new stuff. I will do my best to answer your questions.


About the Author

Daniel Peichev

is Software Developer at one of Telerik's ASP.NET AJAX teams, where he primarily works on exporting functionality for RadGrid and RadTreeList. Daniel is interested in ASP.NET, Javascript, CSS and the cutting edge Microsoft technologies and products.

Related Posts

Comments

Comments are disabled in preview mode.