Skip to main content
Participating Frequently
November 2, 2024
Question

Can't fill in Acrobat created PDF in Google Forms

  • November 2, 2024
  • 2 replies
  • 1507 views

I created an Acrobat fill-in form for a group of people to use. They share a Google Drive, so that's where it's saved. But when it's opened there, it can't be filled in. Anyone know why not and how to enable it?

This topic has been closed for replies.

2 replies

Adobe Employee
November 4, 2024

Hi @Pamela36459753liwy  ,

 

Thank you for reporting the issue. Can you confirm if the issue is only faced in Google Forms , or the form is not editable by other users in Acrobat as well ? If it is specific to Google Forms , then it may be a limitation from Google Forms (reference https://support.google.com/drive/answer/9463834?hl=en&co=GENIE.Platform%3DDesktop&oco=1) . Hence to be fillable in Google Form , form might need to be created in the formats supported by them.

 

Regards,

Divya Kumar Singh

Participating Frequently
November 4, 2024

Thanks. I don't think it's opening Google Forms. It opens in a separate window that appears to be just a viewer provided by Google, and it can't be completed there. I did discover there's an "open with" option there that offers--at least for some people--to open it in Adobe Cloud, and it can be completed there. But I don't see any way to save the completed form from there directly back to the Google Drive unless it's connected to File Explorer on the computer--and not everyone may be willing to do that.

There is a workaround--save the file as a copy, then open it in the viewer, from there open it in Adobe Acrobat, and save. But they will have to remember to save it first, so if there's any way to make it fillable in the Google viewer itself, that would be preferable.

Participating Frequently
November 7, 2024

Hi @Pamela36459753liwy,

 

Hope you are doing well. Thanks for writing in!

 

After reviewing the thread, I have some suggestions. 

 

We can call and set up some scripts with Google Drive to save the file directly.

 

We will use Google Apps Script to handle the backend and JavaScript in the PDF to submit the form data.

 

First, let's start creating a project in Google Apps Script:

 

Next, add the below script (Script the already added command lines)

 

function doPost(e) {
  // Get the form data sent from the PDF
  var formData = e.parameter.formData; // The form data is sent as a string (can be JSON or plain text)
  
  // Define the folder in Google Drive where the form data will be saved
  var folder = DriveApp.getFolderById('your-folder-id'); // Replace with your folder ID
  
  // Create a new file in Google Drive
  var file = folder.createFile('form_submission.pdf', formData, MimeType.PDF);
  
  // Return a success message
  return ContentService.createTextOutput("Form saved to Google Drive.");
}

 

 

Once this is done, we will set up the Script.

 

 

 Next would be to add a submit button to your PDF form.

 

  • Then: Select the button tool from the toolbar and create a button on your form;

  • Right-click to choose properties;

  • In the Actions tab, click on Run A Javascript, and click Add.

  • Now, copy the below code:

 // Replace with your Google Apps Script URL
var submitUrl = "https://script.google.com/macros/s/your-script-id/exec"; 

// Collect form data from a specific field (replace "FormDataField" with your actual field name)
var formData = this.getField("FormDataField").value;

// Set up the POST request to send the data
var xhr = new XMLHttpRequest();
xhr.open("POST", submitUrl, true);
xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");

// Prepare data for submission
var params = "formData=" + encodeURIComponent(formData);

// Send the data to the Google Apps Script
xhr.send(params);

// Handle the server's response
xhr.onload = function() {
  if (xhr.status == 200) {
    app.alert("Your form has been successfully saved to Google Drive!");
  } else {
    app.alert("Oops! Something went wrong. Please try again.");
  }
};

P.S: 

  • Make sure your Apps Script is set to allow access to anyone who submits the form (even if they’re not signed in to Google)

  • The script assumes you're sending simple form field data.

  • For security and compatibility reasons, Google PDF Viewer does not execute JavaScript embedded in PDF files. So, you might need to use the Acrobat Cloud viewer to fill in the form.

 

This worked for me on the Acrobat desktop app. Please try it in your working environment and let me know if it helps.

 

-Souvik


Thank you so much for your detailed reply. I'd be willing to try those things, but I won't always be the person creating forms--it's for a non-profit organization, and I'll eventually go off the board. I need to be able to provide simple instructions on how access the form in Google Drive, complete it, and save a copy (as an uneditable PDF) back to the Google Drive--preferably without having to download anything to the device and upload it back (though that would be an acceptable workaround if it's the only way).

It doesn't seem to me this should be all that complicated. I went a step further than I posted previously, saved a copy of my completed form, flattened it, and saved it to Google Drive. That seemed to work except that the flattening process removed two completed fields. (Beating head against wall.) Any ideas why that would happen? 

I'll fill in a clean copy and try those steps again. Any other thoughts in the meantime are appreciated.

radzmar
Community Expert
Community Expert
November 3, 2024

Maybe those people don't use a suitable PDF viewer for your form like Acrobat or Reader?!

Participating Frequently
November 4, 2024

Some don't, but that's the problem. I'm wondering if there's a simple way for them to complete it right there in the Google viewing window so they don't have to have another app or program. I did discover that at least on some systems (still determining if it's true of all), they're given an "open with" option and can choose Adobe and fill it in there in an Adobe Cloud browser window. But I'm going to create a new post about that, because there doesn't seem to be any way there to save it back to the Google Drive unless it's connected in the computer's File Explorer. Again, not everyone does that--they access the Drive only online.

Participating Frequently
November 4, 2024

Correction--I'm ot going to post the save issue elsewhere, because I figured out a workaround as explained in my resply to divyasin below.