Jump to content

pdf output problem


dpp

Recommended Posts

Hello, 

 

I have a problem with the pdf output file from my system.

 

The code is:

<table>
<tr>
<td align="center"><strong><?php echo JText::_('VRCORDERNUMBER'); ?></strong></td>
<td align="center"><strong><?php echo JText::_('VRCCONFIRMATIONNUMBER'); ?></strong></td>
<td align="center"><strong><?php echo JText :: _('VRLIBSEVEN'); ?></strong></td>
<td align="center"><strong><?php echo JText::_('VRLIBEIGHT'); ?></strong></td>
</tr>
<tr>
<td align="center">{order_id}</td>
<td align="center">{confirmnumb}</td>
<td align="center"><span style="color: {order_status_class};">{order_status}</span></td>
<td align="center">{order_date}</td>
</tr>
</table>
 
<h4><?php echo JText::_('VRLIBNINE'); ?>:</h4>
<p>{customer_info}</p>
 
<p><strong><?php echo JText::_('VRLIBTEN'); ?>:</strong> {item_name}</p>
 
<table>
<tr>
<td align="center"><strong><?php echo JText::_('VRLIBELEVEN'); ?></strong></td>
<td align="center"><strong><?php echo JText::_('VRRITIROCAR'); ?></strong></td>
<td> </td>
<td align="center"><strong><?php echo JText::_('VRLIBTWELVE'); ?></strong></td>
<td align="center"><strong><?php echo JText::_('VRRETURNCARORD'); ?></strong></td>
</tr>
<tr>
<td align="center">{pickup_date}</td>
<td align="center">{pickup_location}</td>
<td> </td>
<td align="center">{dropoff_date}</td>
<td align="center">{dropoff_location}</td>
</tr>
</table>
 
<p> <br/><br/></p>
      
<h4><?php echo JText::_('VRCORDERDETAILS'); ?>:</h4>
<br/>
<table width="100%" align="center" style="border: 1px solid #DDDDDD;">
<tr><td bgcolor="#C9E9FC" width="30%" style="border: 1px solid #DDDDDD;"></td><td bgcolor="#C9E9FC" width="10%" align="center" style="border: 1px solid #DDDDDD;"><?php echo JText::_('VRCPDFDAYS'); ?></td><td bgcolor="#C9E9FC" width="20%" style="border: 1px solid #DDDDDD;"><?php echo JText::_('VRCPDFNETPRICE'); ?></td><td bgcolor="#C9E9FC" width="20%" style="border: 1px solid #DDDDDD;"><?php echo JText::_('VRCPDFTAX'); ?></td><td bgcolor="#C9E9FC" width="20%" style="border: 1px solid #DDDDDD;"><?php echo JText::_('VRCPDFTOTALPRICE'); ?></td></tr>
{order_details}
{order_total}
</table>
, you can see it in the enclosure.
I want {order_details} and {order total} to be justified to center or tot the right, not to the left.
 
Can someone help me?
 
BRGDS
 
 
 

post-173399-0-80359000-1414752181_thumb.png

Link to comment
Share on other sites

 

 

Can someone help me?

With what? :shrug:  You have only posted some code and an extremely small screenshot which is hard to see.

 

Atleast explain what it is you are wanting to do.

 

 

Also when posting code please wrap it within


tags (or click the <> button in the editor)

Link to comment
Share on other sites

Try using css instead of those repetitive inline styles you are using.  How tedious and boring!  Then add one that says

 

[css]

td

{  text-align:center;|

[/css]

 

AND - what pdf?  I see no attempt here to produce a pdf file.

Edited by ginerjm
Link to comment
Share on other sites

Ok, i'll try to explane. 

 

I have a form where the clients make orders. When i confirm the order from the back end the system generates a pdf lile with the order details and sends it to the client by e-mail. The code is from the pdf.php file witch is responsible for generating this file with the order.

I want {order details} and {order total} to be adjusted to center or to the right but not to the left, how it is now.

 

 

post-173399-0-11079600-1414791232_thumb.png

Link to comment
Share on other sites

We (me anyway) are still not clear on what you want to alter.  Do you want 'fix' a PDF output (as your title suggested) or do you want to alter some HTML output?

 

And to continue the pdf discussion - pdfs are created thru some specialized processing.  So far as I know there is no easy way to just produce an html template/screen/image and have a pdf file produced from it.  You gotta do the work to layout your report and output to a pdf file.  I use FPDF which is pretty simple to use, after a small learning curve.

Link to comment
Share on other sites

have you even tried the suggestions that were gave to you on post # 3  http://forums.phpfreaks.com/topic/292188-pdf-output-problem/?do=findComment&comment=1495360

and/or post #8 http://forums.phpfreaks.com/topic/292188-pdf-output-problem/?do=findComment&comment=1495430

 

that suggestions could or couldn't work, but is up to you to try it in this part of your code:



 

bgcolor="#C9E9FC" width="20%" style="border: 1px solid #DDDDDD;"><?php echo JText::_('VRCPDFTOTALPRICE'); ?></td></tr>

{order_details}
{order_total}
</table>

 

 

 

Edited by mikosiko
Link to comment
Share on other sites

Methinks you are not doing anything to Learn how to be a programmer.  Have you done any reading on the items brought up in these posts?  Have you done any reading at all on becoming a programmer/develop, etc.?  If not then you probably want to pass this project (?) off to someone who is trying or is capable already.

 

Just my $.02.  Signing off as well.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.