This is a migrated thread and some comments may be shown as answers.

how to set deviceinfo in html5 reportviewer?

2 Answers 50 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Vincent
Top achievements
Rank 1
Vincent asked on 02 Jan 2020, 02:02 PM

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 Answers, 1 is accepted

Sort by
0
Todor
Telerik team
answered on 02 Jan 2020, 02:47 PM

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
0
Vincent
Top achievements
Rank 1
answered on 03 Jan 2020, 01:00 AM

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.

Tags
General Discussions
Asked by
Vincent
Top achievements
Rank 1
Answers by
Todor
Telerik team
Vincent
Top achievements
Rank 1
Share this question
or