Skip to Content
0

SAPUI5 PDFViewer Source property doesn't accept base64 pdf path?

Oct 31, 2017 at 03:24 AM

275

avatar image
Former Member

Hi,

Thanks in Advance,

I am using SAPUI5 PDFViewer in my application. When I set the source property to the pdf file path, it is working fine. But when I set the base64 pdf value to the source property, the pdf is not visible.

Kindly provide any solution, or is there any way to extend the sapui5 control to adapt to the base64 pdf value as source.

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

4 Answers

Irfan Gokak Oct 31, 2017 at 09:28 AM
-1

Hi Ajit,

Use it as following it'll work.

<iframe src="data:application/pdf;base64, yourBase64ContentGoesHere" />
Share
10 |10000 characters needed characters left characters exceeded
Arjun Biswas Oct 31, 2017 at 09:34 AM
0

Define your PDFViewer like this :

<PDFViewer source="data:application/pdf;base64,{/Source}" title="{/Title}" height="{/Height}">
				<layoutData>
					<FlexItemData growFactor="1" />
				</layoutData>
			</PDFViewer>

Whenever you use base64 encoded data, you have to mention the data parameter while rendering the data in the browser.

Hope this helps,

Regards.

Share
10 |10000 characters needed characters left characters exceeded
avatar image
Former Member Mar 06 at 01:58 PM
0

did you find any solution to this problem?

I'm facing the same issue and the two answers above don't help

thanks

Share
10 |10000 characters needed characters left characters exceeded
Gunnlaugur Th Einarsson Mar 14 at 08:40 AM
0

Hi Ajit Kumar B.

Did you find or get a solution for this?

Share
10 |10000 characters needed characters left characters exceeded