Can I configure this function to make it print a certain pixel only?
Around 500px X 700px Center.
<script language="javascript">
... function printpage()
{
window.print();
}
</script>
Is it possible?
Can I configure this function to make it print a certain pixel only?
Around 500px X 700px Center.
<script language="javascript">
... function printpage()
{
window.print();
}
</script>
Is it possible?
Can I configure this function to make it print a certain pixel only?
Around 500px X 700px Center.
<script language="javascript">
... function printpage()
{
window.print();
}
</script>
Is it possible?
Yes but only if your "certain pixel" is addressable with a CSS selector, in which case you can set a CSS @media
rule to hide everything else, eg.:
@media print {
* { display: none; }/* or visibility: hidden */
#myPixel { display: inline; }
}
A pixel rendered as part of more extensive contents of an HTML element is non-addressable with CSS and the @media method cannot be used.
A possible alternative, if you know exactly where the pixel is on the page in absolute terms, would be to mask out everything else with a set divs with opaque white backgrounds leaving your single pixel showing through a 1px x 1px gap. The masks could be constructed/managed with javascript.
Airshow
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.