Using wkhtmltopdf from a web page - wkhtmltopdf

I am looking for a solution to producing a pdf document from a web page and have read the good reviews of wkhtmltopdf. I might be missing something but it appears that it is only run from the command line on the machine being used. I have a site that is predominantly php, for which there is a log in, and a number of session variables and queries from a database are used to produce the html output. What I am looking for is a means by which I can add a single button on the html page created to generate the pdf version.
Also, while I have installed wkhtmltopdf locally and tested it out from the command line I can't see how can you call on the function from where my site is hosted.
I have used HTML2PDf in the past but it struggled with tables and so thought I would give wkhtmltopdf a go but I am not sure it will meet my needs. Can it do what I am asking of it?

Related

How do I disable notice log entries on wkhtmltopdf?

The Setup
I have a LAMP stack site that uses wkhtmltopdf to convert several html templates to pdf on demand by the customer. This is working fine.
Version: wkhtmltopdf 0.12.4 (with patched qt)
CentOS 6
The Problem
I occasionally review my error log to make sure the system is working and to debug errors that happen on the live server. However my log is filled with entries from wkhtmltopdf that look like this:
Loading pages (1/6)
Counting pages (2/6)
Resolving links (4/6)
Loading headers and footers (5/6)
Printing pages (6/6)
Done
I'm using the command like: wkhtmltopdf /temp/source/file.html
My Attempt
According to the documentation I can turn this off with the direction --log-level error. However If I include this the entire command fails.
The question
How do I turn off these notices to stop cluttering my log (nearly 80% of my log)? Was the command renamed and the documentation not updated? Is theri a different way to capture command line log entries and prevent them from writing to the log or redirect to a different log that I can cron scrape?

SASS autocompile on debian

i couldn't find any information on google for this so i thought i will just ask this general question.
we are developing a web app for customers who can change colors, fonts and stuff in their account through a simplified CustomDesigner (the name) Tab where they can pick colors from a color picker and fonts from a select-box and all this stuff.
currently all these dynamic changes are written through PHP in the CSS but we are working on a complete redesign and rework of the app and want to use the power of SASS for this.
my question is: is it possible to run ruby on a debian server and everytime a user changes some preferences in their account that ruby will compile the generated sass file or the "changed" variables into a new css file completely automatically?
if yes: how? i couldn't find anything at all about this topic.
if my using-example is not good enough and you can't imagine what i want:
think about the custom-bootstrap-builder, where you can simply change all the stuff from viewport-grid-size, fonts, font-sizes, border-radius and all that kind of stuff, and if you click on "download" it delivers a complete bootstrap version with your preselected preferences and downloads it completely automatically.
the download for my use-case is not necessary, instead i want the server to store that "compiled" file in a specific directory on the server and of course import it to the generated HTML.
after some more research and investing more time i found some "module" for nginx which is capable of processing less/sass/scss server side with nginx/LUA
https://github.com/titpetric/nginx-lesscss
i also found a PHP variant to use
https://github.com/leafo/scssphp/
i couldn't try any of these two, but it looks quite promising and i wanted to share if someone else has the same problem.

Is there a way to recover an entire website from the wayback machine?

My website files got corrupted and lost all the backup files somehow. Can any one please suggest the process to download entire site.
Its a simple html site. Once after downloading how can I host it ?
Please help
You can't use a regular crawler because the contents served have the original links, so you get out of the first page immediately when you're crawling it if you don't rewrite the links: in the browser they are rewritten with a client-side script to point back to the Wayback Machine.
If it's simple html, like you mentioned, and very small you might want to save the pages manually or even copy the contents by hand to a new website structure. If it's not small, then try the tools mentioned in the answers to this similar question in superuser: https://superuser.com/questions/828907/how-to-download-a-website-from-the-archive-org-wayback-machine
After downloading it you may have to check the structure of the files downloaded for links that may have been incorrectly rewritten or for missing files. The links that point to files that belong to the website should be local links and not external ones. Then you can host it again on a web hosting service of your preference.

Can sites built with Rapidweaver be worked on without Rapidweaver?

A friend has asked me to do some work on his existing site which was built in Rapidweaver. I'm on Windows, so is there another way I can access and edit his site?
The Rapidweaver project file is meant to be edited only in Rapidweaver, really. As far as I know, the only way around would be to use an HTML editor to modify the pages that are already in the server. However, I would not reccomend you to do it unless you are not going back to Rapidweaver anymore. Because changing the files in the server does not update your local Rapidweaver files. So, you could end up editing something in the server, then getting back to Rapidweaver and upload a "new" version that would not be completely up to date (the previous changes in the server version would be overriden by the older rapidweaver project).
For that kind of work, a CMS (Content Management System) is a more flexible way to work. Nowadays, one of the most common is Wordpress. It will require an inicial setup but after it is working it can be updated from anywhere via web browser, or even from an app in your iPhone. But it is not a Rapidweaver based sollution.
There are a couple CMS related plugins or stacks (Dropkick CMS, Armadillo, Easy CMS, Total CMS...) for Rapidweaver that could also be useful in this context. Once again, first you would need to buy a licence and to setup the website using one of those plugins or stacks. Only then you would be able to edit on the go.

Inherited a Joomla site, but only used to HTML and CSS. Is Dreamweaver still an option?

For about 12 years I've been working on a couple different web sites in Dreamweaver or even wayback in Homesite. That said, I've gotten very comfortable with the traditional set up of URLS with definite structures where you can logically follow the directory set-up and it was very clear how to program the relative/absolute links and more. I would either FTP the files through in Dreamweaver or would use some kind of Management Console. Recently I took a new job to help on a web site that currently lives and was built using Joomla. I'm looking to see if there is a way to get this entire site on my Hard Drive so I can work on it locally and then upload as pages are finished, or at the very least find out how best to work with this site.
Joomla has many things about starting a page from scratch, but I'm really trying my best to investigate a site that's already developed and find ways to make the necessary adjustments and take inventory of everything that's on the site. Any help would be much appreciated.
Thanks.
In order to administer a site in Joomla, there is no need to have any files locally. You can add, edit, and delete pages all through the administrative back end of the website. The entire site is built based on the query string of the URL. The string determines which component is displaying the content and which content to display.
There is really only one page in a Joomla site, the index.php file in the current template directory. Every page is built using that page. The only time you would need to modify that page is when there is a structural change in the site. Even then, if the template is well coded it should have various module positions available for use that collapse when they are not in use. This allows you to have a 3 column layout on one page and a 2 column layout on another simply by adjusting which modules display on a particular page.
I would highly recommend reading some tutorials before messing around with editing any files. Here are a few decent resources:
http://www.virtuosimedia.com/dev/php/joomla-administration-explained-a-joomla-15-admin-tutorial
http://www.joomlashack.com/tutorials
http://docs.joomla.org/Beginners
Part of the purpose of Joomla is to be able to manage the content of a website without requiring local copies of all the pages. So what you are asking sort of defeats the purpose of using Joomla in the first place. To do what you ask you would have to get an offline copy of the entire website, uninstall Joomla, and then upload your "static" copy. I would predict that the end result would be a web site that is very hard to maintain.
If you really really want to do this you could use a website copy tool like HTTrack. It supposed to be used to copy a website so you can browse offline, but the end result is what you are looking for: a local copy of the website.

Resources