Home
Analytics
Embed pdf into report
denislagod
Hello everybody
Is possible at all? If Yes then how? May be using API?
Thank you in advance,
Denis
Find more posts tagged with
Comments
CBR
The easiest solution would be to add a hyperlink to your report that opens the PDF file.
Or do you need to add the content of a PDF file to an existing report? This is not possible using BIRT.
If you are generating the BIRT report as PDF you can merge your existing PDF with the BIRT PDF file using iText or any other PDF library that works with java.
johnw
Using a text element, set the type to HTML, and use the <object> tag.
denislagod
I did not found how to do it/<br />
Can you show an example of using this tag with a .PDF file<br />
<blockquote class='ipsBlockquote' data-author="'johnw'" data-cid="98780" data-time="1334080235" data-date="10 April 2012 - 10:50 AM"><p>
Using a text element, set the type to HTML, and use the <object> tag.<br /></p></blockquote>
johnw
I'm sorry, you are right. The Text element strips object tags. You can use the embed tag.<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'><embed src="http://pdfobject.com/pdf/sample.pdf#toolbar=0&navpanes=0&scrollbar=0" width="500" height="375"></pre>
<br />
This will put the PDF in your report.<br />
<br />
Be sure to use an external browser to preview. The Eclipse embedded browser will not show the PDF. But it will work fine in an external browser, in both HTML and the Example Web Viewer.
denislagod
And if it is a local file?
I placed example of your tag in Text. And generated a resulted PDF. It didnt work
johnw
Did you use an external browser?
denislagod
I need to generate a PDF. I did in external browser but I have lost a chart.
CBR
As far as i know the embed tag is a browser thing, so this only works when viewing the report in HTML. iText will just ignore the tag (so no PDF embedded when you generate the report as PDF).
johnw
You're correct. The embed tag will only work in a browser. In order to do this in PDF, you will need a custom PDF emitter. I've done this before for clients, and its not hard to do, but its not something that can be done out of the box.