I made a desktop application by using PDFbox in Netbeans.Now I wish to develop a web application of same.Can PDFbox be used to make web app using html,php and javascript?
I haven't started working on backend yet.
No, unless you use the command line utilities, or develop your own, and then call them from your php / javascript code. See here:
https://pdfbox.apache.org/1.8/commandline.html
and here people who call PDFBox from php:
https://github.com/chelmertz/PDFBox-php
http://www.phpclasses.org/package/9028-PHP-Extract-text-from-PDF-documents-using-PDFBox-tool.html
Related
Apologies if this is a silly question. I currently have a small backend system written in ASP.NET Mvc in C# that allows you to do multiple features relating to profiles (Add, Edit, Delete, View) amongst other features.
My friend has an application he created as his University project and we're both just curious if we can merge his application with mine as his is purely a front-end system and mine is a back-end.
He has written an SQL web application that tests you with some general T-SQL questions with a pre-set SQLite3 database that you can modify based on the questions asked. He has written it all in Javascript and using HTML and CSS. He has 3 folders, a folder contaning all the javascript, a folder with an SQLITE3 database and a folder with the HTML/CSS.
I was just wondering, can I essentially 'drag and drop' all the 3 folders into my application on Visual Studio and will it just run seamlessly?. I assume I will need to go into the Javascript and modify any changes to the paths of the database which I can do. I'm not interested in calling any js functions or anything yet, just making it so I can start the application, be taken the HTML for the SQL application and then all the js scripts work for that page.
If this is not the case, is it a case where I can only use Javascript by injecting it into ASP.NET by using the tag <script type="text/javascript">?
Trying what I have stated. As it webpage was in HTML, I created an action in my controller that opens up the HTML page in CSHTML. This will display the HTML but no methods are called when the page loads therefore no database is loaded or what I presume to be any Javascript commands.
If there are any materials that help with this issue, can you please link them below. I had done some research but could not find anything that points to this specific issue.
Can I add pre-existing Javascript code to an ASP.NET MVC C# application
Yes.
Apologies if this is a silly question.
It isn't a silly question because there is an ambiguity in the question that might make the answer "no" in your specific case.
Firstly the good news - you can reference scripts written in Javascript in your HTML, and you can put blocks of Javascript in you CSHTML too. It's possible to use Razor to create a page that includes HTML, Javascript and C# in the same page - BUT there is a difference about where and when the code executes that might be an issue for you.
The question you need to determine is if your friend's project is written using the Node.js framework. Javascript is a language and it can be used in both front-end (execute in the client's browser) and back-end applications.
You can use your ASP application (which is server-side or back-end code) to write documents that either include Javscript or reference scripts to be executed by the client-side code in the browser. You can't get your back-end to run the Javascript in the same application) as it is intended for a different framework.
You can have two applications hosted on the same server, and make calls between them both and use them together in that respect, but otherwise you need to select one or other as the back-end providing framework for your web application.
So you can include Javascript in your ASP application, but for execution on the client-side in their browser. Your mentioning of database connections heavily implies that you are describing server-side code - so talk to your friend about Node.js to ensure that is what they are using.
You can read about Node.js here: https://nodejs.org/en/
There are some details about mixing ASP and Node on Azure here: Mixing node.js and ASP.NET projects in a single Azure Web Role?
I'm creating a video game that has single player and multiplayer. The single player is done in C# (Unity), and want to use Gamesparks BaaS that works on Javascript (NodeJS) for their server code.
Since I want the multiplayer server to be authoritative, I need the server code to run Javascript and the client will run C#, which means duplicated code
But, if I can create .NET dlls in Javascript I can reduce code duplication heavily by using those libraries in Unity and using the Javascript code on the server.
Thanks!
If you want to use javascript (and by javascript I mean nodejs), along with c# and communicate between those two, you can use electron-edge. It helps you to run c# code using nodejs through Electron API.
Here is the link of their Github url: Electron-Edge-documentation
You can also interact with dlls, using an creating your application as an electron app. You refer this question where you will find some more details regarding it.
I need some help.
I'm kind of new to javascript, but I built a flight search single page application using nodejs and angularjs and the Skyscanner API.
Now I would like to integrate this application as an embedded website in a wordpress in order to enjoy the advantages of wordpress. Does anybody have experience with this? Do the two system compete? Whats the best way to do this?
As wordpress is based on php, I guess there should be some troubles, maybe you know a turnaround.
Thanks in advance!
WordPress itself is written in PHP but whatever frontend you build with it can access your API written in Node, either directly from Angular or indirectly via PHP.
If you can get your Angular app embedded in WordPress then you shouldn't have problems accessing your Node API from it (keep in mind that you may need to configure CORS correctly).
But whether you can get your Angular app embedded in WordPress may be a big "if".
You can either use an iframe in order to embed a page that you're running in your Node.js environment or just provide some APIs from your Node.js server and call them from WordPress the way you prefer (jQuery, Angular.js or whatever). I don't see any particular issue about running an Angular app in WordPress.
I've made a program in Python 2.7 with a wxWidgets GUI. Now, I want to improve it by making a web GUI, make it multi-platform and port it in Python 3.4. For this purpose, I have to make Javascript and Python communicate (i.e : I want my Python to react on some event on the page and I want my page to react on some Python actions).
I don't really know how to do it, and I don't even know if it's possible.
I've find some libraries, but some are just for Python 2 (pyjamas), and some don't provide what I search, or I don't search enough ^^ (web2py, turbogear, cherrypy).
I would like to find a complete library that ease this communication, and that is rather known and supported, with a compete documentation.
Maybe, there are other ways to do such a web GUI, but I don't find them.
Thanks !
I guess what you want is a single page application.
I would suggest to wrap your python code in a RESTful Api using a python web framework like Flask. This would isolate your python code from the presentation layer.
You could then write the UI in html and javascript and use AJAX to call your python api from javascript.
Here is my problem:
Customer wants my current web application as a Desktop, possibly Executable but without browser for the Client part.
I looked into 3 of following :
Qooxdoo - Needs browser
Adobe Air - Needs plugin and Runtime
Appcelerator - Most interesting , builds into Native Client
Here are the main questions:
Client side:
What i have read on appcelerator is it builds things written in html and javascript
into native executable, so what i have already written (HTML + Jquery + Jquery UI + CSS) can be built into Native Windows / Linux / IOS executables without changes to current code ?
Server side:
No problem as it returms html and json and decided to keep running on server. But wondering how offline contents work.
I'm not sure this will actually work. From what I understand, titanium appcelerator provides a framework primarily for you to create applications on the iOS and Android platforms. I did see some things about the Desktop apps, but nothing about the application being automagically created from the source when your backend code is python (and web2py to boot).
I think it might be impossible to just drop your web2py app in and get a final product. For one, how will Appcelerator know that a given URL corresponds to a given controller and function? How will it perform searches on objects in your database? Do you expect it to read the DAL(...) connection string and just connect?
If you don't do ANY server-side processing, and don't use ANY datasources except for JSON, then maybe this would work. Maybe. But I highly doubt it will be automatic, or even all that easy.
It seems to me that you would have to hit every page and save the pages as html to a disc, and then drop the outputted HTML/CSS/JS markup into Titanium. But that means that if you ARE processing forms or searches, or doing anything interesting in the controllers, the titanium application will not have anything to process the server-side backend stuff.
That being said, titanium does work with php code, but not perfectly, And I see issues when using frameworks as opposed to raw php.
http://www.flickr.com/photos/funkatron/4011561849/
It didn't work that great, regardless. Titanium Desktop does still support PHP though, but developing an app with a server-side framework like CI is basically not going to work.
There was also something in the docs about processing python code, but all I saw was that you can place python in the "client" end of the HTML using a script tag as such:
<script type='text/python'>
# ... python code ?
</script>
(ref: http://developer.appcelerator.com/doc/desktop/python )
But that's not going to help with a web2py app.
IN SHORT -- I advise you download the app and create a hello world project. Then follow a tutorial on migrating or converting your application to Titanium. You'll probably have to rework a lot of things, and I'm not sure how you'd get the execution environment required for web2py, so you might have to rework some of the basic GLUON code which web2py is built on.
Sorry :(
You can, however, probably find a way to create a Java application that includes a copy of (a) rocket webserver, (b) python 2.5 or greater interpreter (c) web2py framework, (d) web2py application and package all this in such a way that it runs inside your java application (which will run on any platform) and shows an HTML view to the enduser. Then you could maintain it as a web2py app and just copy the app to your java bundle. I'm not sure if that's any easier in the end, but it looks like you'll either have to port to Titanium or Wrap with Java (or another language suitable platform-agnostic language).