Advertisement
Guest User

Untitled

a guest
Aug 7th, 2020
204
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2. document.addEventListener("adobe_dc_view_sdk.ready", function () {
  3.     /* Initialize the AdobeDC View object */
  4.     adobeDCView = new AdobeDC.View({
  5.         /* Pass your registered client id */
  6.         clientId: "",
  7.         /* Pass the div id in which PDF should be rendered */
  8.         divId: "adobe-dc-view",
  9.     });
  10.  
  11.  
  12.     adobeDCView.registerCallback(
  13.         AdobeDC.View.Enum.CallbackType.GET_USER_PROFILE_API, function () {
  14.             const pr = {
  15.                 userProfile: {
  16.                     name: "John My man",
  17.                     firstName: "John",
  18.                     lastName: "Doe",
  19.                     email: "jdoe@abc.com",
  20.                 }
  21.             };
  22.             return new Promise((resolve, reject) => {
  23.                 resolve({
  24.                     code: AdobeDC.View.Enum.ApiResponseCode.SUCCESS,
  25.                     data: pr
  26.                 })
  27.             })
  28.         });
  29.  
  30. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement