Trying to view pdf file. Toolbar is showing differently in different browsers. Is there any way to hide this toolbar in all browsers.
Code in .cshtml file:
<div id="zoomOut">
<object data="@Url.Action("ViewFinalReport", new { Id = @ViewBag.FileName, SystemId = Model.SystemId, InspectionReportId = Model.ReportId })" type="application/pdf" width="900" height="650">
</object>
</div>
Code in controller:
public FilePathResult ViewFinalReport(string Id, int SystemId, int InspectionReportId)
{
string path = "";
string filePath = "";
string customerFolderName = "";
SystemInspectionReport SystemInspectionReport = new Models.Objects.SystemInspectionReport();
TestSoln.Models.Objects.SystemInspectionReports SystemInspectionReports = new Models.Objects.SystemInspectionReports(SystemInspectionReport, new BaseParams() { customerId = CustomerId, userId = UserId, timeOffSet = TimeOffSet });
string FileName = SystemInspectionReports.GetInspectionSystemReportFileName(SystemId, InspectionReportId, true);
DataTable dataTable = GetCustomerDetails(CustomerId).Tables[0];
if (dataTable.Rows[0]["Folder"] != DBNull.Value)
{
customerFolderName = dataTable.Rows[0]["Folder"].ToString();
}
path = HttpContext.Application["FileFolder"].ToString() + "\\" + customerFolderName + "\\InspectionReports\\" + SystemId + "\\" + InspectionReportId + "\\FinalReport\\" + FileName;
filePath = new AppSettings()[AppSettingsKey.FileLocation].Value + path;
return File(filePath, "application/pdf");
}
I can view the pdf in all the browsers. But the problem is that toolbar shown differently in different browsers. So I want to hide the toolbar. Any idea??