Dynamic PDF Generation from HTML form tool - html

I would like to create a service that would take 2 fields (name & company name) from an HTML form and place it in a PDF document (a completion certificate that the user can print/save etc.)
How would you recommend doing this?

It'll depend on how your PDF has been constructed. One way is to create your PDF with active form fields to begin with. Then you can simply insert the data into the respective fields programmatically using an SDK that supports form field population. The Document module of our EasyPDF SDK tool does just that if you're looking for this feature in a commercial tool:
http://www.pdfonline.com/easypdf/epsdk_manual/index.htm?page=reference%2Fpdfdocumentsdk%2Fpdfdocument%2Fdescription.htm
If your PDF doesn't have form fields, however, then you may wish to insert text into it instead by specifying the data to be inserted and the XY coordinates where it ought to go. EasyPDF SDK also supports this via calls such as AddPDFText() and similar:
http://www.pdfonline.com/easypdf/epsdk_manual/index.htm?page=reference%2Fpdfprocessorsdk%2Fpdfprocessor%2Fm_addpdftext.htm

Related

Saving Unity GUI fields

I'm new to Unity's native GUI (used to use NGUI / iGUI) and was wondering whether you can have fields or input from the native UI save to a CSV file? If that is possible, can you have multiple iterations of a build open and have OnButtonDown, an entry saved per user to the same csv file?
Literally just wanting to know whether Unity UI has that capability.
Cheers!
That wouldn't be a Unity feature or even a UI feature, but if you design your program correctly (single access to the file at one time, append instead of overwrite), then yes, you can get the functionality that you want.

Watson Conversation dialog for large number of entities?

I currently have a chat bot that has an entity for each stock symbol. There are over 3,000. For my dialog I want to be able to detect questions like #get #price #stockSymbol. Is there a way to deal with a large number of entities without writing an if statement for each one?
You are only allowed to have 100 entities in a single workspace. However those entities can have 100,000 values.
So you could create an entity called #StockSymbol and then each value would be the Stock identifier (eg. IBM).
So you would only need one IF statement to determine it is a stock, then pass back the entity information to your calling application to take action on the value.
To put this in programatically, if it is a one time thing you can create a CSV file like the following:
StockSymbol,IBM
StockSymbol,MSFT
StockSymbol,APPL
and so on. Then import that entity file. Alternatively you can use the workspace API to update an already deployed workspace.
I am sorry to say there is no process within the Conversation Service UI that has an automatic dialog creation method. In cases like this, many teams create an external script that can read a file with your entities in it, and then creates a workspace json file with the required dialog nodes. The workspace json file is a relatively simple format, and I have found you can easy merge any new json file into an already created workspace. In fact with the new API's it even possible to load the new elements into a running workspace. ( although if new to this, create a duplicate ws, and merge into this one, or download and merge via a good editor. )

Drop down menu fields in ArcMap shapefile

I need to create shape file in ArcMap that have drop down field with predefined variables (some of them had 3 variables, some have more than five).
Is it posible to create that type of shapefile?
This need's to me to prevent different user to input different type of information about ownership of companies, type, structure, material. So if I don't have predefined variables in the fields they will put different text. ex. material=wood, some will put "WOOD", "Wood", "Wod" and etc.
What you're referring to is a coded domain, where you store 1 in the attribute and there's a domain table that informs the application that 1 = wood.
A shapefile doesn't have the ability to handle coded domains.
However, a geodatabase does. Try that instead of a shapefile!
As stated in another answer to this question, your best bet is to create a file geodatabase (.gdb) with the data you're working with using Export from the ArcMap menu and on doing so, right-click and select Properties to add new values that you want to be the only available options for users of your map or application.
See the link below in the ArcGIS resources for more information about domains and how to code the values you want.
http://desktop.arcgis.com/en/arcmap/10.3/manage-data/geodatabases/creating-new-attribute-domains-creating-a-new-code.htm

Pdf form fill with mysql data

