Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Remove region space when printing using @media print css

RLOGJan 6 2018 — edited Jan 6 2018

Hi

I have an interactive report region with QR codes which I want to print. I used @media print to remove other regions by creating a copy of the standard page template and including the following in the header section as per The APEX Lab: Printing Main Content Only :

<style type="text/css">

.print-only{ display: none; }

@media print

{ body * { visibility:hidden; }

#print-content, #print-content * { visibility:visible; }

#print-content { position:absolute; left:0; top:0; }

.print-only { display: block; }

.no-print { display:none; } }

</style>

I then wrapped the #BODY# part of the body template in a print-content div.

This worked great in that it removed everything else from the page when I go to print, however it still keeps the space where other regions would be, which I don't want (see image). I spent a couple hours messing around with CSS but haven't been able to figure it out. Can anyone advise?

Also bonus question - is there any css I can use to make the report fit the page as well as possible? I know I can do it manually using zoom but wonder if there is another dynamic way?

Thanks

media_print.PNG

This post has been answered by askMax - Maxime Tremblay on Jan 6 2018
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 3 2018
Added on Jan 6 2018
6 comments
770 views