PDF Export Automatic Filename

2 posts, 0 answers
  1. Dan
    Dan avatar
    135 posts
    Member since:
    Feb 2011

    Posted 05 Mar 2018 Link to this post

    We have an app that is over 1000 pages and many of those screens have grids with the PDF Export option enabled.  We have found that when we don't specify a filename, it automatically uses the Tile Tag of the page.  So this:

    <title>Issue Analysis</title>

    Becomes Issue__Analysis.pdf

    That has worked out fine for several years, but recently we have added a bunch of translations to the system and that title tag becomes this:

    <title><%= Utilities.getTranslation("Issue Analysis", "IssueAnalysis", "globalRes") %></title>

    Apparently when we export now, instead of a filename and extension, we get pdf as the filename with no extension and Windows doesn't recognize this as a pdf file.  If you do it a second time, you get a filename with pdf (2) as the name.

    I know we could specify a filename in the markup, but with literally over a thousand pages, I would like to avoid that.  Another suggestion is that we could instead do the translation in the code behind rather than the aspx page - I haven't tried that, but that also entails updating over a thousand pages along with reverting the aspx change.  Does anyone else have a better way?

  2. Eyup
    Admin
    Eyup avatar
    3841 posts

    Posted 08 Mar 2018 Link to this post

    Hi Dan,

    You can try using a DataAdapter to apply this property only in one single place. Here is a sample with a picker control:
    https://www.telerik.com/forums/how-to-prevent-raddatepicker-auto-correct-date#50kgrh1loEu7X6AjKb186Q

    I hope this will prove helpful.

    Regards,
    Eyup
    Progress Telerik
    Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Back to Top