![]() ![]() On running the macro you get a message box prompt to paste the folder path in.Īlso this method seems to avoid the issue the OP was having. Set pdDoc = CreateObject("AcroExch.PDDoc") Set avdoc = CreateObject("AcroExch.AVDoc") If MyFile Like "*.PDF" Or MyFile Like "*.pdf" Then Annotation or form flattening refers to the operation that changes annotations (such as markup, widgets, 3D models, etc. Just today the plain PDF has grey highlighting everywhere the data fields (blue boxes) were. The following code to create a PDF using another PDF as a source (the one I want to flatten), it writes the text boxes form as well. Mypath = InputBox("Enter the path to the folder where the PDF files are I have been successfully flattening PDF documents with data fields into plain PDFs for the last 6 years Using version 11 and then DC 2015. When I print a PDF from any of my source PDFs, the file size drops and removes the text boxes presents in form. Annotations used to mark up document content. Upload the file and choose the Convert entire pages option. 12 minutes to read The PDF Document API supports the following annotation types: Link Annotations A hypertext link to a URI or a destination (a reference to a page with specific view parameters). Merge PDF, split PDF, compress PDF, office to PDF, PDF to JPG and. I wanted to flatten all PDF files in a folder and this seems to do the trick. How To Flatten a PDF File Online for Free Go to our PDF to JPG tool. iLovePDF is an online service to work with PDF files completely free and easy to use. ![]() Just thought I would add my solution in case it helps someone. I modified the script to get the page count and pass it to flattenPages() per joelgaraci's suggestion, as well as passing in the PDF path to the function: Sub flattenPDF(pdfPath As String)īut this got the same result: the annotations only flatten after I run the script twice. The code runs successfully, but then when I open the PDF, all the annotations can still be edited-the flattening should have made them read-only, right?Įdit: I changed the first parameter of AcroDoc.Save from "1" to "PDSaveFull", and now the annotations are flattened if I run the script twice. Set AcroDoc = CreateObject("AcroExch.PDDoc") Set AcroApp = CreateObject("AcroExch.App") Path = "C:\Users\userID\Desktop\thisfile.pdf" The flattened PDF file will be automatically open in PDFelement and you can save it on your computer. ![]() Click it and the program will flatten the annotations, form fields, and layers in PDF. I'm trying to call the Acrobat Javascript API from VBA to flatten all annotations in a document, using the following code: Sub flattenPDF() To flatten a PDF, you can find the 'Flatten' button under the 'Tool' tab. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |