Posts Tagged ‘low quality’

Bulgaria must be out of the European Union!

Wednesday, February 20th, 2013

Bulgaria to be out of European Union immediately. The only hope for restoration of Bulgarian Economy

Bulgaria is European Union state member since January 1 2007. I write this words with deep regret. We Bulgarians have already a bitter experience for being in hard conditions, practically the situation in Bulgaria is like this since the complete fall of Communism in 1991. We've been lied to hav better future in the European Union over the last years. 6 Years passed since our acceptance in EU and for this years I can say nothing changed for good in our country. We've seen "how good and bright" future awaits in the European Union over the last years. It is all lies, nothing changed for good for us Bulgarians, not that the communism was different but at least in Communism we had some working economy, now with this EU and all the restrictions (quotas for production), conditions to meet factories to close and reduction of our Atomic energy blocks, we've been totally wasted. If you walk the street you see the desperation and the absurdity of everything in my homeland. It is more than clear, that we need change and the only change can happen if we get out of the European Union. Our politicians made a huge mistake, for lobbying to join the EU. We become another waste country for Western second hand cars – a car graveyard. The old and hard to recycle cars has been pushed to my country. Old computers, low quality food from West, idiotic change of already working systems in the government with dis-functional Computerized ones. This is a very small list of all the shit we got from the EU. Big food store chains expanded there market, we are used for cheap labor and a hot-point for call-centers. We Bulgarians are literally used and abused by Western Civilization. We were bought as white slaves for "candies" and empty promises. If our politicians don't wake up and see Bulgaria is impossible to survive within the abnormal European Union our country is doomed. anyways we should not desparate, there is hope for us. God will help us for we've been tortured for 5 centuries by Turkish, we stopped invasion of Turks to Western Europe historically, we saved the Jews from extermination during Second World War. Bulgarians have always been a honest and good minded people. Now with this technological insanity adopted from the west and all the "going nowhere" of European union we're a miserable victim. Wake up dear Bulgarians, we have nothing in common with the European Union, neither writing, nor language nor our 15 century culture merges with most of EU countries. Even in religious aspect we're different. AThe only way with future for Bulgaria is out of the European Union and join forces with our Russian, Belarusian and other Slavonic brother nations. Rise brothers and sisters and lobby for Bulgaria being out of the European Union!!!!

SAY NO TO EUROPEAN UNION – SAY ES TO BULGARIAN FUTURE !!!!

How to convert any internet Webpage to PDF from command line on GNU/Linux

Friday, September 30th, 2011

Linux webpage html to pdf command line convertor wkhtmltopdf

If you're looking for a command line utility to generate PDF file out of any webpage located online you are looking for Wkhtmltopdf
The conversion of webpages to PDF by the tool is done using Apple's Webkit open source render.
wkhtmltopdf is something very useful for web developers, as some webpages has a requirement to produce dynamically pdfs from a remote website locations.
wkhtmltopdf is shipped with Debian Squeeze 6 and latest Ubuntu Linux versions and still not entered in Fedora and CentOS repositories.

To use wkhtmltopdf on Debian / Ubuntu distros install it via apt;

linux:~# apt-get install wkhtmltodpf
...

Next to convert a webpage of choice use cmd:

linux:~$ wkhtmltopdf www.pc-freak.net www.pc-freak.net_website.pdf
Loading page (1/2)
Printing pages (2/2)
Done

If the web page to be snapshotted in long few pages a few pages PDF will be generated by wkhtmltopdf
wkhtmltopdf also supports to create the website snapshot with a specified orientation Landscape / Portrait

-O Portrait options to it, like so:

linux:~$ wkhtmltopdf -O Portrait www.pc-freak.net www.pc-freak.net_website.pdf

wkhtmltopdf has many useful options, here are some of them:
 

  • Javascript disabling – Disable support for javascript for a website
  • Grayscale pdf generation – Generates PDf in Grayscale
  • Low quality pdf generation – Useful to shrink the output size of generated pdf size
  • Set PDF page size – (A4, Letter etc.)
  • Add zoom to the generated pdf content
  • Support for password HTTP authentication
  • Support to use the tool over a proxy
  • Generation of Table of Content based on titles (only in static version)
  • Adding of Header and Footers (only in static version)

To generate an A4 page with wkhtmltopdf:

wkhtmltopdf -s A4 www.pc-freak.net/blog/ www.pc-freak.net_blog.pdf

wkhtmltopdf looks promising but seems a bit buggy still, here is what happened when I tried to create a pdf without setting an A4 page formatting:

linux:$ wkhtmltopdf www.pc-freak.net/blog/ www.pc-freak.net_blog.pdf
Loading page (1/2)
OpenOffice path before fixup is '/usr/lib/openoffice' ] 71%
OpenOffice path is '/usr/lib/openoffice'
OpenOffice path before fixup is '/usr/lib/openoffice'
OpenOffice path is '/usr/lib/openoffice'
** (:12057): DEBUG: NP_Initialize
** (:12057): DEBUG: NP_Initialize succeeded
** (:12057): DEBUG: NP_Initialize
** (:12057): DEBUG: NP_Initialize succeeded
** (:12057): DEBUG: NP_Initialize
** (:12057): DEBUG: NP_Initialize succeeded
** (:12057): DEBUG: NP_Initialize
** (:12057): DEBUG: NP_Initialize succeeded
Printing pages (2/2)
Done
Printing pages (2/2)
Segmentation fault

Debian and Ubuntu version of wkhtmltopdf does not support TOC generation and Adding headers and footers, to support it one has to download and install the static version of wkhtmltopdf
Using the static version of the tool is also the only option for anyone on Fedora or any other RPM based Linux distro.