Converting editable to non-editable fields using Ghostscript

Asked By 0 points N/A Posted on -


Can any one tell me how do I convert editable fields of my PDF file to non-editable fields of PDF file? How can I crop a PDF file using the Ghostscript?


Answered By 0 points N/A #108486

Converting editable to non-editable fields using Ghostscript



Hello Daniel,
If you are using Adobe PDF Writers or Adobe Acrobat reader then you may follow the following steps to make the editable fields to non-editable fields:
1. Open your file. 
2. Go to File menu and select Properties. 
3. Select Security tab and then select Security method. 
4. Then choose password security. 
5. A new window will be open and you will have to select Restrict editing and printing of the document. 
6. In Change allowed option you will choose Commenting, filling in form fields.
7. Enter a password and confirm it. 
8. Press OK. 
9. Save the document. Now your editable fields will be non-editable. 
For using ghostscript follow this:
The measurement unit for PDF is the same as for PostScript: it's called a point [pt]. 
72 points == 1 inch. 
Say you are using A4 size page then the dimensions will be like this; 
595 points width == 210 millimeters,842 points height == 297 millimeters
If you want to crop off then, left edge: 24 points == 8.5 millimeters, right edge: 36 points == 12.7 millimeters, top edge: 48 points == 17.0 millimeters, bottom edge: 72 points == 25.4 millimeters. 
So the Ghostscript command will be:
gswin32c.exe ^ 
-o cropped.pdf ^ 
-sDEVICE=pdfwrite ^
-c "[/CropBox [24 72 559 794] /PAGES pdfmark" ^ 
-f uncropped-input.pdf
Answered By 565025 points N/A #108487

Converting editable to non-editable fields using Ghostscript


Making a PDF form non-editable means locking the PDF file so nothing can be modified in its contents. Here’s how you can do it in Adobe Acrobat Professional if you have this. Start Adobe Acrobat Professional then load the PDF file you want to convert. Fill out the necessary fields in the form. When you are finished, click File, select “Save a Copy”, and then save your file.

Close the current form but don’t save it because it will overwrite the original file. After that, open the PDF file you just saved. Next, click Advanced then go to Security then select Show Security Properties. In Document Properties window, click Security. Set Security Method to Password Security. In Password Security Settings window, check “Restrict Editing & Printing of the document”.

Set the password to lock the file. In Printing Allowed, select “high resolution”. Finally, click OK and then Save. And that’s it. The PDF form is now non-editable unless you have the password. On the other hand, if you want to use Ghostscript to crop a PDF file, you can follow the steps in the previous post.

In addition to the previous post, the “^” symbol or string will not work on PDFs with predefined /CropBox values. One method to go around it is to change the /CropBox string to /cROPBoX for all the pages. This change in the case of the string effectively disarms the cropbox setting.

Login/Register to Answer

Related Questions