Posts Tagged ‘requirement’
Wednesday, February 8th, 2012
I had to create a number of Facebook and Twitter accounts for one of the companies where I am employed. As I had to put Avatars to each and every new account. I therefore had to resize the company logos to fit the to the avatar dimensions..
It took me a bit of research until I found the proper picture dimensions. Here are the dimensions:
For facebook page Avatar the good picture width / height dimensions is a square like:
151x151 pixels
If however you prefer to have a sky scraper picture in Facebook, this is possible as thumbnail pictures up to 180×540 w/h pixels are showing up in FB.
At most cases FaceBook automatically resizes the uploaded picture and generates a thumbnail which in most pictures looks okay, however in some odd picture dimensions the picture preview might be messy, so its better to ship the profile pic in standard square size like 151×151, 256×256, 313×313 etc.
For Twitter page Avatar the fixed picture width / height dimensions is:
73x73 pixels
In Twitter again the avatar picture should be a square like, to have twitter during upload automatically resize and make a good looking pic thumbnail. If some picture with a non square dimensions is uploaded as an Avatar for twitter account usually, twitter's pic auto resize server side program chops parts of the picture. This is not a bug but expected behaviour. In Twitter another requirement is that the uploaded avatar image does not exceed 700kb, trying to puload a picture over 700k fails.
In both Facebook and Twitter the uploaded Avatar logo should be in format JPEG, GIF or PNG .
To resize the company logo pictures for FB and Twitter, I used GIMP 's:
Image -> Scale Image
menus.
I've red some people claiming the size of the Avatar logo in Facebook could have some impact in terms of e-marketing, but I'm not sure if this is a fact or some false rumour. Anyways it is sure that a wide sky scraper like picture allows you to show more even from the profile and maybe through the picture have larger influence over the audience.
If you're new here, you may want to subscribe to my RSS feed. Thanks for visiting!
Tags: Auto, avatar, avatar image, avatars, behaviour, company logo, company logos, Draft, facebook, false rumour, fb, format, format jpeg, GIF, GIMP, height, height dimensions, Image, image menus, impact, influence, JPEG, logo, marketing, nbsp, non, number, page, picture, pixel, pixelsIf, pixelsIn, png, Profile, puload, requirement, resize, scale, scale image, server side, side, size, sky, sky scraper, square dimensions, thumbnail, twitter, upload, wide sky, width
Posted in Various, Web and CMS | 1 Comment »
Friday, September 30th, 2011

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 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 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/ 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/ 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.
Tags: apple, authentication support, CentOS, choice, command, command line utility, content support, conversion, DEBUG, DoneIf, fedora, freak, generation, gnu linux, Grayscale, Initialize, Javascript, Landscape, landscape portrait, line, Linux, linux versions, loading page, low quality, nbsp, online, Open, open source, OpenOffice, orientation, page, password, PDF, pdf content, pdf size, portrait options, printing, quality pdf, repositories, requirement, Set, size a4, snapshot, something, squeeze, static version, support, table of content, tool, Ubuntu, use, Useful, web developers, web page, Webkit, webpage, www
Posted in Linux Audio & Video, System Administration, Various, Web and CMS | 1 Comment »
Saturday, June 18th, 2011
After installing the Tweet Old Post wordpress plugin and giving it, I've been returned an error of my PHP code interpreter:
Call to undefined function: curl_init()
As I've consulted with uncle Google's indexed forums
discussing the issues, I've found out the whole issues are caused by a missing php curl module
My current PHP installation is installed from the port tree on FreeBSD 7.2. Thus in order to include support for php curl it was necessery to install the port /usr/ports/ftp/php5-curl :
freebsd# cd /usr/ports/ftp/php5-curl
freebsd# make install clean
(note that I'm using the php5 port and it's surrounding modules).
Fixing the Call to undefined function: curl_init() on Linux hosts I suppose should follow the same logic, e.g. one will have to install php5-curl to resolve the issue.
Fixing the missing curl_init() function support on Debian for example will be as easy as using apt to install the php5-curl package, like so:
debian:~# apt-get install php5-curl
...
Now my tweet-old-post curl requirement is matched and the error is gone, hooray
Tags: call to undefined function, Debian, ERROR, fatal error, freebsd, function, google, hooray, init function, installation, interpreter, issue, Linux, linux hosts, logic, Module, necessery, note, Old, order, package, php code, php installation, plugin, port, ports, post, requirement, support, tree, usr
Posted in FreeBSD, Linux, Wordpress | No Comments »