Solved

khtml2png errors

Posted on 2010-08-24
7
209 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

One of the typical problems I have experienced is when you have to move a web server from one hosting site to another. You normally prepare all on the new host, transfer the site, change DNS and cross your fingers hoping all will be ok on new server…
If you don't have the right permissions set for your WordPress location in IIS, you won't be able to perform automatic updates. Here's how to fix the problem.
Learn the basics of modules and packages in Python. Every Python file is a module, ending in the suffix: .py: Modules are a collection of functions and variables.: Packages are a collection of modules.: Module functions and variables are accessed us…
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 …

697 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