dpp Posted October 31, 2014 Share Posted October 31, 2014 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 Quote Link to comment https://forums.phpfreaks.com/topic/292188-pdf-output-problem/ Share on other sites More sharing options...
Ch0cu3r Posted October 31, 2014 Share Posted October 31, 2014 Can someone help me? With what? 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) Quote Link to comment https://forums.phpfreaks.com/topic/292188-pdf-output-problem/#findComment-1495357 Share on other sites More sharing options...
mikosiko Posted October 31, 2014 Share Posted October 31, 2014 Is not just a matter of enclose those in some html element (like span p.e) and apply whichever CSS style you want?... Same way that you are doing in other parts of you code Quote Link to comment https://forums.phpfreaks.com/topic/292188-pdf-output-problem/#findComment-1495360 Share on other sites More sharing options...
ginerjm Posted October 31, 2014 Share Posted October 31, 2014 (edited) 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 October 31, 2014 by ginerjm Quote Link to comment https://forums.phpfreaks.com/topic/292188-pdf-output-problem/#findComment-1495367 Share on other sites More sharing options...
dpp Posted October 31, 2014 Author Share Posted October 31, 2014 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. Quote Link to comment https://forums.phpfreaks.com/topic/292188-pdf-output-problem/#findComment-1495398 Share on other sites More sharing options...
ginerjm Posted October 31, 2014 Share Posted October 31, 2014 You want the PDF to be altered to center some things, or your html output? Quote Link to comment https://forums.phpfreaks.com/topic/292188-pdf-output-problem/#findComment-1495411 Share on other sites More sharing options...
dpp Posted November 1, 2014 Author Share Posted November 1, 2014 data within the table. Now you can see the picture - it is on the left. Quote Link to comment https://forums.phpfreaks.com/topic/292188-pdf-output-problem/#findComment-1495428 Share on other sites More sharing options...
Barand Posted November 1, 2014 Share Posted November 1, 2014 You clearly have a centered column on the left side of your image. Can you not see how that was achieved and apply it to the other items? Quote Link to comment https://forums.phpfreaks.com/topic/292188-pdf-output-problem/#findComment-1495430 Share on other sites More sharing options...
dpp Posted November 2, 2014 Author Share Posted November 2, 2014 I cannot understand you. What do you mean? Quote Link to comment https://forums.phpfreaks.com/topic/292188-pdf-output-problem/#findComment-1495564 Share on other sites More sharing options...
ginerjm Posted November 2, 2014 Share Posted November 2, 2014 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. Quote Link to comment https://forums.phpfreaks.com/topic/292188-pdf-output-problem/#findComment-1495566 Share on other sites More sharing options...
dpp Posted November 4, 2014 Author Share Posted November 4, 2014 I cannot upload bigger images. I want to send you a bigger picture where i enplane what i want. Where i can send this file? BRGDS Quote Link to comment https://forums.phpfreaks.com/topic/292188-pdf-output-problem/#findComment-1495652 Share on other sites More sharing options...
ginerjm Posted November 4, 2014 Share Posted November 4, 2014 Why don't you try to just answer the question I asked in simple English? Quote Link to comment https://forums.phpfreaks.com/topic/292188-pdf-output-problem/#findComment-1495673 Share on other sites More sharing options...
dpp Posted November 4, 2014 Author Share Posted November 4, 2014 I don't know if it is pdf or html. I just want the cells into the table to be centered. The code above is from the pdf.php file. Sorry, I am not familiar with this and need some help. BRGDS Quote Link to comment https://forums.phpfreaks.com/topic/292188-pdf-output-problem/#findComment-1495703 Share on other sites More sharing options...
mikosiko Posted November 4, 2014 Share Posted November 4, 2014 (edited) 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 November 4, 2014 by mikosiko Quote Link to comment https://forums.phpfreaks.com/topic/292188-pdf-output-problem/#findComment-1495706 Share on other sites More sharing options...
Barand Posted November 4, 2014 Share Posted November 4, 2014 This is from the code you posted <td bgcolor="#C9E9FC" width="10%" align="center" style="border: 1px solid #DDDDDD;"><?php echo JText::_('VRCPDFDAYS'); ?></td> Why don't you just use the same method to center or right-align your other fields? Quote Link to comment https://forums.phpfreaks.com/topic/292188-pdf-output-problem/#findComment-1495707 Share on other sites More sharing options...
dpp Posted November 4, 2014 Author Share Posted November 4, 2014 i tried but something is wrong. Not working. Quote Link to comment https://forums.phpfreaks.com/topic/292188-pdf-output-problem/#findComment-1495713 Share on other sites More sharing options...
mikosiko Posted November 4, 2014 Share Posted November 4, 2014 you tried what?... where is the code? Quote Link to comment https://forums.phpfreaks.com/topic/292188-pdf-output-problem/#findComment-1495715 Share on other sites More sharing options...
ginerjm Posted November 4, 2014 Share Posted November 4, 2014 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. Quote Link to comment https://forums.phpfreaks.com/topic/292188-pdf-output-problem/#findComment-1495717 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.