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

Telerik Reporting in pdf

2 Answers 93 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Daniel
Top achievements
Rank 1
Daniel asked on 19 Apr 2017, 04:02 PM

 

 I am working with telerik reporting in pdf there is something I do not want to use is the page to print the pdf .. I just want the page where the pdf is displayed there is the image

var reportProcessor = new Telerik.Reporting.Processing.ReportProcessor();

            var typeReportSource = new Telerik.Reporting.TypeReportSource();

            // reportToExport is the Assembly Qualified Name of the report
            typeReportSource.TypeName = typeof(Reports.Report1).AssemblyQualifiedName;
            var deviceInfo = new System.Collections.Hashtable();
            deviceInfo["JavaScript"] = "this.print({bUI: true, bSilent: false, bShrinkToFit: true});";
            var result = reportProcessor.RenderReport("PDF", typeReportSource, deviceInfo);

            HttpContext.Response.AddHeader("content-disposition", "inline; filename=Ciudadano.pdf");
            return File(result.DocumentBytes, "application/pdf");

 

 


I am working with telerik reporting in pdf there is something I do not want to use is the page to print the pdf .. I just want the page where the pdf is displayed there is the image

I am working with telerik reporting in pdf there is something I do not want to use is the page to print the pdf .. I just want the page where the pdf is displayed there is the image

I am working with telerik reporting in pdf there is something I do not want to use is the page to print the pdf .. I just want the page where the pdf is displayed there is the image

I am working with telerik reporting in pdf there is something I do not want to use is the page to print the pdf .. I just want the page where the pdf is displayed there is the image

I am working with telerik reporting in pdf there is something I do not want to use is the page to print the pdf .. I just want the page where the pdf is displayed there is the image

I am working with telerik reporting in pdf there is something I do not want to use is the page to print the pdf .. I just want the page where the pdf is displayed there is the image

2 Answers, 1 is accepted

Sort by
0
Stef
Telerik team
answered on 19 Apr 2017, 04:46 PM
Hi Daniel,

You can remove the Adobe Javascript from the produced PDF file to avoid having the PDF plugin's Print dialog displayed.
//remove this line
// deviceInfo["JavaScript"] = "this.print({bUI: true, bSilent: false, bShrinkToFit: true});";

Without the Adobe Javascript, if the browser has a suitable PDF plugin, the PDF file will be loaded on screen.

For more details, check How do I display a PDF directly in the browser without exporting first?


I hope this helps.

Regards,
Stef
Telerik by Progress
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
Daniel
Top achievements
Rank 1
answered on 19 Apr 2017, 07:46 PM
Tranks
Tags
General Discussions
Asked by
Daniel
Top achievements
Rank 1
Answers by
Stef
Telerik team
Daniel
Top achievements
Rank 1
Share this question
or