With the Foxit Web SDK is it possible to get not just the data but the entire document server-side - foxit

When a PDF with form fields is rendered in the Foxit web viewer (WEB SDK product), and then is completed by the user, signed, and submitted, is it possible for server-side code to get the bytes of the completed document, not just the data from its form fields?

Yes. For example you are using Java in the backend. I guess in your scenario, your PDFs are hosted on the server(like you have 10 registration forms on the server and your customer can fill them out online). Since those files are on the server, just use Java to read them from the file system using its path. Something like this,
Reading a plain text file in Java
If this scenario does not well describe what you have, please share part of your code and I will be more than happy to help.

Related

Computer Vision 2.0 PDF to text not working

I am trying to parse text from a PDF file using Computer Vision 2.0. I am following the example and have changed the MediaTypeHeaderValue to "application/pdf". I get an error that the content type is not supported. I change it to "multipart/form-data" and get an error in processing. How do I use Computer-Vision to process PDF files?
Kevin,
You are using the legacy "OCR" API that does not support PDF input. Please use the new OCR technology available as the "Read" API - see overview for processing PDF documents. The version 3.0 is in GA since May. Read supports large images and multi-page and mixed languages documents up to 2000 pages long.
Please see the Read REST API QuickStart in C#.
Note that Form Recognizer is great if you want to extract not just text, but layout insights such as tables, check-boxes, and key value pairs from forms, use pre-built models, and build custom models to process your documents. It's now in GA.
Take a look at the Form Recognizer service for extracting data from the PDF.
https://azure.microsoft.com/en-us/services/cognitive-services/form-recognizer/

How can you connect python to the Microsoft store and download an app?

I was wondering if there are modules, or code snippets to create a program that connects to the Microsoft store, in the background, and download an app(without pyAutoGUI). Thanks in advance.
There are no Official API's for accessing Microsoft store, A Possible solution is to use requests library or other equivalent to create a bot that can access various fields available on the website and navigate through, if you always want a certain(Same) application to be downloaded may be you can go directly to that links page and use get request for the download button as submit, this should work in theory, but again this will also keep breaking in short durations as Microsoft keeps making changes to it's website.
P.S. You might want to fool the website by adding headers to your request.

FTP in and out of Acumatica

I am trying to integrate Acumatica with an interfacing system and I need to be able to send and receive data in xml format, say for example one is Customer info, that should be sent to the interfacing system.
For some reasons, we ruled out the Import/ Export scenarios and we need to achieve the interface using FTP.
I'm unable to find much info online on how to FTP data in and out of Acumatica. So if anyone can share links to some documentation, it will be very helpful. Thanks.
Seeing as you want to be able to send and receive data in an XML format, you might want to check the Web Service options.
There are two possibilities, the Contract Based SOAP API and the Screen Based SOAP API. Both of these are sending SOAP request in XML format.
If you are starting a new project, Acumatica is suggesting you use either version of the Contract Based API (SOAP or REST). So your best bet is probably in looking at Contract Based SOAP API.
As there is not much information on the structure behind what is being sent you will probably have to create yourself project in c# first and inspect the structure of the package being sent to the server hosting the Acumatica instance so that you can reproduce it using your own FTP Interface.
You need to work with .Net native FtpWebRequest class. You can find more information at MSDN FtpWebRequest.

restrict image file size in alloy UI

I am making a simple form using Alloy UI. It has an image upload field. I want to restrict image file size say, to less than 10MB.
I have tried <aui:validator name="min"> and <aui:validator name="max"> in my view.jsp.
But, this is not working.
What should be used here to restrict image file size?
It seems you want a validation of file size on the client side i.e. using Alloy UI javascript, so I am sorry to bring to your notice that this is not possible in pre-HTML5 browsers due to some security reasons but this is possible with browsers which support the File-API in HTML5. Here is a good-demo site for the file-API.
So for now I would suggest that you do this server-side as a fallback mechanism & there are different plugins available to help you do this using Ajax or just go with plain server-side validation.
You can also try using flash with alloy-ui to check file-size as liferay does in its Documents & Media portlet. The drawback with this approach is that it requires flash to be installed in your browser.
Here is a SO answer which may help you give more information about client-side validation alongwith a demo.
Hope this would give you some lead.

SharePoint - Posting and Retrieving files Automatically via VBScript

