![]() |
| Adobe Forums » Software Discussions » Adobe Acrobat » Adobe SDK and Programming » Use of text Boxes to programmatically update a PDF form |
| Tags: |
![]() |
| LinkBack | Thread Tools | Display Modes |
|
|||
|
Hello all;
I am a very experienced programmer but I do not have much experience with PDFs , Acrobat, etc. I have come up with what I believe is my best solution based on what I have learned about PDFs and Acrobat. I am trying to do what seems , to me, like a very simple thing. Basic Programming Logic .... Develop a C# program that runs on a local client. Reads in an existing PDF file - which has been authored using Acrobat 9.0 Professional to have Text boxes that have meaningful names ... ie - recognizable names. Read some huge data file in EDI - or XML format - from some source or another. Update the "template" PDF file using this information by locating the appropriate text boxes named in the PDF file itself and print out as many pages of the PDF form as needed with the electronically received data. Basic Algorithm Logic I create a linked list in memory of all the internal segments of the PDF - carefully preserving all the necessary information and using the recognizable names of the text boxes - I re-write only the information that will appear in the text box and create a newly created and updated version of the PDF file and print it out. Repeating this for as many times as needed. This is my expected approach . Is there any reason why this should not be done or used ? Thank You , in advance, for your assistance. |
|
|||
|
Thank you for the reply.
I have taken a look at the PDF Reference sixth edition Adobe® Portable Document Format So have all the other product developers out there that are trying to sell their wares in the market place. I have noted the plethora of products, offerings, hype and the like about accomlishing a very simple undertaking for PDF files(IMHO). I do not want to take the ability to author PDF files away from Adobe - that is why i am using the Acrobat professional 9.0 Product in the first place - to author documents and to render them in a form that is useful to me. I am hoping to use the PDF file to act as a human readable container to store what would otherwise be quite terse reading to the average person . I am simply looking for the best approach - to solve a very clear-cut , real world problem such as this - How to take the data I have ... in whatever form it comes to me in ... (this can vary greatly and be a mix of several forms depending on the source) - from CSV - to XML - to Excell spreadsheets , etc - and under program control - update a simple (I repeat - Simple ) PDF form - with a few Text boxes that are added for tracking specialized information and internal filing requirements , etc. If there is a way to do this using the SDK - that would be great. |
|
|||
|
If I'm correctly understanding your very broad and general requirement...
This could be accomplished with an XFA form with an flowed, repeatable subform that contains known-name fields for your data, and filling those fields with data from an XDP (which is an XML format). The only thing you would need to do yourself is design a way of converting any input format you want to support to XDP so that it can be merged with the XFA form. Apologies if I missed the point. |
|
|||
|
this is a very likely possibility - I could easily perform the necessary promotion of all data to a known format requirement - , in this case XDP -
This would probably require the use of a schema to inform the XFA form of the data bindings with respect to XDP. This sounds promising Is this something that the SDK will allow me to do ? I am probably being overly generalized in my description anyway. I do appreciate your prompt responses and accuracy . |
|
|||
|
This would probably require the use of a schema to inform the XFA form of the data bindings with respect to XDP No, the field names and their respective subform repetition number are all part of the XDP data. Is this something that the SDK will allow me to do ? No, the SDK does not provide any methods to convert various data types to XDP. You would have to design this process yourself using libraries external to the SDK. Once you have the XDP data, you can use the SDK to merge this with the PDF. |
|
|||
|
I see -
Isn't there an exisitng plug-in or other facility within the current Acrobat reader to read XML data ? I just tried saving off saving off an exsting PDF file as xml using Acrobat 9.0 professional using <file><Save As Xml> and it worked - the output was realistically XML data - with a schema , etc. and recognizable heirarchical relationships, etc. but it was not readable .... Isn't there an existing Adobe facility which allows it to read in the xml format that it creates ? This is quite close to what I am trying to implement. I'll bet that the developers have this little item at their disposal and the marketing department isnt even aware of the market potential - If not , then I would like to suggest a new, inexpensive (add-on , plug-in, etc) enhancement to the Acrobat reader - A utility that will read in the XML data format that Acrobat Professional generates ... I am being quite serious - there is a great need for this and it would serve the needs of your already existing clientelle - quite nicely . (namely --- me) ![]() I hope that you can either - pass this along to the marketing groups -- (I volunteer to Beta the software) or pass me along to the required Third Part you have alreeady mentioned ... (I am hoping for Beta status ) Thanks for the help Cheers |
|
|||
|
I am learning a great deal about the Adobe XDP implementation - Thank You very much.
Is Acrobat 9.0 Professional capable of producing XFA forms - or is this only available some other way ? |
|
|||
|
Is Acrobat 9.0 Professional capable of producing XFA forms - or is this only available some other way ? XFA Forms are produced by Adobe LiveCycle Designer. LiveCycle Designer ES 8.2 gets installed with Acrobat 9.0 Pro (on a PC - there is no Mac version of LCD). |
|
|||
|
Wow - this is now getting good
so , I can actually create the XFA forms Can you direct me to some information on the Form Data Integration Service - ? This seems to be the general direction I am heading here Should I go over to the Live Cycle ES Developer forums ? By the way - you are doing very well helping me and I am quite pleased with your help . Cheers |
|
|||
|
Should I go over to the Live Cycle ES Developer forums ? If you want information on developing the forms themselves, this would be a good idea. You'll most likely get a faster, more knowledgeable response there for anything XFA-related. It also helps keep the forums cleaner for everyone. Can you direct me to some information on the Form Data Integration Service - ? I'm not entirely sure what you mean by this, but in the JavaScript for Acrobat API Reference, you would want to look at the Doc.importXFAData() method (especially at the security restrictions listed for this method). |
![]() |
| Thread Tools | |
| Display Modes | |
|
|