Display & Download PNG JPG PDF Document in SFiori Client Android with 3rd Party App for Zoom/additional options

Learn how to display and download PNG, JPG, and PDF documents in the SAP Fiori Client on Android. This guide covers using a third-party app for zooming and accessing additional options for a seamless document handling experience. Ideal for enhancing your mobile document management capabilities.

Fiori Client’s Zoom Options

How can ZOOM options be brought in?
What is the process for opening a document using a third-party application?

The built-in Fiori Client attachment plugin, is the answer.

The code snippet to accomplish the functionality is shown below.

  1. Display the document

Put the code below on the unified uploader’s change event.

var oCore = sap.ui.getCore();
var oFile = oEvent.oSource.oFileUpload.files[0];
if (oFile) {
var vPath = URL.createObjectURL(oFile);
try {
if (oFile.type == "application/pdf") {
// For mime type PDF this below code invokes adobe reader
var reader = new FileReader();
reader.readAsDataURL(oFile);
reader.onload = function() {
window.open(reader.result);
};
reader.onerror = function(error) {
sap.m.MessageToast
.show("Unable to open file");
};
} else {
// For mime type JPG PNG this below code invokes gallery
window.open(vPath);
}
} catch (e) { // Error in case of any failures to be catched }

2. View the document after downloading from Getstream.

try {
window
.open(encodeURI("/sap/opu/odata/Service/AttachSet(Property1='"
+ vValue1
+ "',Property2='"
+ vValue2
+ "')/$value"));
} catch (e) { // Error in case of any failures to be catched }

Shots showing how to operate it.

Launch the Fiori Client App.

Select on browse button

Select an image that requires the user to enlarge before proceeding with any actions.

Zoom options will be accessible as soon as the file uploader’s change function is called.

Select a PDF file to open the PDF app and access the zoom features

See Also: Complete Guide for My Inbox PO Approval Application

Likewise, if you need to use Getstream to open the Adobe Reader or gallery/in-app window. Utilize the download feature. The associated app is automatically invoked based on the backend’s mime type.

I think this post will give you the guidance you need to activate and call the appropriate Zoom feature routines. Please feel free to contact me or post your questions in the comments area below if you need any additional information or if you have any more questions.

you may be interested in this Blog here:-

SAP S/4HANA Cloud Public Edition 2408: A Comprehensive Guide to Product Implementation

5 Methods for Using Your Salesforce Email Sender Reputation: An Story of Redemption

Related Posts

Configuring SAP GUI Transaction in Fiori Launchpad

Are you familiar with setting up the classic SAP GUI T-Code in Fiori Launchpad? Using the robust SAP Transaction on a mobile device wouldn’t that be a better user experience?The…

SAP Fiori Tutorial. Part VI. How to Troubleshoot SAP Fiori Errors?

SAP Fiori Tutorial, It is one thing to grasp the idea and possess theoretical understanding of any technology; it is quite another to put that knowledge to use solving problems…

Leave a Reply

Your email address will not be published. Required fields are marked *

You Missed

Display & Download PNG JPG PDF Document in SFiori Client Android with 3rd Party App for Zoom/additional options

  • By Varad
  • October 8, 2024
  • 2 views
Display & Download PNG JPG PDF Document in SFiori Client Android with 3rd Party App for Zoom/additional options

Configuring SAP GUI Transaction in Fiori Launchpad

  • By Varad
  • October 7, 2024
  • 2 views
Configuring SAP GUI Transaction in Fiori Launchpad

OOP Report Applying ALV Tree Combination and Splitter

  • By Varad
  • October 6, 2024
  • 2 views

SAP Fiori Tutorial. Part VI. How to Troubleshoot SAP Fiori Errors?

  • By Varad
  • October 5, 2024
  • 2 views
SAP Fiori Tutorial. Part VI. How to Troubleshoot SAP Fiori Errors?

Part 11 of Core Data Services: How Do I Use CDS View in the KPI Fiori Apps for Smart Business Services?

  • By Varad
  • October 4, 2024
  • 5 views
Part 11 of Core Data Services: How Do I Use CDS View in the KPI Fiori Apps for Smart Business Services?

SAP Fiori. Chapter 12: SAP Fiori Launchpad Tcode: Uses and Upkeep

  • By Varad
  • October 3, 2024
  • 5 views
SAP Fiori. Chapter 12:  SAP Fiori Launchpad Tcode: Uses and Upkeep