|
filling form fields with the DLL
|
|
12-14-2009, 10:51 AM
Post: #1
|
|||
|
|||
|
filling form fields with the DLL
Hi all,
I already mentioned that the help file focuses a lot on the command line and rather not on the DLL didn't I? Ok, I have a PDF form and try to set programatically some value in a field. The only function barely suggesting this seems to be setFDFField() except for the fact that: - it talks about a FDF which I'm NOT using (PDF form though) - it doesn't specify the calling parameter format (is it the weird FDF syntax string? can't that be wrapped in something friendlier like field name and value? what about if I'm not using a FDF?) I'm not a PDF crack so it might be that FDF - PDF is the same thing. But maybe not, so I'm left here with the guesswork... so to sum it up I need to: 1. load a PDF form (that's the easy part, I can do that) 2. optional: read all the field names from it (getting a FDF file out of my PDF form then juggling with it is not an option, I'm not into weird conversions) 3. set some field values in it once I know the field names 4. whatever - merge it usually (this part I also know already) Thanks a lot for your suggestions, M |
|||
|
12-14-2009, 12:08 PM
Post: #2
|
|||
|
|||
RE: filling form fields with the DLL
(12-14-2009 10:51 AM)mario_pdf Wrote: Hi all, Again, confused on what your asking for. See the "data files" section in PDF Meld docs. It may clear up for you as to what you need to populate the fdf fields for a document. Pat Gorney pgorney@fytek.com |
|||
|
12-15-2009, 01:31 AM
Post: #3
|
|||
|
|||
RE: filling form fields with the DLL
(12-14-2009 12:08 PM)pgorney Wrote: Again, confused on what your asking for. See the "data files" section in PDF Meld docs. It may clear up for you as to what you need to populate the fdf fields for a document.I am asking about PDF Forms, NOT FDF files. Are you trying to tell that FDF=PDF Form? Or that I MUST use FDF to fill into a PDF Form? Because I don't want to use a FDF, it looks bad and primitive and dirty. |
|||
|
12-17-2009, 02:23 AM
Post: #4
|
|||
|
|||
|
RE: filling form fields with the DLL
Hi, any update here?
|
|||
|
01-27-2010, 07:21 AM
Post: #5
|
|||
|
|||
|
RE: filling form fields with the DLL
Hi, any update here?
Sorry to insist, but if even you the developers cannot tell how to use the product, why would one buy it??? |
|||
|
01-28-2010, 05:56 AM
Post: #6
|
|||
|
|||
| RE: filling form fields with the DLL | |||
|
01-31-2010, 11:32 PM
Post: #7
|
|||
|
|||
|
RE: filling form fields with the DLL
Hi.
Waiting for the update............ cheap dsi r4 |
|||
|
02-01-2010, 07:34 AM
Post: #8
|
|||
|
|||
RE: filling form fields with the DLL
(01-28-2010 05:56 AM)pgorney Wrote: No updates.. What does your fillable pdf form look like? Send us a copy of it. It's no special PDF: I go into Acrobat, create a PDF form with a text field, then save it. No use to attach it: I have no issues with some file, but I can't find the WAY of filling form fields. Look, I could work very well with iText like this: Code: PdfReader initReader = new PdfReader(sourcefiles[f]);Now how do I achieve the above with PDFMeld? In C++ of course. |
|||
|
03-01-2010, 05:39 PM
Post: #9
|
|||
|
|||
RE: filling form fields with the DLL
(02-01-2010 07:34 AM)mario_pdf Wrote:(01-28-2010 05:56 AM)pgorney Wrote: No updates.. What does your fillable pdf form look like? Send us a copy of it. There are several methods that can be used to fill in or extract form field information in PDF Meld. Say you have a PDF with a field called Text2 and you want to set the value to abc123. You can do something like this: ostringstream sstr; sstr << "<< /T (Text2) /V (abc123) >>"; string sFdfLine = sstr.str(); _bstr_t thing = m_pPDF->setFDFField( sFdfLine.c_str() ); _variant_t outval = m_pPDF->buildPDF(); Note the parenthesis around the field name (Text2) and the value (abc123) above. Use a slash in front of any parenthesis in the value if you want to use it as a literal. Like this: (my \(text\)) setFDFField sets one or more fields so you can pass something like this to set 2 fields: sstr << "<< /T (Text2) /V (abc123) >> << /T (Text3) /V (myvalue) >> "; or you may call setFDFField multiple times with different name/value pairs. Other methods you may want to use are: setFDFFileIn(path-file) - set to the path and name of a file on disk containing the field/values. This loads in the values from an existing file on disk. setFDFFileOut() - creates an FDF file based on the input PDF. In this case, your output file (set with setOutFile) should have an extension of .fdf. You can then modify the file and load it in with setFDFFileIn. getFDFFields() - returns the FDF file from the input PDF. Call this method after you call buildPDF however as buildPDF is what reads through the input PDF and performs the processing. This gives you the current fields/values as a variable you can use in your code then pass it back into the PDF using setFDFField. You only need to use this method if you need to read the fields/values before making changes. Regards, Mike Bernardo FyTek, Inc. |
|||
|
03-02-2010, 06:36 AM
Post: #10
|
|||
|
|||
|
RE: filling form fields with the DLL
Here's the test code I use:
Quote:IPDFMeldPtr pTestPDF(__uuidof(PDFMeld)); Pat has already the sample input file I'm using. What am I doing wrong? |
|||
|
« Next Oldest | Next Newest »
|

Search
Member List
Calendar
Help


