My webapp, which was created using PhoneGap and jQuery Mobile, contains a link to a PDF file. Currently the code says
Open File
When I click the link, a PDF viewer opens. The right number of pages is displayed, but they are all blank.
Update
I believe my previous problem was caused by PhoneGap, and that I should instead use PhoneGap's InAppBrowser Plugin.
Following these instructions, I now have this function:
function goToFile() {
cordova.InAppBrowser.open('my-file.pdf', '_blank');
}
However, like before, the PDF opens, but every page is blank.
Another Update
I discovered that the PDF only showed up blank when I linked to the PDF using a relative path or the absolute path from my localhost. When I linked to version of the PDF we have hosted on Github Pages, it showed up fine.
I would still like to know why the line of code above does not work, though.
Related
I write HTML and CSS code in VS Code and for previewing it I need to open file explorer then files then double click them to open them in my default browser.
it takes too much time. is there any proper way for this?
I have tried one live extension called live server but the problem with it is we have to click the 'go live' button any time I want to refresh the code.
If the live server extension is the one by Ritwick Dey..
.. then then after clicking Go Live, it will open your page in the default browser and reload it automatically, every time you save your work.
in some cases, it is helpful to save the folder containing your HTML to a Workspace, in VS Code, especially if you are writing an app using the MVC modal and the HTML and CSS are in subfolders.
You can install an extension called open in browser.
After installation complete restart vscode and go to settings Ctrl + ,. Search for Open-in-browser setting and set your default browser as you can see below:
Then whenever you edit a html file, you can use shortcut Alt + B to open this file in browser.
I am using gulp task in my project, and when i open the project in browser, sometimes it says app.css is not available, but when i enter the same css url to another tab it opens correctly. cant understand is it a gulp problem or some other.
I'm creating a extension and here is what I want to do.
I have site "www.aaa.com" and the extension I developed can read and navigate DOM element by javascript. However, when I click the extension icon, I'd like get and read the HTML source from "www.bbb.com".
The current page is "www.aaa.com", but want to get the source of "www.bbb.com" in the current page.
How can I do this??
When I try to save a web page using the format "Web Page, Complete," half of the time it only saves the the folder containing the style sheet and images, and the .html file is not saved anywhere on my hard drive. How do I correct this? I have noticed it also happens when I use Safari, so it is not just an isolated issue with Google Chrome.
First save the whole page (webpage,complete) which may only save the folder containing the style sheets and images, again press CTRL+S to save the page but this time select to save only the HTML page by clicking on- (webpage,HTML only).
When directory is saved but not the file, try the following:
In "File name:" include the .html extension (example:
SampleFileName.html), and
Select Webpage, Complete in "Save as Type:"
Seems to fix the bug.
I have a web application coded in C#/ASP.NET. The application basically exports a PDF file when the user click on Save. It then reloads a DIV, putting the EMBED (with the src pointing to the newly generated pdf file) in it. Sometimes the embed area just gets black and I get this window from Acrobat Reader: http://img180.imageshack.us/img180/3359/acreader.jpg. What does it mean? Has anyone ever see this?
embedding PDF's in web pages is pretty rubbish overall. Try using the open source lib FlexPaper instead;
http://flexpaper.devaldi.com