Passing pdf form field to node.js/ electron app - javascript

Im developing an node.js/ electron app, that would take a pdf file, read filled form fields, and then save values as variables. Is that possible? I know that in Acrobat java script there is
this.getField
Is there a possibility to import a pdf document to my app, and then read it's fields?

Perhaps pdfform.js will be helpful here?
The documentation says:
list_fields function which allows you to list all available fields and their types.
Perhaps it will also list the already-filled-in values? I have not used the library.

Related

Populating PDF with Cocoa - Use NSTextField contents to populate a PDF text field?

I have a simple macOS app programmed in cocoa with several NSTextFields that I would like to use as a means to gather some information such as name and telephone number from a customer. I would like to send that data to a blank PDF form, that I have created separately at a drive location, on execution of a button action.
The PDF form has known text field names, but how do I pass the data from the macOS app to the corresponding PDF text fields?
Thanks
I haven't seen an easy way to do this with just the built in cocoa classes. PDFKit has PDFDocument, PDFPage and so on, but it's not clear you can modify the document via PDFKit. There's a commercial SDK PSPDFKit that can do what you want, but I think the reason they exist is because it's not easy to do with Cocoa itself.
One way without buying a third party SDK is to describe your form templates in XML (or something) and then create the view using native AppKit controls and then save it as a PDF. See the Quartz and PDFKit Programming Guide in particular.
Note that you don't have to display the full template - the user can edit in a simplified window and then you can build the full view from your template description (XML say) offscreen view and then use [NSView dataWithPDF(inside:)][3] to get the NSDat

Create CSV file using javascript or any other native script?

I am new to nativescript, I need a simple application to be created for iOS, using a form (some text fields) I need to create a csv file and send it to some email address as an attachment. Can someone please share some code snippet or documentation to do that?

How to allow file upload in Microsoft Dynamics CRM forms?

Under Project service:
And under project template:
There is a possibility of customizing forms in Microsoft Dynamics CRM, through Customize entity:
Also, seems like we can add a new field as well:
to forms:
I see that there is no file field in the forms:
Is there a way to allow file upload in Microsoft Dynamics CRM forms?
Maybe programmatically?
If you have Notes enabled on the entity, you can upload files via the notes component on the form.
To enable it, go to the entity customization and check the Notes box, and then add notes to your entity form.
Now you can upload files on the entity form by adding a new note on the record, through the newly added Notes component.
Picture guide: http://imgur.com/a/Kb7Xi
An alternative is using something like SharePoint instead to host your files, and using the standard CRM/SharePoint integration to access them in CRM. That way you won't use up all your expensive CRM storage with files.
The standard option for doing a file upload is creating a note (entity annotation) which can have a file attached to it.
Alternatively you can create a custom HTML web resource handling the upload for you. This requires common HTML/Javascript techniques, as discussed elsewhere on StackOverflow.
From my experience, doing what Henk van Boeijen mentioned (custom HTML/Js) will be more appealing in terms of UI.
You just need to enable notes, and after that, use REST endpoint. Example is here: http://scaleablesolutions.com/upload-notes-attachments-using-javascript-and-rest/

Blackberry - Attach pre-populated sqlite database

I have a pre-populated sqlite database and I need to attach this within my Blackberry app. I am using phonegap and therefore using the following javascript code to open my database and then run a select statement:
db = window.openDatabase("TaxCalculatorDB","1.0","Tax Calculator DB",1000000);
db.transaction(Manufacturer, errorCB, successCB);
However, when trying to run my select statement I get an error (ERROR: 1 no such table:user).
I have added my database files (which I have succesfully used in a iOS build) directly into the assets folder, exactly the same way I had done before. Do i need to move this database folder elsewhere?
Please advice, Thanks.
You have to have Javascript create the database when using webworks. There is currently no way to import an existing sqlite db into a webworks app. (You tagged this as phonegap, but I think phonegap uses webworks to create the app)
The common workaround to this is to include a JSON or XML file with all the data to be loaded. When you create the database, read the included file and add that data to it.

Can I use Sqlite in a WinRT application (javascript)?

Is it possible to use a Sqlite database in a windows 8 (winRT) javascript application?
What I want to achieve is to download a Sqlite database and store this in local storage before use. I believe some form of local storage is available to javascript based WinRT applications, but I want to know if Sqlite is usable in this scenario.
I'm also aware that the .Net implementation of Sqlite uses some win32 calls and I believe these will not be allowed by the windows8 app cerififcation process.
JavaScript has HTML5 IndexedDB available to it out of the box.
As for SQLite, you can use it, provided that you first wrap it as a WinRT component that can be consumed from JavaScript, e.g. using C++/CX. Its API surface is not that big, so it's certainly possible. I've experimented with compiling SQLite for Metro a while ago, and there were only a few Win32 API calls that were not available in the app container and had to be replaced - nothing major.
We created SQLite3-WinRT for this. It is a WinRT component wrapper for SQLite that passes the Windows metro style app certification. It also includes an easy-to-use JavaScript abstraction.
Take a look at this:
http://sqlwinrt.codeplex.com/
Yes, SQLite database is now supported in Windows 8 RTM. You can now download everything (Windows 8, tools, samples) from Windows Dev Center.
Yes You can use SQLite in WinRT machine.
Just follow following steps
Create a new project.
Go to references , then right click on the references there you will get Manage NuPackage Click on that.
In online search for Sqlite-net package , intall that package.
Again right click on the References and click add refrences , there in Extension section you will get two unchecked reference MS visual C++ run time and Sqlite Windows runtime. check both the reference and add references. It will two CS files in your solution explorer.
Now Download Zip file from https://github.com/doo/SQLite3-WinRT It will provide you the wrapper thing to use cs files in your project.
Unzip at any location.
Now in project go to FILE->ADD->Existing Project-> and browse your unzip location . There you will get a file SQLite3Component.vcxproj inside the SQLite3Component. Add that file.
Now wrapper Project is included in you Project.
Now in your unzipped files you ll get SQLite3JS folder copy that folder and paste in your solution explorer.
Now you are ready to use sqlite in your project.
Try to build your project it will show two error that winres.h file is not there. For that go to error location rename it winresrc.h and build it again. Now it will build and you can use sqlite in your project.
To use .js file of SQLite3JS , Provide the src of js file like SQLite3JS\js\SQLite3.js in html page where you are going to use sqlite.
Here i am giving you some example to use sqlite in js
// This will Create database name db.sqlite and try to create a table Name Notes. If it is not there
var dbPath = Windows.Storage.ApplicationData.current.localFolder.path + '\db.sqlite';
SQLite3JS.openAsync(dbPath)
.then(function (db) {
return db.runAsync('CREATE TABLE Notes (id TEXT PRIMARY KEY, notes TEXT)');
I hope all these step will help you out.

Categories

Resources