#!/usr/bin/perl use strict; use warnings; use HTML::HTMLDoc; open( 'OUTHTML', '>>', 'test.html' ); my @pdf_lines = <OUTHTML>; close(OUTHTML); my $htmldoc = new HTML::HTMLDoc(); $htmldoc->set_html_content(qq~<html><body>A PDF File</body></html>~); $htmldoc->set_input_file('/user/Desktop/PDF'); $htmldoc->set_page_size('letter'); $htmldoc->set_top_margin( 'top', -500, -500 ); $htmldoc->set_bottom_margin( 'bottom', -500, -500 ); $htmldoc->set_left_margin( 'left', -400, -400 ); $htmldoc->set_right_margin( 'right', -400, -400 ); $htmldoc->set_pagemode( 'pagemode', 'fullscreen' ); $htmldoc->set_html_content(qq~@pdf_lines~); $htmldoc->get_html_content(); $htmldoc->get_input_file(); $htmldoc->set_header( '.', '.', '.' ); $htmldoc->set_footer( '.', '.', '.' ); $htmldoc->embed_fonts( 'embedfonts', '' ); $htmldoc->no_embed_fonts(); my $pdf = $htmldoc->generate_pdf(); $pdf->to_file('test.pdf');
In reply to Re: PDF generation based on the HTML
by Khen1950fx
in thread PDF generation based on the HTML
by pavan_pothuru
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |