TOPIC:

zebra striped pdf report 2 months 2 weeks ago #270620

  • benw's Avatar Topic Author
  • benw
  • Offline
  • Junior Breezer
  • Junior Breezer
  • Posts: 41
  • Thanks: 0
Am trying to format a .pdf report as a zebra striped output.
I have now a myfile_pdf_attachment.php with the code as follows.
The issue is the background-color doesn't work. Can you advise how I should proceed.
Many thanks.

<style>
table,
th,
td {
border: 1px solid black;
border-collapse: collapse;
padding: 5px;
}

tr:nth-child(odd) {
background-color: #f2f2f2; <!-- doesn't work -->
}
</style>

<table width="100%">
<?php
if (count($xmldata)){
foreach ($xmldata as $data) {
?>
<tr style="height:8px";>
<td style="width:50% ">
<font size="12"><strong><?php echo wordwrap(htmlentities($data[_FF_DATA_TITLE], ENT_QUOTES, 'UTF-8'),50); ?>:</strong></font></style>
</td>
<td style="width:48%">
<strong><font size="12"><?php echo $data[_FF_DATA_TYPE] == 'Signature' && file_exists(JPATH_SITE.'/media/breezingforms/signatures/'.$data[_FF_DATA_VALUE]) ? '<img src="'.JPATH_SITE.'/media/breezingforms/signatures/'.$data[_FF_DATA_VALUE].'" />' : htmlentities(substr(is_array($data[_FF_DATA_VALUE]) ? implode('|',$data[_FF_DATA_VALUE]) : $data[_FF_DATA_VALUE],0,10000), ENT_QUOTES, 'UTF-8'); ?></font></strong>
</style>
</td>
</tr></style>
<?php

Please Log in or Create an account to join the conversation.

zebra striped pdf report 2 months 2 weeks ago #270621

  • Mirec's Avatar
  • Mirec
  • Away
  • Ultimate Breezer
  • Ultimate Breezer
  • Posts: 2486
  • Karma: 2
  • Thanks: 135
Hi,

could you please send "pdf file" to me in the attached, that I can test it on my server

regards,
Mirko

Please Log in or Create an account to join the conversation.

zebra striped pdf report 2 months 2 weeks ago #270622

  • benw's Avatar Topic Author
  • benw
  • Offline
  • Junior Breezer
  • Junior Breezer
  • Posts: 41
  • Thanks: 0
File attached
Attachments:

Please Log in or Create an account to join the conversation.

zebra striped pdf report 2 months 2 weeks ago #270624

  • Mirec's Avatar
  • Mirec
  • Away
  • Ultimate Breezer
  • Ultimate Breezer
  • Posts: 2486
  • Karma: 2
  • Thanks: 135
Hi,

oke, I will make a couple of tests, please give me a little time and I will back to you as soon as possible!

If you have more questions, feel free to ask!

Regards,
Mirko

Please Log in or Create an account to join the conversation.

zebra striped pdf report 2 months 2 weeks ago #270629

  • Mirec's Avatar
  • Mirec
  • Away
  • Ultimate Breezer
  • Ultimate Breezer
  • Posts: 2486
  • Karma: 2
  • Thanks: 135
Hi,

do you want to change the background color of all sheets or only the table?



regards,
Mirko
Attachments:

Please Log in or Create an account to join the conversation.

Last edit: Post by Mirec.

zebra striped pdf report 2 months 2 weeks ago #270630

  • benw's Avatar Topic Author
  • benw
  • Offline
  • Junior Breezer
  • Junior Breezer
  • Posts: 41
  • Thanks: 0
The goal is to have alternate lines with a light grey background for easier reading. The reports are printed, currently with a greyscale printer - no colour option

Please Log in or Create an account to join the conversation.

Time to create page: 0.071 seconds

BreezingForms Pro 1.4.7 for WordPress Released!

Available in the membership section.

September Discount!

Massive discounts on all subscriptions!

Get Your Subscription Here

Quick Links

Downloads

BreezingForms

ContentBuilder

BreezingCommerce

Templates

Documentation

BreezingForms

ContentBuilder

BreezingCommerce

Apprendre BreezingForms (French Community)

Apprendre et maîtriser BreezingForms par des tutoriels et exemples, le tout en français

breezingforms.eddy-vh.com

Questions et réponses sur les forums de l'AFUJ

AFUJ

Special Offer

Summer Sale! All subscriptions at a special price!

Includes prio support, all of our current and future Joomla!® extensions and Joomla!® templates for the duration of your membership.

Get it from here

3rd Party Discount - 25% Off

We help you to keep your costs under control. If you are a new member and purchased a form building tool from a different form vendor, then you'll get a 25% discount on our subscription plans.

How to receive the discount:

Send us a quick email to sales@crosstec.org with a proof of purchase (for example a paypal receipt), await payment instructions and enjoy your membership!