I have been using pdfCrowd API to convert HTML to PDF, but the default page orientation set for conversion is portrait. So, is there any way to set the page orientation to landscape.
This is the code try it
header("Content-Type: application/pdf");
header("Cache-Control: max-age=0");
header("Landscape-mode: 3pdf,'L'");
Related
I am converting PDF to image using GhostScript. The problem i am facing is when pdf has links then i need to have those clickable links in converted image as well. How could i achieve this.
How do you expect an image format to have 'clickable links' ? What image format do you think has the ability to click on links ?
I got a image: http://images.tyler.lu/iphone-4s-a.jpg
http://images.tyler.lu/iphone-4s-a.jpg
It looks different in different browsers.
Chrome
IE
What's wrong with the image?
Below is Thilo's answer:
There is a EXIF attribute "Orientation" in the file, set to "3 (rotated 180 degrees)".
Same problem in a .NET image processor: Problem reading JPEG Metadata (Orientation)
Browser support for EXIF orientation is complicated:https://code.google.com/p/chromium/issues/detail?id=56845
And I also found a post about the EXIF "Orientation": Exif Orientation Tag
Thanks Thilo!
I Encrypted an image by using AES algorithm. Encryption and Decryption works well. Now the thumbnail of the image is the default image.
But I want something that looks useful for the user. like this image.
I have searched a lot but I can find only the quicklook for the document based applications. How can I add thumbnail for jpeg, png or tiff images ?
I assume you know the path to the file when you create it and you have the icon images in your project, so then just use the NSWorkspace method setIcon:forFile:options:.
this question is in close relation to Firefox 3.5 color correction hack?
The situation I have is that there's a canvas game of mine, and the images that are used in it carry additional information about their shape, connection points etc. This information is stored in the PNG image itself, using meaningful colours (eg RGB(255,255,0) for connection point).
Loading element and painting on the canvas creates Image object, img.src is set, and in img.load function I preprocess image data reading the sensitive information (and removing sensitive pixels from the image data before painting to canvas).
The problem: In FF, the pixel which was supposed to be 255,255,0 is actually 255,254,0. I don't have problems with FF color correction (I don't care if the displayed image has right colors, or slightly modified), but I'd expect that getting image data gives me uncorrected data. I'm looking for a solution which would not involve changing images on the server. Is there some way? Eg.
img.setColorProfile(), or
img.disableColorCorrection(), or
img.getImageData(disableColorCorrection) or img.getImageData(colorProfile)?
The problem might have do more with image loading than image drawing.
I think the proper solution is to strip out color profile information from the images (which you seem to want to aovid). If possible server another image resources for Firefox if you cannot need to have the original data intact.
http://f6design.com/journal/2006/12/01/fixing-png-gamma/
Also, you could decode PNG immages in pure Javascript if the server is co-operate and allows CORS and AJAX loading of the images. You decode the image in Javascript using png.js and create a source <canvas> from the image data (instead of <img>). This way it's you in the control what RGB values comes out from each PNG pixel.
https://github.com/devongovett/png.js
I am doing image upload and resizing using the gd2 image library.
The image EXIF data is rotating my vertical pictures on resize. Is there a way to stop the image from rotating? or strip the exif data in php?
Barring learning the JPEG format and figuring out how to remove EXIF bit by bit...
You can use the GD library.
http://www.php.net/manual/en/function.imagecreatefromjpeg.php and http://www.php.net/manual/en/function.imagejpeg.php should do it.