Solved

khtml2png errors

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

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Article by: kevp75
Hey folks, 'bout time for me to come around with a little tip. Thanks to IIS 7.5 Extensions and Microsoft (well... really Windows 8, and IIS 8 I guess...), we can now prime our Application Pools, when IIS starts. Now, though it would be nice t…
The purpose of this article is to show how we can create Linux Mint virtual machine using Oracle Virtual Box. To install Linux Mint we have to download the ISO file from its website i.e. http://www.linuxmint.com. Once you open the link you will see …
Learn the basics of lists in Python. Lists, as their name suggests, are a means for ordering and storing values. : Lists are declared using brackets; for example: t = [1, 2, 3]: Lists may contain a mix of data types; for example: t = ['string', 1, T…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

707 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now