this is just a rough idea, i am trying to create a magazine reading platform and i need the reading flow to be smooth, and so is the magazine upload process, it must be fast and easy. so i am thinking of using pdf file.
I am thinking is it possible to have a module(maybe a system?) to pull each page from the pdf and display it in a interface written in html? i know there is something similar in flash, but what i want it is something lighter and easier from development. coz at the end i am gonna put this module into maybe a cms system.
thanks in advance guys:)
Regards,
WJ
hi guys i just found this solution, pdf.js, it uses javacript to implement pdf displaying on the web page, it also able to create pdf file from javascript.
anyway the reader is there, and interface is able to change since it is html, i guess this should be the solution.
Related
I am using next js for my web application, I am having a requirement where when a user uploads a pdf to my input, I will have to compress it (for example: 1MB). I searched here and there, but I am not able to get a prominent solution which can help me out! If I cannot compress a pdf, I would at least like to convert it into an Image, which I can use a library to convert? Can someone help me out on how to compress a PDF?
I would recommend:
Convert API
You have to pay, but it is a very easy and clean solution.
Alternatively, you can use:
Shrink PDF
...which is a wrapper for ghost script. more complex than the Convert API but easier than implementing ghost script yourself.
Or:
Ghost script
...You can implement it yourself if you wish.
Realistically, you are not going to be able to get a simple Node package where you can just do pdf.compress() and it is done well, unless it is a paid API.
I'm in a little over my head with a project for a client, they want to build an audio editor that will allow the user to trim their uploaded audio files and save them. I've built the file uploader, and the detail view for the individual audio files, my question is how would this best be implemented? I've been looking at
Peaks.js
and I want to make sure thats the right way to go before diving in. Never used npm in a django project before, is it like using any other js library?
I've also been told about sox, which is great for manipulating the sound files, but what about displaying the sound to the user/editing in the browser?
Any help or general direction-pointing would be greatly appreciated and could save me a bunch of time potentially.
I want to export file to excel like this in my website. Is there any way to make it ? If can't do that with angularjs, please give me any suggestion(tool,lib or another languages can embedded to my website support this) to do that. Thanks.
This is file execel:
In our team we had a similar issue and we searched a lot for solution, we didn't find any good tool for this task except for creating a simple csv file, so in the end we decided to do all the reporting (PDF, Excel ,...) in server side.
Google Drive team has recently announced that third-party Drive app can provide their own thumbnail as a file preview (http://googleappsdeveloper.blogspot.com/2012/10/thumbnails-for-your-custom-file-types.html).
What is for you the simplest way to achieve that?
Our app is using AngularJS on front-end and Python webapp2 on the backend-side.
The fact that the file URL is not public and since we won't make our users' files public, it sounds harder to make it on the server-side so I started my research by looking front-end solution.
I found html2canvas (http://html2canvas.hertzen.com) which sounds great but which does not generate a correct render of our app (missing part).
I was also thinking about something with PhantomJS to generate this preview but it sounds a little bit overkill.
Thanks for your help.
Edit
It actually works, but Google Drive renders it in small (like 300x200px) whereas the original canvas is 630x456px. Any thoughts on this issue?
Please find the original thumbnail and its render in Google Drive attached.
I would have suggested html2canvas, but as you found out it has some limitations which may make it a non-starter. Depending on what you'd like as the preview, a full screenshot might not be necessary. If, for example, you're referring to http://www.videonot.es/, a still/thumbnail image from the video might be a sufficient preview image.
So I'm working on a just for fun project to get practice using HTML/CSS/Javascript.
I'm using Aptana to write all my code and it is currently set up to run and work in a browser (obviously) it's a text adventure game.
It would be really cool though to be able to compile the code into an executable file that runs in its own window, not in a browser.
Is this something relatively easy to accomplish?
Thanks in advance for any help! :)
FF and Chrome provide a function to run a custom website in an app mode. That means no menubars, no addressbar and a complete window for the website. Maybe this is already what you are looking for.
http://www.rarst.net/software/dedicated-web-app-window/
https://superuser.com/questions/33548/starting-google-chrome-in-application-mode
https://superuser.com/questions/171235/does-internet-explorer-have-something-equivalent-to-chromes-app-mode
But if you are interested in compiled code for speeding up your game, this is not the way to achieve this.
For Windows as OS
see http://www.autoitscript.com/autoit3/docs/libfunctions/_IECreateEmbedded.htm
AutoIt is a scripting language for basically everything (with automation). SciTE is the editor to go.
In the example of the _IECreateEmbedded function, just change:
_IENavigate($oIE, "http://www.autoitscript.com")
to
_IENavigate($oIE, "file://.../thegame.html")
Very simple, you just have to copy-paste it and build it - you can even build it Online: AutoIt Online Compiler
There are many different ways you can acheive this.
If you're only targeting windows machines, then creating a HTA would be the simplest approach.
The modification to the structure of your existing code would be minimal, its essentially changing the file type and adding an extra couple of tags in. If you wanted a single file, instead of an exe and any resources (images etc) that you use you would have to base64 encode your images, and insert external scripts into the main page.
for information about embedding images and icons into a hta: http://www.john-am.com/2010/07/building-a-self-contained-hta-with-embedded-images-and-icons/
You could also use AppJS, node-webkit or similar type projects, but they would add around 30MB of stuff thats not being used.