I am managing the website filuren.dk, and we run a pdf-based catalogue, which is driven purely by JavaScript. No problem with this. However, our client have had customers experiencing that the pdf catalogue, has been run over by emojis as seen on the pictures.
I haven't been able to recreate the issue myself, so i have absolutely no idea how to fix it and what to do here. Can anybody enlighten me?
NB: It only happens on certain iPads..
Screenshot 1
Screenshot 2
this is what people use to add imges,
.this.getField('imageField').importImage('path_to_img');
instead of images you can add custom Emojis(.svg or something)
like this:
var f = this.getField("btnImage");
f.buttonSetCaption("Title");
if (f.buttonImportIcon("/C/image.pdf") == 0){ // if 0 == no error
f.buttonImportIcon("/C/image.pdf");
}
you can find the full discussion at Adobe forums on Insert an image into pdf (Adobe Acrobat Pro DC) using javascript.
https://forums.adobe.com/message/8694023#8694023
Related
I'm trying to create a program to keep the alert display when viewing the production web page.
For example, I have two pages as follows:
TEST environment ) https://example.com/123
PROD environment ) https://example.com/456
Only when viewing the PROD page, I'd like to display the alert that covers the content. Please see the image I attached.
As I'm beginner of programing, I have no idea how to realize it. Could anyone give me an advice for this? I have basic knowledges of HTML/CSS/Java/JS.
Thank you!
Let's define a function like this:
function alertProd(url, prodPattern) {
if (url.indexOf(prodPattern) >= 0) alert("PROD!");
}
alertProd(window.location.href, "stacksnippets");
Note that I have used stacksnippets as pattern, you will need to change it to 456 when you call the function.
I would like to create a custom qr code with javascript that contains a logo in the middle.
I already found this project on github:
https://github.com/kaarposoft/qrlogo
but unfortunately this script creates 1000 qr codes, whereupon the logo is always positioned differently, apart from that this project is not really easy to handle. (no documentation etc). I have rewritten in such a way that only one qr code is generated and not more than one and also that it uses an img tag instead of waiting for an upload. Nevertheless, this is not optimal because the logo is always randomly on the qr code and it is a project and not a library.
So I would like to know if someone knows a library or has programmed something to generate a qr code with javascript from an img tag and a string.
Many greetings and thanks.
qrcode-with-logos does the trick for me. I also came across easyqrcodejs which has a lot of extra features, though I have not yet used it myself.
Checkout the Zebra Crossing project.
It has ports to many languajes, including javascript.
zxing project on GitHub
I need to capture the currently active web page as a screenshot. I've already tried html2canvas & GrabzIt but the problem is that I need a precise screenshot of the page I am on currently. The reason why I don't want to use html2canvas is because it does not always return a good version of a screenshot (not rendering properly) and I don't want to use GrabzIt because it's not free.
Do any of you have an idea how to accomplish this either by using javascript/java/flash?
Any option will do as long as it works...
P.S. I'm currently capturing screenshots with my addon for Firefox by using the function that firefox offers : context.drawWindow and now i want to make it available online.
Thanks a lot!
Currently possible alternatives:
rasterizeHTML.js:
this tool looks to be capable to capture a while page containing sophisticated html-structure and an image as well in this demo:
http://cburgmer.github.io/rasterizeHTML.js/
Lively 3D:
On the tool's website you can find a demo as well and it is still supported and developed.
http://livelygoes3d.blogspot.co.at/2011/11/rendering-html-on-canvas.html
HTML2Canvas:
Or after all HTML2Canvas because it does not look like that it is put on hold, quite the opposite there is a new release-version of it. And since I used it it might be handle rendering images onto a canvas better.
https://html2canvas.hertzen.com
Old-Answer:
I used this package in one of my projects and it worked pretty well. The only complain I have to make on this package is that images are not rendered that well in the final screenshot. But may be it's improved since then.
In the end, I ended up using server side generation of screenshots with phantomjs. Found it the most reliable in my scenario and it takes pretty decent screenshots.
First post here.
I fall squarely into the category of "severely new". So, if you are kind enough to respond to this question, please assume the following:
If it's a code other than an if else statement, I probably need detailed instructions about how that code works and where it goes.
So, in other words, while I appreciate your help in advance, please don't say "Oh, no problem, just wrhimuss the frammus with a 4:3 array".
OK, caveat over, here's my deal:
I've been working (playing) around with the chrome media gallery sample app in an attempt to create a small gallery/player for webm video files, and after a week or so of work it's coming together quite nicely if you ignore the terribly organized code and css problems but somehow I made it work (mostly because most of the work was already done).
The chrome media gallery sample app adds to the gallery list every media file (music, pictures, video) it can find and that's the issue I'm trying to address here. I tried deleting every reference to pictures, music and others from the js code but the files still appear on the list only now they can't be "played". I want to make the gallery webm only, maybe mp4 or even every video type but that's it, no pictures and no audio.
So, any suggestions as to how I can fix this issue?
Thanks very much in advance!
EDIT:
This is the code I'm using: JS (not very different, is it?). I believe the solution is in lines 121 or 152 but I'm too much of a novice to know what to do.
EDIT2:
Yeah, I was right after all. Finally managed to make it work the way I wanted, can't believe it was that simple. Thanks for all your help, you can consider this question solved.
At https://github.com/GoogleChrome/chrome-app-samples/blob/master/media-gallery/media-gallery.js#L113 the sample checks what type of media each file is, and does something different for images, audio, and video. If you only care about video, you can just grab the video ones and do whatever you want, ignoring the others.
So I just replaced line 152 with this:
var path = entries[i].name;
var type = getFileType(path);
if (entries[i].isFile && type == "video") {
It sends the entries' names to the getFileType function and returns if the entry is a video.
I am working on a project that requires me to display an image when it is uploaded, and I have tried several solutions to no avail (See: option 1, option 2). In each case, I can get the solution to work in an independent set of test HTML/CSS/JavaScript files, but it cannot be integrated into the project. I have rewritten the HTML and Javascript of the main project a couple times, but the problem remains. What else might I try, or where else might I look, to resolve this difficulty?
Edit: To clarify – the first option is a working solution. I can run it in an independent HTML file, and it uploads and displays images. Yet, whenever and however I attempt to use this solution in the other project, the upload appears to be successful but the thumbnail image doesn't appear. This is the case even when the exact text of the solution above is pasted in, and this is a problem I have had with other solutions. I am asking for general troubleshooting advice – what I might do to understand where it is going wrong
Edit: Now I see that the functionality is there (i.e. images display correctly) in Firefox (Version 18.0.1), but images do not appear at all in Safari (Version 6.0.2). My revised question, then, is why would they not display in Safari?