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

Unable to pre-load data

New Here ,
Sep 23, 2023 Sep 23, 2023

I am unable to preload data on AdobeDCView

 

 document.addEventListener("adobe_dc_view_sdk.ready", function () {
        var adobeDCView = new AdobeDC.View({clientId: "XXXXXXXXXXXXXX", divId: "adobe-dc-view"});
        adobeDCView.previewFile({
            content: {location: {url: "http://localhost/test.pdf"}},
            metaData: {fileName: "test.pdf"}
        }, {});

        // Data you want to pre-fill
        adobeDCView.registerCallback(
            AdobeDC.View.Enum.CallbackType.PAGE_VIEW,
            function () {
                // Data you want to pre-fill
                var prefilledData = {
                    "emp_fn": {value: "John"},
                    "emp_ln": {value: "Doe"}
                    // ... any other field names and their values
                };

                // Set the form fields with the prefilled data
                adobeDCView.setFormFields(prefilledData);
            },
            true
        );

    });//event listener

 

424
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
no replies

Have something to add?

Join the conversation