Copy link to clipboard
Copied
A customer sends drawing files to us. We need to add text information on the pdf drawing file in order to print the drawing, and then process it through our facility. The information we add comes from SQL, such as purchase order, date needed, etc. We process 2-300 drawings at a time. Rather than mark each print by hand, I would like to use an SDK or some other tool you suggest to open up the file, add the text, and print the file using Visual Basic 2015 by Microsoft. What do you suggest? What do I need to buy? I would like to see a sample first or hear from someone who has done that before I buy.
".. Acrobat is absolutely not for server use .. "
That is correct, but I read only that the automation of a process is wanted and therefore OLE and JS is integrated into Acrobat.
@FMPeck
Here you will find a simple basically example how you can use the addField method.
http://stackoverflow.com/questions/29085466/adding-page-numbers-to-pdf-through-vba-and-acrobat-iac
The example add fields at the footer for date, filename and page number, but can also be used for other text and can also be better for
...Copy link to clipboard
Copied
‌This sounds like an automated process run on receipt of the files - not by someone sat at a screen. Is that correct?
Copy link to clipboard
Copied
Yes. The manual process opening each file would be ridiculously long to accomplish. The customer could send several revisions. It is important to mark the print with a corresponding purchase order and date. The SDK should provide commands something like: add text box, text box size, textbox text equals, text box font size, text box x location, text box y location etc. (Microsoft's operating system can be set to open the pdf's in reader or acrobat.) Code on our software, via the SDK or other development media you suggest that works, could command that a text box be placed on the print, and then printed, much like you can do already with Word and Excel.
Thank you for your time and attention.
Copy link to clipboard
Copied
Hi,
you need the full Adobe Acrobat Version for that.
Look into the Acrobat SDK, Section: "Interapplication Communication" to learn how you can control Acrobat via VB/VBA and how you can work with the JavaScript Object (JSO).
Then have a look into the "Acrobat JavaScript Scripting reference" and look at the
Doc Object with commands like .. addField and at the
Field object to set the properties of the fields.
That should do what you want.
HTH, Reinhard
Copy link to clipboard
Copied
However... Acrobat is absolutely not for server use, it's for use by a person sat in front of it. Something outside Adobe's product set is indicated, but I don't know what.
Copy link to clipboard
Copied
".. Acrobat is absolutely not for server use .. "
That is correct, but I read only that the automation of a process is wanted and therefore OLE and JS is integrated into Acrobat.
@FMPeck
Here you will find a simple basically example how you can use the addField method.
http://stackoverflow.com/questions/29085466/adding-page-numbers-to-pdf-through-vba-and-acrobat-iac
The example add fields at the footer for date, filename and page number, but can also be used for other text and can also be better formatted. I wrote that in VBS. So you can copy the code into Notepad, save it as test.vbs and execute it with a double click.
If that works with your customer pdfs you can write on these pdfs whatever you want.
HTH, Reinhard
Copy link to clipboard
Copied
Most instructive! (That is why you get the big bucks!) I was worried about the operating system of the server, etc. To get around that I wrote a Visual Basic "Datagridview" to snatch the data I need to place on the customer's drawing so that it ran on a desktop. I put that data in the Form's Text property. Heretofore, I was capturing screenshots with GDI+ while using the Adobe Reader provided by Microsoft. The advantage to that was it could accept Jpeg, BitMaps, cellphone pictures of prints (very handy), and other localized and zoomed screenshots from customer's whose CADs do not export construction prints in a universal or portable data format. The disadvantage to all of the code construction was it reinvents the wheel, especially the print driver, and therefore; it is a bad practice to maintain code when the file name extension can be used to provide exactly what you need. What you provided gives me the warm fuzzy feeling that it can be done. I presume that buying Adobe something or other(????) enables or registers the SDK that allows access to each file. That is confusing to shop for the right product. Why can't you just buy the SDK directly and let it register the SDK Servies, Dll's, ActiveX, Com, or other programming elements? In addition, does this mean that every computer in the company that runs the software must also have a copy of Adobe Pro installed, or will it distribute?
Copy link to clipboard
Copied
... capturing screenshots with GDI+ ... clever solution, but at least hard at the border of the AR Eula.
... that every computer in the company that runs the software must also have a copy of Adobe Pro installed ....
That's right (no server use of Acrobat). You may centralize the task to one or two places if possible or look for other solutions.
Adobe offers only a multi thousand dollar server tool, which make only sense for big companies.
If a solution with setting your data as watermarks is already enough for you (see the first answer under stackoverflow)
then maybe you can use the free command line tool PdfTk, which can handle watermarks.
Other solutions you may find in the area of iText or Ghostscript, but Acrobat also has advantages, for that I use it - as single user tool 🙂
Good luck, Reinhard
Find more inspiration, events, and resources on the new Adobe Community
Explore Now