Hi, Generating the pdf file but the image or content is not aligned to the top left corner. HTML file consists of the images & content. Please find the below code,
open(OUTHTML,"test.html); @pdf_lines = <OUTHTML>; close(OUTHTML); my $htmldoc = new HTML::HTMLDoc(); # $htmldoc->set_input_file("$filename"); $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->set_input_file($fl_name_new); $htmldoc->get_input_file(); $htmldoc->set_header('.', '.', '.'); $htmldoc->set_footer('.', '.', '.'); $htmldoc->embed_fonts('embedfonts',''); $htmldoc->no_embed_fonts(); my $pdf = $htmldoc->generate_pdf(); #print $pdf->to_string(); $pdf->to_file("test.pdf");
Thanks. Regards, Pavan
In reply to PDF generation based on the HTML by pavan_pothuru
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |