Im back. Well, working with TK and I am trying to figure out a solution to be able to print a page. I tried WIN32::Printer but to no avail, I kept getting error -3 "Unable to connect to printer" I tried every possible solution (I think it might have to do with the fact that all printers are on a network and none are local to me) but anyway, I have since moved onto trying to build an HTML page and convert it to PDF, then linking to it from the program so they can print it.
I am getting this error:
Tk::Error: Can't write to '\CompletedOrder.gif-3128': Permission denie
+d at C:/Perl/lib/LWP/Protocol.pm line 105. at C:/Perl/lib/LWP/UserAge
+nt.pm line 891.
at C:/Perl/site/lib/PDF/FromHTML.pm line 141.
LWP::UserAgent::mirror at C:/Perl/lib/LWP/UserAgent.pm line 891
LWP::Simple::mirror at C:/Perl/lib/LWP/Simple.pm line 91
PDF::FromHTML::Twig::__ANON__ at C:/Perl/site/lib/PDF/FromHTML/Twig.p
+m line 192
XML::Twig::_twig_end at C:/Perl/site/lib/XML/Twig.pm line 2295
XML::Parser::Expat::parse at C:/Perl/lib/XML/Parser/Expat.pm line 474
XML::Parser::parse at C:/Perl/lib/XML/Parser.pm line 192
Carp::croak at C:/Perl/site/lib/Carp.pm line 100
XML::Twig::_croak at C:/Perl/site/lib/XML/Twig.pm line 2821
XML::Twig::_checked_parse_result at C:/Perl/site/lib/XML/Twig.pm line
XML::Twig::parse at C:/Perl/site/lib/XML/Twig.pm line 747
PDF::FromHTML::parse_file at C:/Perl/site/lib/PDF/FromHTML.pm line 14
PDF::FromHTML::convert at C:/Perl/site/lib/PDF/FromHTML.pm line 172
main::ViewSingleOrder at C:\BLABAD~1\/ViewOrder.pl line 244
I am using the following code (Taken from CPans Docs):
my $pdf = PDF::FromHTML->new( encoding => 'utf-8' );
# Loading from a file:
# Or from a scalar reference:
# Perform the actual conversion:
# With PDF::API2, font names such as 'traditional' also works
Font => 'font.ttf',
LineHeight => 10,
Landscape => 1,
# Write to a file:
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.
| & || & |
| < || < |
| > || > |
| [ || [ |
| ] || ] ||