how to set deviceinfo in html5 reportviewer?

3 posts, 0 answers
  1. Vincent
    Vincent avatar
    53 posts
    Member since:
    Dec 2013

    Posted 02 Jan Link to this post

    I use report viewer in my .NET core application. the code as follow:

    $("#reportViewer").telerik_ReportViewer({
                serviceUrl: "../Api/reports/",
                    reportSource: {
                        //report: "Telerik.Reporting.Examples.CSharp.ReportCatalog, CSharp.ReportLibrary",
                        report: report,
                        parameters: parameters,
                },
                renderingBegin:ReportRendering,
                viewMode: telerikReportViewer.ViewModes.PRINT_PREVIEW,
                scaleMode: telerikReportViewer.ScaleModes.SPECIFIC,
                scale: 1.0
            });

     

    function ReportRendering(e,args) {
            var info = args.deviceInfo;
            //info.set("FontEmbedding", "Full");
        }

     

     

    I want to set the pdf deviceinfo property FontEmbedding. how can I do this?

  2. Todor
    Admin
    Todor avatar
    451 posts

    Posted 02 Jan Link to this post

    Hi Vincent,

    You may use the jQuery.ajaxPrefilter event as explained in the How to pass culture via AJAX call from the HTML5 Report Viewer KB article. The 'deviceInfo' settings can be changed on the Create Document request.

    Regards,
    Todor
    Progress Telerik

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  3. Vincent
    Vincent avatar
    53 posts
    Member since:
    Dec 2013

    Posted 02 Jan in reply to Todor Link to this post

    thank you for your reply. I read the document of Telerik report. I set the device info globally in appsetting.json. "telerikReporting": {
        "extensions": [
          {
            "name": "PDF",
            "description": "PDF Description",
            "parameters": [
              {
                "Name": "DocumentAuthor",
                "Value": "Vincent"
              },
              {
                "Name": "FontEmbedding",
                "Value": "None"
              }
            ]
          }
        ]
      } 

    thank you all the same.

Back to Top