?
Solved

khtml2png errors

Posted on 2010-08-24
7
Medium Priority
?
214 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Get MongoDB database support online, now!

At Percona’s web store you can order your MongoDB database support needs in minutes. No hassles, no fuss, just pick and click. Pay online with a credit card. Handle your MongoDB database support now!

Question has a verified solution.

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

In threads here at EE, each comment has a unique Identifier (ID). It is easy to get the full path for an ID via the right-click context menu. However, we often want to post a short link within a thread rather than the full link. This article shows a…
When it comes to security, close monitoring is a must. According to WhiteHat Security annual report, a substantial number of all web applications are vulnerable always. Monitis offers a new product - fully-featured Website security monitoring and pr…
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
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 …
Suggested Courses

800 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