Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re^2: CSS: @media print attributes

by AlexTape (Monk)
on Sep 14, 2011 at 12:01 UTC ( #925881=note: print w/replies, xml ) Need Help??


in reply to Re: CSS: @media print attributes
in thread CSS: @media print attributes

use strict; use CGI::Carp qw(fatalsToBrowser); use CGI ':standard'; use HTML::Barcode::Code93; my ($cgi,$code,$media); $media =<<END; @media print { BODY {background-color: inherit !important;background-image: inherit ! +important;} } END $cgi = new CGI; print $cgi->header(); print $media; $code = HTML::Barcode::Code93->new(text => 'code'); print $code->render; 1;
it still is a perl output..
$perlig =~ s/pec/cep/g if 'errors expected';

Replies are listed 'Best First'.
Re^3: CSS: @media print attributes
by Anonymous Monk on Sep 14, 2011 at 12:08 UTC

    But it has nothing to do with perl :)

    Its not interpreted by perl

    Its not validated by perl

    Its not displayed by perl

    Its a browser that refuses to print the background colors because that is a feature of the browser

    Its a browser user feature

    You can't circumvent this browser feature

    If a browser allowed random websites/htmlfiles to circumvent user features, it wouldn't be a very secure browser

    Think about it

    When users want to print pictures, browsers are pretty smart in actually printing pictures, maybe you want to give users a real picture (png/gif)

      i never conversed the argue ?! ;-) you can circumvent this with perl substitution of the pref.js temporarily during the label printing runtime. or laying down a ff profile and then invoke it with perl if you want to print a html bg. the postscript option is still the best way to go. security is not so much important because its for a local repository workspace in a locked environment. your right. it has no bearing on perl.
      $perlig =~ s/pec/cep/g if 'errors expected';

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://925881]
help
Chatterbox?
[james28909]: i am scraping a website and retrieving a date stamp of an article.
[james28909]: well time/data stamp of the article
[stevieb]: james28909: what's the problem/question?
[james28909]: it is not an absolute date like "27" or "31". sometimes it is like wednesday or friday
[james28909]: and i need to format those special instances into an absolute date instead of "yesterday"
[stevieb]: ask a question on SoPW, and include at least a half-dozen examples of the input, and at least one example of expected output
[davido]: Exactly: SoPW. This isn't going to be solved easily in the CB.
[james28909]: in need "yesterday" and so on, to be absolute like "1" or "31"
[stevieb]: ...and throw some of your existing code into the equation as well, just so readers know you've given a try at it ;)
[james28909]: ok

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (5)
As of 2017-04-29 02:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I'm a fool:











    Results (531 votes). Check out past polls.