Closed

Modify the java files for PDFtk to get the datatype of a text field on a pdf

This project received 5 bids from talented freelancers with an average bid price of $ USD.

Get free quotes for a project like this
Employer working
Skills Required
Project Budget
$30 - $250 USD
Total Bids
5
Project Description

I have a Linux web server and am creating a php application that works with pdf files. Current I am using pdftk to read all the field names and field types of pdf's that are uploaded to my server.

Everything is working great but the issue I am having now is I cannot tell what the format category (also know as the datatype) is for the text fields. If it is set to "None" then it works like a normal text field I can assign any text to it and wont have any issues. But once someone selects a different value I am having issues.

For example a text field with a format category of "Number" will only allow numbers to be assigned to it. If I attempt to send text to it the field just wont display it. Same issue goes with the format category's of "Percentage", "Date", "Time", "Special", and "Custom". There has to be some way to determine what it is so I can let the user know exactly what type of data they can enter into the field.

I need someone to modify the PDFtk's source files so that it will provide me with the format category of text fields.

Here is an example of some of the exact value I am looking for is: AFSpecial_Format(2) is phone number format. Below are more examples from [url removed, login to view]

AFTime_Format(ptf)
– ptf is the time format:
0 = 24HR_MM [ 14:30 ]
1 = 12HR_MM [ 2:30 PM ]
2 = 24HR_MM_SS [ 14:30:15 ]
3 = 12HR_MM_SS [ 2:30:15 PM ]

AFPercent_Format(nDec, sepStyle)
– nDec is the number of places after the decimal point;
– sepStyle is an integer denoting whether to use a separator or not. If sepStyle=0, use
commas. If sepStyle=1, do not separate.

AFSpecial_Format(psf)
– psf is the type of formatting to use:
0 = zip code
1 = zip + 4
2 = phone
3 = SSN

AFNumber_Format(nDec, sepStyle, negStyle, currStyle, strCurrency,
bCurrencyPrepend)
AFNumber_Keystroke(nDec, sepStyle, negStyle, currStyle, strCurrency,
bCurrencyPrepend)
– nDec is the number of places after the decimal point;
– sepStyle is an integer denoting whether to use a separator or not. If sepStyle=0, use
commas. If sepStyle=1, do not separate.
– negStyle is the formatting used for negative numbers:
0 = MinusBlack
1 = Red
2 = ParensBlack
3 = ParensRed
– currStyle is the currency style - not used
– strCurrency is the currency symbol
– bCurrencyPrepend is true to prepend the currency symbol; false to display on the end
of the number


I would prefer the changes to be made directly to pdftk's source files so that way other developers can access it and use it in other applications rather then just creating a small program to correct the issue I am having with just this application.

Here is a link to the question I asked on stack overflow.
[url removed, login to view]


Please note that I will not create a milestone for this project until a small proof on concept is created. Once it has been created and verifies that this is possible I will then create a milestone so the project can be completed.

Looking to make some money?

  • Set your budget and the timeframe
  • Outline your proposal
  • Get paid for your work

Hire Freelancers who also bid on this project

    • Forbes
    • The New York Times
    • Time
    • Wall Street Journal
    • Times Online