LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-21-2008, 11:39 AM   #1
vamsi_k
Member
 
Registered: Aug 2008
Posts: 66

Rep: Reputation: 18
htmldoc problem


OS: centos 5.2

installed htmldoc-1.8.27-5.0.el5 , HTML-HTMLDoc-0.10

i created a sample.html and wrote :

<table border=22>
<tr>
<td>1</td><td>2</td><td>3</td>
</tr>

<tr>
<td>1</td><td>2</td><td>3</td>
</tr>

<tr>
<td>1</td><td>2</td><td>3</td>
</tr>

<tr>
<td>1</td><td>2</td><td>3</td>
</tr>

</table>


*******

created html_2_pdf.pl

and wrote

#!/usr/bin/perl -w
use HTML::HTMLDoc;

my $htmldoc = new HTML::HTMLDoc();
$htmldoc->disable_encryption();
my $strplan=$ARGV[0];
my $filename=$ARGV[1];
$htmldoc->set_permissions('all');
$htmldoc->set_output_format('pdf');

$htmldoc->set_input_file('/path/of/file'.$strplan.'.html');
$htmldoc->set_footer('.','.','.');
my $pdf = $htmldoc->generate_pdf();

$pdf->to_file('/path/of/file/'.$filename.'.pdf');

***

and as a non root user when i run

perl html_2_pdf.pl sample.html test.pdf

file is creating but no data is written in that file

same when i run as a root user the its working fine.

i gave most of the files and folders 777 permissions.


what more permissions should be given to non root user to run the

command perl html_2_pdf.pl sample.html test.pdf
sucessufully.

i installed perl packages :

perl-Digest-SHA1-2.11-1.2.1
perl-Digest-HMAC-1.01-15
perl-HTML-Tagset-3.10-2.1.1
perl-Net-SSLeay-1.30-4.fc6
perl-5.8.8-10
perl-Socket6-0.19-3.fc6
perl-Compress-Zlib-1.42-1.fc6
perl-Archive-Tar-1.30-1.fc6
perl-Net-IP-1.25-2.fc6
perl-libwww-perl-5.805-1.1.1
perl-IO-Zlib-1.04-4.2.1
perl-String-CRC32-1.4-2.fc6
perl-HTML-Parser-3.55-1.fc6
perl-DBI-1.52-1.fc6
perl-IO-Socket-INET6-2.51-2.fc6
perl-DBD-MySQL-3.0007-1.fc6
perl-URI-1.35-3
perl-Net-DNS-0.59-3.el5
perl-IO-Socket-SSL-1.01-1.fc6

any ideas ?

Last edited by vamsi_k; 10-21-2008 at 01:33 PM.
 
Old 11-27-2008, 07:21 AM   #2
vamsi_k
Member
 
Registered: Aug 2008
Posts: 66

Original Poster
Rep: Reputation: 18
when i tried with php code it worked fine and the problem is solved.

htmldoc can be used with java , perl and php
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
htmldoc - a different input from an html file - cubax Linux - General 1 05-16-2005 12:54 AM
htmldoc problem j-ray Linux - Software 6 09-04-2004 02:55 AM
Problem in running htmldoc satimis *BSD 2 06-22-2004 09:29 PM
Help installing HTMLDOC natto34 Linux - Software 1 07-06-2002 02:45 PM
Prob. installing HTMLDoc natto34 Linux - Software 0 07-05-2002 10:14 PM


All times are GMT -5. The time now is 07:09 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration