Ana içeriğe atla

Chrome print web page to pdf font size

Lately I am in a search for converting some web pages to pdf. There are a lot of options, ways to do this. I tried a simple and working one for my case, because there are lots of mathematical symbols on the web page. As you might guess, not all of web page converters are good at math.
Thanks to this post, I found an easy and powerful way. I used Chrome, but I believe this can be done with no hassle with Firefox. Both of the browsers allow saving a web page as a pdf file seamlessly. But in my case I wished to decrease web page's font size a little, to make it fancy looking. I tried zooming out options installed in browser with no help. Because as you might know, those options are futile when printing the page.
I must have found a way to interfere printing progress to make font size smaller. This extension Stylish, which I wasnt aware till I read the post in stackoverflow's site, make this easy. As suggested by the poster I have added some css instructions by using Stylish. It was so simple, just a line made the job.
@media print { body  {font-size: x-small ; } ;}
I have added this line to stylish and when I was printing web page to pdf, this line is activated and I was happy.
Story didnt stop here. I realised later that Chrome adds web address and page numbers as headers and footer to pdf file. You can easily disable them but can not customize them. Namely I wished only page numbers appear on pdf file not the web adress it is originated. After some search I understood that this is not possible with the version of Chrome I am using (actually not possible with any Chrome) so I must switch to my old friend Firefox. Because it has the feature enable customizing headers and footers. Later of course I needed to install Stylish extension to Firefox. But as you guessed it, it was just a click away. So the story seems to end here.
BTW let me mention also a Google service which seems to be helpful when converting web pages to pdf files, Google Cloud print. It has some other features which I dont want to learn. But here is a good place to mention.

Yorumlar

Bu blogdaki popüler yayınlar

An Awk feature

I was trying to use sub (or gsub) function in awk to delete an \r from the end of line. For that purpose I used dum=sub(/\r/,"",$0) and thought that the variable "dum" will be filled with the changed value of $0. But I realised that sub function only make the change and returns 0,1 accordingly. So I wrote like this sub(/r/,"") ; x=$0;

Centos 6 Postgresql 9.1 Install

Today I have changed my mind and decided to begin learning and using Postgresql. On a Centos 6 host there are some ways of installing Postgresql. I have chosen the easy one: use repos. Here http://yum.pgrpms.org/repopackages.php is the official Postgresql repos for Red Hat related distros. I have chosen the x86_64 rpm for Centos 6 and installed it. Later using yum install postgresql91-server I have installed three packages postgresql91,postgresql91-server and postgresql91-libs which is enough for now to start Postgresql 9.1. Using the instructions at /usr/share/doc/postgresql91-9.1.1/README.rpm-dist , I first did service postgresql-9.1 initdb and then service postgresql-9.1 start.Voila! Now let the journey begin! Edit:  Here is another place to look instructions http://www.postgresonline.com/journal/archives/203-postgresql90-yum.html

OpenBSD Nfsen install

I was  trying to find a solution for network monitoring as a friend's request. OpenBSD is the firewall. I saw the Nfsen packages and installed to a 5.2 server. After some effort trying to understand what is going on behind, I realised that Netflow is a protocol by Cisco designed to export router traffic to outside. And OpenBSD has a support of it with pflow interface. First I made a new pflow0 interface like ifconfig pflow0 flowdst 127.0.0.1:9998 flowsrc 127.0.0.1 up Then made some configuration changesto /etc/nfsen.conf and /var/www/htdocs/nfsen/conf.php. Because Apache in OpenBSD runs in chrooted by default, if you dont make the necessary changes in these pages you got an error stating  ERROR: nfsend connect() error: Permission denied!  ERROR: nfsend - connection failed!!  ERROR: Can not initialize globals! which is because apache cant reach the communication socket which is initially  located at $PIDDIR/nfsen.comm namely /var/db/nfsen/run direc...