I am willing to programmatically generate file previews for a large set of Adobe files. This should be done programmatically (not via user interface via recorded actions).
The idea is to generate jpg/png previews for psd files, pdf preview for indd files and so on.
Is there a library or SDK to easily do that?
I am open to every programming language that can get the job done, however I prefer a js solution since I am willing to run the script on a nodeJS server.
Is there any system requirement or program to be installed to make this thing work? Do I need an Adobe subscription to do that?
Thank you in advance.
I cannot find yet a proper solution in JavaScript. But this is a reference link I found on search engines.
https://unix.stackexchange.com/questions/11835/pdf-to-jpg-without-quality-loss-gscan2pdf
With ImageMagick on a server, it may help solve the problem.
Another reference link is on about to improve the speed and reduce the memory consumption. This may also help you integrate it on your server.
https://serverfault.com/questions/167573/fast-pdf-to-jpg-conversion-on-linux-wanted
This code snippet may help you. You may have to apply back-ends on your server instead of directly integrating it in your NodeJS server.
convert -density 300 file.pdf page.jpg
Related
I improving site performance and for that, I try to Bundle or combine ScriptResource.axd and Webresource.axd but before combine to I need to know javascript file reference name which is used by ajax control toolkit in asp.net web form
like this https://lancezhang.wordpress.com/2008/11/15/aspnet-ajax-performance/
I need ScriptReferenceProfiler.DLL to get a reference of the javascript file which is used in ajax toolkit on the web page.
do you have any idea to get this dll file
I go through this tutorial
https://channel9.msdn.com/Blogs/ASP-NET-Site-Videos/using-script-combining-to-improve-ajax-performance
Or if you have any alternate solution please let me know
The file you looking and reference from the link you add was here : http://aspnet.codeplex.com/releases/view/13356
I can not find it now so I uploaded for you here, both source code and binaries.
http://planethost.gr/so/ScriptReferenceProfiler.zip
http://planethost.gr/so/ScriptReferenceProfilerBinaries.zip
I am newbie in Adobe Forms API.
Our team supports complicated Adobe Forms, doing events handlers, calculations etc.
For now i do not see way to sync our efforts via SVN, because of PDF binary nature. it looks impossible to merge changes made by different developers over one PDF file.
My idea is - to have in SVN external js file not included in PDF and somehow evaluate in at document opening.
possible js code sources are
evaluate pdf data attachment (js /txt)
evaluate remote data (soap, ADBC, ajax, cdn)
please give me a clue - what direction to follow.
am i missing some simple idea how to get that?
I know about possibility to ask user to place JS file manually in APP folder but it is last resort.
JS_Dev_Contexts documentation
Here is our current solution
JS stored in git
PDF is just a container of fields
All actions are set via JS
I know that JavaScript is not allowed by browsers to do much directly with the computer, and that is not my question. My question is: How to, with JavaScript, create a file on the web and then ask, perhaps with a popup window, to download the folder and any files within. This folder would need to allow access for JavaScript to place files within, like image files. This folder might originally be just another JavaScript value (like an object) or a URL.
I have done research, but much of what I found was asking whether JavaScript could create a folder directly to the computer, while my question is asking about creating the folder, and then asking to download it. There must be some way, because when in Google Drive, drive has a way to place multiple files in a .zip folder for download, and this works not just with Chrome but with Firefox and Internet Explorer. Some sites like http://stuk.github.io/jszip/ provide their own way to create .zip files, but I would prefer not to use a JavaScript library, if possible.
This would be useful for generating multiple image files, but only asking the user once for downloading them, instead of for each file.
I would prefer to create the zips client-side.
So this is an interesting question and I shall do my best to answer it. The simple solution is to not do this at all. Use javascript to asynchronously request the server to create the required .zip and then give the user a link/prompt to download. But I digress, you want it all in-house!
JSzip Option
You'll not be able to write a solid library that can .zip files client-side. JSzip is the best option out there, and it's not as solid as it could be. If you have the time you could go through the source and make improvements where required.
Cheeky Option
Your best option - baring the actual best one (server side) which you have discounted - is explained here. That is - create an iframe for each file.
Unfortunately you'll not find any better than those options if you're insisting on client-side work. Browsers weren't made to be zipping files.
Now, I know that when I post here on SO, it is best if I include code that I've tried. The issue is, I cannot find anything on Google that is specific to my needs. So I am taking a small risk asking this question with no code to show what I've tried, because in reality I haven't been able to try anything except changing file extensions of compressed folders to match the devices used to download them on. So, here it goes -)
I have a folder, it contains 15 .MP3 files. The viewers of the site can download them via an audio player I found online (Royal Audio Player). I want to incorporate a way (not into the Audio Player, in separate HTML using images) that allows my users to have the option of downloading all the MP3 files at once, and not on-by-one.
Is there a way to do this? Any help is appreciated and I apologize again for not providing any code for people to see. Thanks in advance. =)
EDIT: Changed the title to ask about PHP methods also. =)
Create an anchor element like this
Download All
And in php, add a route on this path and create a zip and return the zip as a response.
You can use these examples on php.net to know how to create a zip in php.
I'm building an HTA application in which I need to display a list of file with their associated system icon.
I'm using FileSystemObject to list the file but there seem to have no way to get the icon...
I've found a script in VBS that can save the icon of a file into a .ico .
It read the file (PE resource file, .exe or dll) and parse the icon data.
I modified that script to return the icon's bytes, convert it to base64 and use embed base64 images in HTML.
Here's the original script: http://gilpin.us/IconSiphon/
Issue
) In most case the .ico contains multiple icons (many sizes and color depth) but there's no way I can specify which one to use (as I need 16x16 icons).
) Not all icons are displayed
) Could be slow with many file as it read exe and dll (but I'm ok with that, I can cache already fetched icon)
I've also tried some ActiveX control but none seem to work properly. Even those provided by microsoft (ShellFolderView or ListView) are very buggy.
Requirements
Must display 16x16 icon
Must allow multiple file selection
Everything must be embed in hta (if possible). No external .exe
Does anyone know a way to achieve that?
Thanks!
Use SHGetFileInfo() with the SHGFI_ICON flag.
http://msdn.microsoft.com/en-us/library/windows/desktop/bb762179(v=vs.85).aspx
The filesystemobject will provide you the necessary functions for enumerating files on the local filesystem. However to get the icon image you will need to use the win32 api per #seanchase's response or an external exe.
However you can access the win32api via javascript in the hta using the wshApiToolkit activex object - http://www.google.com/search?q=wshAPIToolkit.ucATO%2F&rls=com.microsoft:en-us&ie=UTF-8&oe=UTF-8&startIndex=&startPage=1
Find a copy of that and you're close to being done. It does require distributing the activex object with your code and shell executing the registration process from within the HTA so that might violate your third constraint. Though I believe you can base64 encode the exe into the hta in a dataurl and write that back out to the file system so it would at least be bundled into a single file. If you support that option then maybe embedding an exe that does the same would meet your requriements.
Definitely some hacky stuff that may be unstable on future OS versions - heck I'm not even sure the wshApiToolkit works on windows 7, and 8 is just around the corner. Good luck!
You indicated you're opened to installing ActiveX components and using them in your HTA.
If I had the time, I would approach this for myself by creating ActiveX components using Visual Studio to call FindResource, LoadResource and LockResource. These will enable access to the Group Icon resource for which I would then provide rich interfaces to iterate through the Icons offering the ability to extract BMPs (or PNGs).
This is "how" I would go about achieving this short of actually going off doing it.
Once I build a similar HTA interface and I faced the same problem. I solved the problem by creating a custom icon gallery and converting the images using base64. You may achieve the same by either converting or using sprite. Many UI does it, even java.swing has its own collection embbebed. As you noticed, reading from *.dll can speed down the application