I. Overview
1. Problem description
Adding the parameter &format=pdf after the URL of the preview template can export the file in PDF format. If you want to display the PDF file directly on the browser side instead of popping up the download dialog box after entering the URL, how can this be achieved?
2. Ideas
It can be achieved by adding &format=pdf&__embed__=true after the previewed template.
II. Operation steps
1. Preparation
1) Browsers with IE or IE core (such as: 360 Safe Browser-Compatible Mode, 360 Speed Browser-Compatible Mode, Sogou Browser-Compatible Mode, Window of the World Browser, Maxthon Browser, etc.).
2) Install Adobe Reader software.
Reason: When viewing PDF files on the web, only IE and IE core browsers have ActiveX controls.
Note: If it is a non-IE kernel browser, you need to manually open it after downloading, and it cannot be displayed directly in the browser.
2. Effect preview
Take %FR_HOME%\wenapps\webroot\WEB-INF\reportlets\GettingStarted.cpt template as an example to see the effect.
Open the built-in server, enter in the browser: http://localhost:8075/webroot/decision/view/report?viewlet=GettingStarted.cpt&format=pdf&__embed__=true, click Enter, the effect is as shown in the figure below: