Skip to main content
Participating Frequently
July 26, 2018
Answered

Convert fillable pdf to read only using vba

  • July 26, 2018
  • 4 replies
  • 5441 views

Hi I have a fillable pdf with information. I want to convert the fillable pdf to read only programmatically using vba. Is it possible to do so? If so can someone help me with the code?

This topic has been closed for replies.
Correct answer Bernd Alheit

This is not possible with VBA.

4 replies

Legend
July 27, 2018

Ok since you just keep repeating the same word without explaining it, please explain what you would do to make this happen manually (not in a program).

Participating Frequently
July 30, 2018

Sorry i couldn't explain this better. I'm showing you the manual steps.

Step1

Use Adobe Acrobat to open the PDF file you want to restrict as Read-Only. You can adjust security settings only after you convert a file to a PDF.

Step 2

Open "Properties" under the File menu. In the new window that opens, select "Security."

Step 3

Select "Password Security" in the dropdown menu for "Security Method." This is the simplest method to create a read-only document. A new window opens for Password Security Settings.

Step

Leave unchecked the option to require a password to open the PDF if you don't want to restrict anyone from reading the file.

Step4

Checkmark the option under Permissions to "Restrict editing and printing of the document." Enter a password that will be required to make any changes in the file or its security.

Step5

Select "None" in the drop-down options next to "Printing Allowed:" to prevent printing. Choose "Low Resolution (150 DPI) to allow low quality printing.

Step6

Select "None" for "Changes Allowed." Your other choices include allowing a viewer to fill in form fields and add comments with attached notes.

Step7

Leave unchecked the option to enable copying of text, images and other content. Then click "OK." In a new window, verify your password to enable the security settings

Bernd Alheit
Community Expert
Bernd AlheitCommunity ExpertCorrect answer
Community Expert
July 30, 2018

This is not possible with VBA.

Legend
July 27, 2018

setting form fields from VB is certainly possible. You mean unfillable? Or do you mean something else by uneditable? Read only is certainly something else.

Participating Frequently
July 27, 2018

uneditable.

Legend
July 27, 2018

So you want the form fields to either not be fillable or to no longer exist, replaced by regular text (the difference is hard to see). In Acrobat (not Reader I think) you can use JavaScript to "flatten" the form.

Participating Frequently
July 27, 2018

No. There are empty fields. i want to fill them using vba and make it un-editable (read only).

Legend
July 26, 2018

Please define exactly what you mean by “read only“. Perhaps describe what you would do to make this change manually.

Participating Frequently
July 27, 2018

So i want to print data into a pdf and make it read only meaning the data cannot be changed manually after the data is inserted programatically.