I'm going to need to push and pull files from a SharePoint site that is not hosted by my company (it is external). I'm only going to get a few days (if that) to get this working so I don't have much time to experiment.
To add to my requirements/headaches, I'm going to have to implement this with VBScript. .Net would be preferred for me but for reasons beyond my control I have to use VBScript. I don't have direct access to my VBScript web server, so I won't be able to implement this in .NET and use that object from VBScript.
I'm looking for anything that would help me accomplish this goal quickly and effectively. I found this post and am wondering if the PUT/GET method used here would work for me?
http://weblogs.asp.net/bsimser/archive/2004/06/06/149673.aspx (I got this link from: Sharepoint API - How to Upload files to Sharepoint Doc Library from ASP.NET Web Application)
To top all of this off, I've never done any programming or administration of a SharePoint site. My knowledge of SharePoint is that of a user. I'm aware that there is an API from the few Google searches I did. However, my readings make me believe that my code would need to run on or in proximity to the SharePoint server. I don't believe I have the proximity I need to use the API.
Sincere thank yous!
Regards,
Frank
Progress Update: I'm still researching this. Tom pointed out that the example I had posted is probably from an old SharePoint version. His recommendation to use .Net to develop a prototype on Web Services is good but I'm hoping for more detailed answers.
I'm now wondering if I can accomplish what I need to accomplish using HTTP PUT and GETs. At my company, for a specific project we do use HTTP PUT and GETs to do something like this. We have files that are stored on an HTTP server and this is how we post and retrieve them.
Would this work over SharePoint or would SharePoint require special handling? Basically, do I have to use Web Services?
Progress Update 2: This link is helpful... Upload a file to SharePoint through the built-in web services
But I am still looking for more information on this topic... Thanks all...
You'll need to use the sharepoint lists web service for metadata and get/put for uploads. That link looks to be for SharePoint 2001, so hopefully you can use the newer/simpler version.
I recommend building something in .net first to get the web service calls worked out - some of the parameters can be quite tricky to debug, and I wouldn't want to be doing that on a remote vbscript page.
Assuming there is no metadata required and the SharePoint library is being used like a file server you can do most of what you want with PUT/GET, but you will probably need a call to GetListItems to find the urls to download.
There's an example on my blog of a lower level call to that web service - it's javascript, but probably close enough.
http://tqcblog.com/2007/09/24/sharepoint-blog-content-rating-with-javascript-and-web-services
What setting up the .net version gets you is very quick set up of a connection to the server (just add a web service reference in visual studio) so you can get the query and queryoptions strings working to retrieve the items you want. Once that works you just have to put it all together as a string including the soap stuff for use without all the nice tools.
I'm a little unclear on the context of the implementation and the prerequisite of having to use VBScript. Are the files being moved from one server to another server or from a user's desktop to this SP server? or are they being accessed via software like Excel?
The first thing that sprang to my mind (this may sound crazy) was using the Office application to make the connection. Your script would call up Excel (just as an example) and pass it the vba needed to initiate the Open File, and then provide the full path to the file that needs to be retrieved. Then have it do a Save As to the location that needs the file. Do the same thing but in reverse for putting files on the SharePoint server.
The tricky part, obviously, is getting the script to interface with the Office app. I know this can be done with the Windows version of PHP, but I don't want to get into anything specific without knowing your situation.
I seriously wonder if you are going to be able to use VBScript to call the SharePoint web services. I haven't looked at the SharePoint web services for a while so I don't remember exactly how they are defined. I thought the web services were SOAP calls though which makes it trickier than
I'm not sure I tried to use Excel to call some web services with the MSSOAP.SoapClient and it seemed this component was unable to handle any WSDL types beyond the very simple strings. Anything with nested data would not work. Instead, you would need to create a COM object to process the conversion which is a major hassle. If you are able to use XMLHTTP component then it might be possible with VBScript, but I'm not sure if it will work with SharePoint web services.
I'm not sure what you mean, "I don't have direct access to my VBScript web server." Is your web server in VBScript (ASP)? Or did you mean SharePoint server?
You might consider C# Script (cs-script) as a scripted solution that uses .NET. I have had good success with it, although it does need to be installed on the computer that runs the script.
I'm integrating between two companies. According to this book, we should use AD FS to accomplish what I'm looking for.
I still don't actually have this working though so if someone has more information I will change the answer to this question.
http://books.google.com/books?id=-6Dw74If4N0C&pg=PA27&lpg=PA27&dq=sharing+sharepoint+sites+external+adfs&source=bl&ots=ojOlMP13tE&sig=FjsMmOHymCOMGo7il7vjWF_lagQ&hl=en&ei=ytqfStClO5mMtgejsfH0Dw&sa=X&oi=book_result&ct=result&resnum=5#v=onepage&q=&f=false
I never really received a answer to this that worked out but this is no longer an issue for me.
What we ended up doing is scraping the html. In effect, we put together our own ad-hoc web service processor where instead of SOAP, html is used to communicate. Then we execute GETs, POSTs, and etc to work with the web service.
We had done something similar in VBScript in for WebDAV -- we had a class and created a new one to work with SharePoint.

Resources