I am using Kendo UI editor and my image html is look like:
img alt="" src="http://mywebsite.com//ImageBrowser/Image?path=lion.png"
When I open this on browser it displays the image, but when I try to convert it to PDF, It doesn't display the image. Image src = actually is MVC controller/action. Is this the reason Winnovative converter to not be able to find the image, because src is not direct image path but uses MVC? Is there any workaround on this?
Can you modify the image links at runtime? If you can do that then I would suggest that you download all images to a temp folder configured to handle static content and point your references there. This is probably an authorization issue.
Related
I have an extension installed on my Magento in which I customized it to fit the my expectations.
But in my PDF that I customized, I want to place an image where the picture is placed on the media folder only,
The link of my image is like this http://xxxxxxxx.com/ecommerce/media/GlobalPdf/default/img/barcode.jpg
I can open the link onm the browser and it shows the image but when I included it on the XML, it does not show, it shows only a black box with a white X on it.
Am I missing something? I tried placing it on other locations but to no avail.
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
I am using webbrowser control to display and xhtml page. The page also has images. The issue is webbrowser is not able to display this image which is named as image.png. Upon investigating, i found that the mime of the image specifies that as a jpg. If i rename the png to jpg, the image is dispalyed fine. But for me to do that, i'll have to rename all references to the image file in the xhtml. Is there a better solution available. Can webbrowser not recognize these kinds of files. Kindly help.
the image is located under: /Content/panoramic/panoramas/UCCParc.tif
I access the image like:
<img src="#Url.Content("~/Content/panoramic/panoramas/" + #imgName + "")"/>
But when I try to load the page localhost/pano, where pano is a controller, the images are not found. Is this the correct way of acessing the file in MVC3? Is it correct to specify the folder hierarchi as the path to the image or should I somehow wrap a controller around the path?
It seems that your code is fine but the best way to find the problem is using "Inspect Element" or other tools (Bugs in Firefox) to find out the correct URL that generated by your code. (Right-Click on images space and select 'Inspect Element' and see if the path to image is correct or not).
I have an editor which contains a div with contentEditable=true, where I let the user paste images from the clipboard, as well as change the image's SRC attribute from inside the editor.
In IE it's working fine, but in Firefox the image is automatically serialized on paste, i.e. the src attribute becomes something like data:image/png;base64,iVBORw0KGg...
How do I force Firefox to keep the original image source?
You don't. If you did that, the image wouldn't render at all, since web pages can't link to file:// URIs in Gecko for security reasons.