How to open image file using pdftron - image

I want to load an image file using the pdftron webviewer api.
For pdf files it's working fine but I want to load image files and add annotations to them.
In the user guide there is no information regarding working with images.

Yes, WebViewer can do this out of the box.
There are a number of image formats supported. Here is the breakdown.
PNG, JPEG
Simply pass the image URL to WebViewer initialDoc constructor parameter, or to WebViewer.loadDocument().
If your URL does not have a proper file extension, then you can do the following.
myWebViewer.loadDocument("mydomain/generic_url_to_image", {filename: "input.png"})
This works with both PDFNetJS Lean and Full editions.
TIFF, GIF, BMP
You can utilize the browser's HTML5 canvas to load the images, and then generate PNG/JPG from the HTML5 canvas, and then pass the follow the instructions above.
JP2 or multiple images in one document.
Using PDFNetJS Full edition, which does not come with the standard WebViewer download, you have full control over PDF creation.
PDFNetJS Full Download: http://pdftron.com/downloads/PDFNetJS.zip
Using PDFNetJS Full you would follow the AddImage sample code to construct a PDF with the image(s) in it.
http://pdftron.com/webviewer/pdfnetjs/config.html#file=samples/PDFNet/AddImageTest/AddImageTest.js

Related

Siebel open UI IP16 - loading image customization

Is there a way I can customize (replace with another GIF image) the loading image in Siebel Open UI in IP16 version? The current loading image is an red colored, oval shaped, oracle provided one, but i do not find the corresponding image in images folder. Any leads?
The animated icon may be stored in css files.
Try to search in your css files for something like
.siebui-mask-outer
timer
It may not be an actual gif but an css transformation.
(btw. You can run your Chrome Developer tool and examine the source of the icon)
The standard GIF file must be in public/enu folder (for english application) on the web server. On your local installation, it will be in C:\Siebel81\16.0.0.0.0\Client\PUBLIC\IMAGES\
There are multiple gif files there used for different applications.

Download assets in it's original format in AEM

I want to download the asset in it's original format using AEM, is it possible? Currently, if I select one pdf or jpeg asset, and click download, it's downloaded as a zip file which includes the selected asset. Now I want to download it without a container zip, that's to say download it in it's original format.
If you are referring to PDF then that's how the download for PDF works because when a PDF is uploaded all it's contents are extracted as sub-assets. This behaviour can be changed via modifying the PDF extraction logic but it won't affect the download behaviour.
The logic behind this is that when an artefact is uploaded in AEM it becomes a DAM asset and rules governing to it's manipulation take over. For example, in case of PDF, a PDF asset is a collection of the original PDF and all it's images and thumbnail extractions. So when you are downloading something you are basically downloading the whole collection as AEM sees it.
Having said that, you can probably write a custom servlet and extend the DAM GUI to download just the PDF.
You can select the option as shown below, when selecting 'Download' action after selecting the asset to download, in Assets UI

Extract images from .swf viewer?

I'm wondering how it possible to extract images from .swf viewer?
Note that .swf file have not images itself.
For example I'm trying extract images from AVON catalogue from this link - http://avon.com.ua/PRSuite/eBrochure.page?index=1&cmpgnYrNr=201404&pageNo=0
Any ideas?
Best way is to put the .swf file in a decompiler for image extraction. Decompilers are smart enough to extract images for you and arrange them.
JPEXS Free Flash Decompiler is a more popular one
http://www.free-decompiler.com/flash/
You can extract other useful content from it as well.
Just download the .swf file from the website
A while back (like around 1999) I wrote a set of tools for Flash animations.
One of the tools is swf_dump which can be used to extract objects (i.e. write the objects in a form of script that sswf can nearly recompile...)
The tool also allows for extracting images that are inline (not downloaded dynamically by the flash animation, if so, anyway, you could as well download those images manually, you'd need the URL, though.)
The command line you can use is:
swf_dump -d my-animation.swf
Then your current folder will be littered with all the images that were found in the flash file. It extracts JPEGs and PNGs. The source can be compressed (SWF or CWF are supported.)
Now, you're on your own to compile that thing... The project is here and is in great need of updating (but Flash is kind of going out too...)
https://sourceforge.net/projects/sswf/

How to render uploaded photos with NodeJS and Express?

I generally post examples of my best shot at what I'm asking about, but in this case, I have no idea where to start (haven't uploaded photos before in other languages).
So how does one go about rendering uploaded photos. I'm using Node v0.4.2, Express 1.0.8, and Mongoose 1.0.16 and have uploading of images working (they end up in ~/tmp right now).
Thanks.
If you just want to render thumbnail versions of your uploaded images for display, try using the imagemagick wrapper node-imagemagick.
For example, you could store your hires-images in a data-folder on your server (lets say /data/images) and render thumbnail images into a web-accessible folder (on upload).
I do not recommend generating the thumbnails on the fly, as it can massively increase your server's load when a large image (especially vector formats like eps or pdf) is being rendered.
For imagemagick examples, consider reading up the docs for the convert command.

Is there any way to export a Google Visualization org chart as an image?

Is there anyway to have an export function to export the Google Visualization organizational chart as an image? I want this as a feature of my website, so people can click a button or a link and have it save as an image or a pdf file
Make a screen-shot of the browser. There are multiples tools out there to do this. We used this: http://code.google.com/p/speak-lib/source/browse/#svn/trunk/WebShot%3Fstate%3Dclosed
It works fine. We generate previews of design changes that way.
Try http://phantomjs.org/ you can write script to cut your web page into PNG images of some fixed size and then assemble them into PDF.
You can export the SVG code and send it to a server to convert it to an image. This is a scalable and easy solution. Answer details here: Convert Google Geochart to image (JPEG, PNG, etc.) or PDF in the browser
Use chart.getImageURI() it gives the image location

Resources