I have pdf form, Which need to fill by mysql data. Is it possible?. Can some one share some examples?. Html forms and convert then to pdf forms are useless for this purpose because i must need pdf form should be filled.
Thanks In Advance.
There are several ways to do it. Which one will be the most appropriate one depends on the actual workflow, the tools available, how often this has to happen etc.
Among the possibilities, we have:
• exporting an FDF from the database: FDF is the Forms Data Format which is native PDF, and is described in the PDF description (as well as ISO 32000). FDF is a structured text file, which means that it is possible to assemble it in MySQL. This FDF will then be imported into the blank PDF form.
• the same as above, but using XFDF, which is an XML representation of FDF.
• exporting a tab-delimited file from the database, and importing it into the form as a file attachment. According logic in the form reads in the tab-delimited data and fills it into the according fields.
• connecting to the database using SOAP. Appropriate logic in the form will take the data and distribute it accordingly to the fields.
• (for bigger volumes) create FDFs as above, but then use a server-side form filling application, such as FDFMerge by Appligent.
As said, the approach to be used depends on the project and its circumstances.

How to extract data from a PDF?

My company receives data from an external company via Excel. We export this into SQL Server to run reports on the data. They are now changing to PDF format, is there a way to reliably port the data from the PDF and insert it into our SQL Server 2008 database?
Would this require writing an app or is there an automated way of doing this?
As already mentioned - you will have to write an app to do this, but ideally you would be able to get the raw data from the external company rather than having to process the PDF.
However, if you do want to extract the data from the PDF, I've used iText and found it to be very powerful, reliable and most importantly - free. It comes in Java and .Net flavours - iTextSharp is the .Net version. It allows you to programatically manipulate PDF documents and it will expose the contents of the PDF to the application that you write.
It all depends on how they've included the data within the PDF. Generally speaking, there's two possible scenarios here:
The data is just a text object within a PDF. You'll need to use a tool to extract the text from the PDF then insert it into your database.
The data is contained within form fields in a PDF. You'll need to use a tool to extract data from the form fields and insert it into your database.
Hopefully scenario #2 applies to you because this is precisely what PDF forms are designed for. Scenario #1 is really just a hack that you'd only use if you didn't have any other options. Extracting plain text from a PDF isn't as easy or accurate as you might expect.
If you're receiving a PDF form then all you need to do is match up the right fields in the PDF form with the corresponding fields in your database and then suck in the data. This process could be entirely automated if you wrote your own application.
Would this require writing an app or
is there an automated way of doing
this?
Yes, both of these options would require writing an app or buying an app. If you write your own app then you'll need to find a third-party PDF library that supports retrieving data from form fields or extracting text from a PDF.
Disclaimer: I am affiliated with the makers of ByteScout PDF Extractor SDK tool
Just wanted to share some additional real-life scenarios for text data extraction from PDF:
Scanned image with no searchable text: should be processed by OCR engine (like free Tesseract from Google)
XFA forms: it is the subset of PDF which is supported mostly by Adobe tools. But the data can be extracted as XML data with low level PDF processing tools like iTextSharp or similar tools.
ZUGFeRD PDF files which are just PDF documents with the copy of a form data attached as XML file (which can be extracted with tools like this)
Text incorrectly encoded by some PDF generators (can be restored via OCR engine with some acceptable error rate though).
Using ItextSharp, do the following
using System;
using System.Configuration;
using System.Data.SqlClient;
using System.IO;
using System.Text;
using iTextSharp.text.pdf;
protected void BtnSubmit_Click(object sender, EventArgs e)
{
String FilePath = #"GetFilePath";
StringBuilder sb = new StringBuilder();
PdfReader reader = new PdfReader(FilePath);
PdfStamper myStamp = new PdfStamper(reader, new FileStream(FilePath + "_TMP", FileMode.Create));
AcroFields form = myStamp.AcroFields;
if (form.GetField("GetFieldIdFromPDF") != null)
sb.Append(form.GetField("GetFieldIdFromPDF").ToString());
}
I think you will have to write an application for this. This question talks about extracting data from PDF. After this you can export the data to excel format so that you can preserve the existing import format.
Look for information on "Scraping" the data from the PDF. I believe Adobe has some tools that allow you to do this for simple text but I've not used them.
Honestly though, I would try to do anything you can to get this data in a raw format from your vendor.