?
Solved

khtml2png errors

Posted on 2010-08-24
7
Medium Priority
?
216 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

Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

Question has a verified solution.

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

Introduction This article explores the design of a cache system that can improve the performance of a web site or web application.  The assumption is that the web site has many more “read” operations than “write” operations (this is commonly the ca…
A quick Powershell script I wrote to find old program installations and check versions of a specific file across the network.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
Suggested Courses

649 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