Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

close document return to trigger page

New Here ,
Nov 21, 2020 Nov 21, 2020

using light box option ... seems to me that would open on top of whatever page it was triggered from

there are options: "return" and "close" but neither return to triggering page

 

i want to open new api geneterated page and when closed, return to:

 

www.bigopera.com/grid.html

 

 where it was opened from

460
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Nov 22, 2020 Nov 22, 2020

error in URL .... should be www.bigopera.com/grid.html

 

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Dec 03, 2020 Dec 03, 2020

Thanks for using PDF Embed API, you can listen for the event PDF_VIEWER_CLOSE and do the needful on your own. 

To know more about this please see https://www.adobe.com/devnet-docs/dcsdk_io/viewSDK/howtodata.html#basic-events 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Dec 05, 2020 Dec 05, 2020

hmmm... after trying to make sense of all that on the page you linked, made me realize it is far more complicated than i thought   the code on the page does already have "addEventListener"

 


<script src="https://documentcloud.adobe.com/view-sdk/main.js"></script>
<script type="text/javascript">
document.addEventListener("adobe_dc_view_sdk.ready", function(){
var adobeDCView = new AdobeDC.View({clientId: "bf32026bc4ba4ca08bd828108abb5aa7"});
adobeDCView.previewFile({
content: {location: {url: "http://www.bigopera.com/adobePDF/11.19.2020x"}},
metaData:{fileName: "table 11 19 2020"}
}, {embedMode: "LIGHT_BOX", defaultViewMode: "FIT_PAGE", dockPageControls: true, showDownloadPDF: false, showPrintPDF: false, exitPDFViewerType: "CLOSE"});
});
</script>

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Dec 06, 2020 Dec 06, 2020
LATEST

As described in the documentation, you need to register a callback for listening events from PDF Embed API. I have drafted a sample for you.

const eventOptions = {
              listenOn: [ AdobeDC.View.Enum.Events.PDF_VIEWER_CLOSE ],
     }

     adobeDCView.registerCallback(
              AdobeDC.View.Enum.CallbackType.EVENT_LISTENER,
              function(event) {
                     // Do the needful here, redirect to your desired webpage
              }, eventOptions
     );

 Hope this helps your cause.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources