Solved

khtml2png errors

Posted on 2010-08-24
7
208 Views
Last Modified: 2014-07-13
Works great when I disable javascript:

khtml2png2   --display :2  --width 1024  --height 768  --time 42  --disable-js  --disable-java  --disable-plugins --disable-redirect  --disable-popupkiller http://www.whatsthebigidea.com/ ./website.png

However, when I run with js:

khtml2png2   --display :2  --width 1024  --height 768  --time 42  --disable-java  --disable-plugins --disable-redirect  --disable-popupkiller http://www.whatsthebigidea.com/ ./website.png
kbuildsycoca running...
KCrash: Application 'khtml2png2' crashing...
Could not find 'drkonqi' executable.
KCrash cannot reach kdeinit, launching directly.

I suspect it has to do with the browser that khtml is using. Any suggestions.
0
Comment
Question by:whatsthebigidea
  • 3
  • 2
7 Comments
 
LVL 18

Expert Comment

by:TobiasHolm
ID: 33548640
Hi!

Are you using the latest version of khtml2png2? What OS and version of it are you using? 32 or 64 bit?

Regards, Tobias
0
 

Author Comment

by:whatsthebigidea
ID: 33549082
I got it working though can't seem to achieve a good integration with WordPress. Thanks for your reply though.
0
 
LVL 18

Expert Comment

by:TobiasHolm
ID: 33549406
Ok, great! What's the solution?

Regards, Tobias
0
 

Accepted Solution

by:
whatsthebigidea earned 0 total points
ID: 33550148
it needs the --nograb option
  because it tries to grab the mouse and it fails in shell
2:59 PM the --nograb forces it to ignore the mouse
  so do i mark it as completed?

<?php
$mykey_values = get_post_custom_values('web');
foreach ( $mykey_values as $key => $value ) {
$output_file = $value.".png";
echo $value." <br/ >";
if (!file_exists($output_file)){
$cmd = "khtml2png2 --display :2".
" --width 800".
" --height 600".
" --time 15".
" --disable-java".
" --disable-plugins".
" --disable-redirect".
" --disable-popupkiller".
" --nograb".
http://".$value.
" ".$output_file;


while(!file_exists($outpu
  t_file)) { sleep(1); }

echo ''.$value.' ';
}else{
echo ''.$value.' ';
}
}
?>

However, like I stated before I didn't have much luck integrating with WordPress
0
 
LVL 18

Expert Comment

by:TobiasHolm
ID: 33554469
Yes, you can select your comment with the solution as the correct answer if you want to close this question!

>However, like I stated before I didn't have much luck integrating with WordPress

What's the problem? Do you want to update the png-file that khtml2png2 creates at regular intervals, or something else?

Regards, Tobias
0

Featured Post

Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

1. Introduction As many people are interested in Linux but not as many are interested or knowledgeable (enough) to install Linux on their system, here is a safe way to try out Linux on your existing (Windows) system. The idea is that you insta…
This article is meant to give a basic understanding of how to use R Sweave as a way to merge LaTeX and R code seamlessly into one presentable document.
Learn the basics of while and for loops in Python.  while loops are used for testing while, or until, a condition is met: The structure of a while loop is as follows:     while <condition>:         do something         repeate: The break statement m…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

829 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question