Does anybody have a clue how to tweak the pdfview module so that ubercart can also offer pdfs after order to download and as email attachment?
This isn't a pdfview solution. This is an alternate solution.
If you're a PHP coder, this is a good starting point. I've made this work in ECOMMERCE but not actually attempted it in UBERCART.
Here is some sample code from ECOMMERCE: http://www.drupalecommerce.org/api/file/ecommerce-5--4/docs/examples/pdf...
The TCPDF class this code uses didn't actually work, so I substituted FPDF instead. BUT THE KEY CONCEPT IS THE SAME!
Ecommerce uses phptemplate_store_invoice() to manage the display of invoices.
Ubercart uses uc_order_invoice() - you can find that function in the uc_order/uc_order.module around line 2029.
By creating a function in template.php to replace the existing uc_order_invoice(), you can modify the behaviour of it, and generate a pdf invoice in the same manner that the ecommerce code I've mentioned uses.
BTW - I don't like hacking core, because it makes it way easier to upgrade when new releases come out (particularly security releases!). That's why I'm putting the code in template.php rather than hacking core.
I intend using this method to create my own PDF Invoices. There may be better ways to implement the code - maybe someone else has some ideas?
---------------
Is it just me, or is it like the ECOMMERCE site is in a foreign language? I know it's english, but that site just makes no sense!
Oof, looking at the code now I see that I didn't use a theme_ function for the invoice generation. I bet that would've made your job loads easier! My apologies.
I'm marking this down as something to improve when we revisit the template system. I'd love to have your input on the way it works right now... a request from several users has been to accept the storage of invoice templates in the valid themes directories so folks never have to worry about wiping their custom templates.
(Feel free to take up or start any discussion related to the improvement of that code in the Theming and Design forum.)
Thanks for posting this! 
Does anybody have this working? Can you post the modified uc_order_invoice function, really struggling to get this to work properly...
Hi - this would be an excellent addition to our site which we currently have running with the Ubercart 2 - Drupal 6 combo.
I'm sure that this will become a more common request as people use UC2 more.
Hi - im working at this, just need to find where the notification is sended and im going to replace drupal mail function with phpmailer.
subscribing.
ozyrys - if you meant where notifications are set,
- for uc2, its at: admin/store/ca
- for uc1, its at: admin/store/settings/notify
actually what im looking for is the place in code, where the notiffication is sended in UC2
I think you need to work it out from ca/ca.module, ca/ca.ca.inc, and so on.
In uc_order.module I found sth. like this, but it doesn't look like function which send an notification, only set the content... line 522
function uc_order_mail($key, &$message, $params) {
$langcode = isset($message['language']) ? $message['language']->language : NULL;
// Build the appropriate message paramaters based on the e-mail key.
switch ($key) {
// Setup an e-mailed invoice.
case 'invoice':
$message['headers']['Content-Type'] = 'text/html; charset=UTF-8; format=flowed';
$message['subject'] = t('Your Order Invoice', array(), $langcode);
$message['from'] = uc_store_email_from();
$message['body'][] = uc_order_load_invoice($params['order'], 'admin-mail', variable_get('uc_cust_order_invoice_template', 'customer'));
break;
// Setup a custom e-mail defined by an action on a predicate.
case 'action-mail':
// Assemble an email message from the conditional actions settings.
$message['headers']['Content-Type'] = 'text/html; charset=UTF-8; format=flowed';
$message['from'] = $params['from'];
// Perform token replacement on the subject and body.
$subject = token_replace_multiple($params['subject'], $params['replacements']);
$body = token_replace_multiple($params['message'], $params['replacements']);
// Strip newline characters from e-mail subjects.
// TODO: Maybe drupal_mail_send() should do this? -LM
$message['subject'] = str_replace(array("\r\n", "\r", "\n"), ' ', $subject);
// Apply an input format to the message body if specified.
if (isset($params['format'])) {
$message['body'] = check_markup($body, $params['format'], FALSE);
}
else {
$message['body'] = $body;
}
break;
}
}
You were right! All thing what must to do is in admin/store/ca disable old default confirmation and add a new one, there You can paste Your PHP code. When I finish with it I will paste here an instruction if someone interested
OK here is my solution:
At first I want to say that I'm from Poland so, some functions or variables and text could be in my language, but if You have only basic knowladge about php You will easyly prepare Your own pdf invoice.
Actually my ubercart shop become to be reservation system and it sales ski holidays, and my pdf invoice became to be reservation agreement.
This is only instruction, how to create own pdf invoice, and attach it to confirmation e-mails.
WHAT YOU NEED IS TWO PHP CLASSES:
1. phpMailer - you can downlad it from here http://sourceforge.net/projects/phpmailer/
2. fpdf - you can download it from here http://www.fpdf.org/
NEXT:
Paste Your downloaded classes to Your server.
If You have:
- uc2, its at: admin/store/ca
- uc1, its at: admin/store/settings/notify
Next instructions will be for uc2, but I think that in uc1 its very similar.
So, go to admin/store/ca and disable Your default "E-mail admin checkout notification" and "E-mail customer checkout notification" and create Your own.
Next You go to "conditional actions" and in "Action: Execute custom PHP code" -> "Custom code" you paste the code below (with Your paths to classes and subjects for e-mails etc):
require_once('invoice.php');
generateInvoice($order);
require_once('classes/phpmailer/class.phpmailer.php');
$mail = new PHPMailer(); // defaults to using php "mail()"
/*$body = file_get_contents('contents.html');
$body = eregi_replace("[\]",'',$body);*/
$body = uc_order_load_invoice($order, 'admin-mail', 'admin');
$mail->CharSet = 'utf-8';
$mail->AddReplyTo("office@viaeuropa.pl","Via Europa");
$mail->SetFrom('office@viaeuropa.pl', 'Via Europa');
$mail->AddReplyTo("office@viaeuropa.pl","Via Europa");
$address = 'mr.m.kozlowski@gmail.com';
$mail->AddAddress($address);
$mail->AddAddress('office@viaeuropa.pl');
$mail->Subject = "Nowa rezerwacja w Via Europa";
$mail->AltBody = "to view this e-mail you need html converter"; // optional, comment out and test
$mail->MsgHTML($body);
$mail->AddAttachment("umowy/umowa".$order->order_id.".pdf"); // attachment
if(!$mail->Send()) {
echo "Mailer Error: " . $mail->ErrorInfo;
}
Last think what You need to do is create invoice.php file which generate Your invoice in pdf.
My code of invoice.php you can see below:
<?php
function iso2utf()
{
$tabela = Array(
"\xb1" => "\xc4\x85", "\xa1" => "\xc4\x84", "\xe6" => "\xc4\x87", "\xc6" => "\xc4\x86",
"\xea" => "\xc4\x99", "\xca" => "\xc4\x98", "\xb3" => "\xc5\x82", "\xa3" => "\xc5\x81",
"\xf3" => "\xc3\xb3", "\xd3" => "\xc3\x93", "\xb6" => "\xc5\x9b", "\xa6" => "\xc5\x9a",
"\xbc" => "\xc5\xbc", "\xac" => "\xc5\xbb", "\xbf" => "\xc5\xba", "\xaf" => "\xc5\xb9",
"\xf1" => "\xc5\x84", "\xd1" => "\xc5\x83");
return $tabela;
}
function
UTF8_2_ISO88592($tekst)
{
return strtr($tekst, array_flip(iso2utf()));
}
require(
'classes/fpdf16/fpdf.php');
//define('FPDF_FONTPATH', 'classes/fpdf16/font/');
function generateInvoice($order){
$id = $order->order_id;
$pdf=new FPDF();
$pdf->AddFont('Arial', '', 'arial.php');
$pdf->AddPage();
$pdf->SetFont('Arial', 'B', 10);
$pdf->Cell(40,10,'ORGANIZATOR: VIA EUROPA (nr pozwolenia 43/z/1988)');
$pdf->Image('img/logo_umowa.jpg',12,18,50);
$pdf->SetFont('Arial', 'U', 8);
$pdf->SetY(34);
$pdf->Cell(40,10,'www.viaeuropa.pl');
$pdf->Cell(40,10,'biuro@viaeuropa.pl');
$pdf->Cell(40,10,'krysia@viaeuropa.pl');
$pdf->SetFont('Arial', '', 8);
$pdf->SetY(38);
$pdf->Cell(40,10,'Siedziba:');
$pdf->SetY(42);
$pdf->Cell(80,10,'55-040 Kobiałowice, New York, ul. Zapizdowska 43');
$pdf->Cell(40,10,'tel. 23 332 2335 55, 611 23 11 31; fax 23 921 95 97');
$pdf->SetY(46);
$pdf->Cell(40,10,'NIP: 321-110-77-13');
$pdf->SetY(50);
$pdf->Cell(40,10,'KRS: 34/12/56/2009');
$pdf->SetY(54);
$pdf->Cell(40,10,'Rejestr Pośredników i Organizatorów Turystycznych Województwa Dolnośląskiego');
$pdf->SetY(64);
$pdf->MultiCell(190,6, 'UMOWA REZERWACJA' ,1,'L');
$pdf->MultiCell(67,30, '' ,1,'L');
$pdf->SetY(70);
$pdf->SetX(77);
$hotel = UTF8_2_ISO88592($order->products[0]->title);
$standard = UTF8_2_ISO88592($order->products[0]->model);
$typ_transportu = UTF8_2_ISO88592($order->products[0]->data['attributes']['Typ transportu'][0]);
$termin = UTF8_2_ISO88592($order->products[0]->data['attributes']['Termin'][0]);
$zakwaterowanie = UTF8_2_ISO88592($order->products[0]->data['attributes']['Zakwaterowanie'][0]);
$karnet = UTF8_2_ISO88592($order->products[0]->data['attributes']['Zamawiam karnet'][0]);
$z_email = 'Adres e-mail: '.UTF8_2_ISO88592($order->primary_email);
$z_imie = UTF8_2_ISO88592($order->billing_first_name);
$z_nazwisko = UTF8_2_ISO88592($order->billing_last_name);
$z_ulica = UTF8_2_ISO88592($order->billing_street1.' '.$order->billing_street2);
$z_kod = UTF8_2_ISO88592($order->billing_postal_code);
$z_miasto = UTF8_2_ISO88592($order->billing_city);
$z_telefon = UTF8_2_ISO88592($order->billing_phone);
$do_zaplaty = $order->order_total;
if(UTF8_2_ISO88592($_SESSION['waluta']) == 'zł'){
$waluta = UTF8_2_ISO88592($_SESSION['waluta']);
}else{
$waluta = 'euro';
}
//UCZESTNICY
$u1_plec = UTF8_2_ISO88592($order->lead['source1']);
$u1_imie = UTF8_2_ISO88592($order->lead['imie1']);
$u1_nazwisko = UTF8_2_ISO88592($order->lead['nazwisko1']);
$u1_dataur = UTF8_2_ISO88592($order->lead['dataur1']);
if($order->lead['paszport1']){
$u1_paszport = UTF8_2_ISO88592($order->lead['paszport1']);
}else{
$u1_paszport = '---';
}
$u1_ulica = UTF8_2_ISO88592($order->lead['ulica1']);
$u1_miasto = UTF8_2_ISO88592($order->lead['miasto1']);
$u1_kod = UTF8_2_ISO88592($order->lead['kod1']);
if(
$order->lead['source2']){
$u2_plec = UTF8_2_ISO88592($order->lead['source2']);
$u2_imie = UTF8_2_ISO88592($order->lead['imie2']);
$u2_nazwisko = UTF8_2_ISO88592($order->lead['nazwisko2']);
$u2_dataur = UTF8_2_ISO88592($order->lead['dataur2']);
if($order->lead['paszport2']){
$u2_paszport = UTF8_2_ISO88592($order->lead['paszport2']);
}else{
$u2_paszport = '---';
}
$u2_ulica = UTF8_2_ISO88592($order->lead['ulica2']);
$u2_miasto = UTF8_2_ISO88592($order->lead['miasto2']);
$u2_kod = UTF8_2_ISO88592($order->lead['kod2']);
}else{
$u2_plec = '---';
$u2_imie = '---';
$u2_nazwisko = '---';
$u2_dataur = '---';
$u2_paszport = '---';
$u2_ulica = '---';
$u2_miasto = '---';
$u2_kod = '---';
}
if(
$order->lead['source3']){
$u3_plec = UTF8_2_ISO88592($order->lead['source3']);
$u3_imie = UTF8_2_ISO88592($order->lead['imie3']);
$u3_nazwisko = UTF8_2_ISO88592($order->lead['nazwisko3']);
$u3_dataur = UTF8_2_ISO88592($order->lead['dataur3']);
if($order->lead['paszport3']){
$u3_paszport = UTF8_2_ISO88592($order->lead['paszport3']);
}else{
$u3_paszport = '---';
}
$u3_ulica = UTF8_2_ISO88592($order->lead['ulica3']);
$u3_miasto = UTF8_2_ISO88592($order->lead['miasto3']);
$u3_kod = UTF8_2_ISO88592($order->lead['kod3']);
}else{
$u3_plec = '---';
$u3_imie = '---';
$u3_nazwisko = '---';
$u3_dataur = '---';
$u3_paszport = '---';
$u3_ulica = '---';
$u3_miasto = '---';
$u3_kod = '---';
}
if(
$order->lead['source4']){
$u4_plec = UTF8_2_ISO88592($order->lead['source4']);
$u4_imie = UTF8_2_ISO88592($order->lead['imie4']);
$u4_nazwisko = UTF8_2_ISO88592($order->lead['nazwisko4']);
$u4_dataur = UTF8_2_ISO88592($order->lead['dataur4']);
if($order->lead['paszport4']){
$u4_paszport = UTF8_2_ISO88592($order->lead['paszport4']);
}else{
$u4_paszport = '---';
}
$u4_ulica = UTF8_2_ISO88592($order->lead['ulica4']);
$u4_miasto = UTF8_2_ISO88592($order->lead['miasto4']);
$u4_kod = UTF8_2_ISO88592($order->lead['kod4']);
}else{
$u4_plec = '---';
$u4_imie = '---';
$u4_nazwisko = '---';
$u4_dataur = '---';
$u4_paszport = '---';
$u4_ulica = '---';
$u4_miasto = '---';
$u4_kod = '---';
}
$pdf->MultiCell(123,30, '' ,1,'L');
$pdf->SetY(70);
$pdf->SetX(80);
$pdf->Cell(63,10, $hotel);
$pdf->Cell(60,10, $standard);
$pdf->SetY(74);
$pdf->SetX(80);
$pdf->Cell(40,10, ' - Typ transportu: '.$typ_transportu);
$pdf->SetY(78);
$pdf->SetX(80);
$pdf->Cell(40,10, ' - Termin: '.$termin);
$pdf->SetY(82);
$pdf->SetX(80);
$pdf->Cell(40,10, ' - Zakwaterowanie: '.$zakwaterowanie);
$pdf->SetY(86);
$pdf->SetX(80);
if($karnet){
$pdf->Cell(40,10, ' - Zamawiam karnet: '.$karnet);
}else{
$pdf->Cell(40,10, ' - Zamawiam karnet: nie dotyczy');
}
$pdf->Image('img/pieczatka.jpg',18,76,50);
$pdf->SetY(100);
$pdf->MultiCell(67,30, '' ,1,'L');
$pdf->SetY(100);
$pdf->MultiCell(67,10, '' ,1,'L');
$pdf->SetY(110);
$pdf->MultiCell(67,10, '' ,1,'L');
$pdf->SetY(120);
$pdf->MultiCell(67,10, '' ,1,'L');
//zaznacznik HB
if($order->products[0]->data['shippable']){
$pdf->SetY(102.5);
$pdf->SetX(34);
$pdf->MultiCell(4.5,4.5, '' ,1,'L');
}
//zaznaczniki ubezpieczenie
if($typ_transportu == 'samolot' || $typ_transportu == 'autokar'){
$pdf->SetY(122.5);
$pdf->SetX(31.3);
$pdf->MultiCell(4.5,4.5, '' ,1,'L');
$pdf->SetY(122.5);
$pdf->SetX(37.1);
$pdf->MultiCell(8,4.5, '' ,1,'L');
$pdf->SetY(122.5);
$pdf->SetX(46.2);
$pdf->MultiCell(6,4.5, '' ,1,'L');
}
$pdf->SetY(100);
$pdf->SetX(77);
$pdf->Cell(40,10, 'Uwagi i usługi dodatkowe:');
if(
$typ_transportu == 'samolot'){
$pdf->SetFont('Arial', '', 7);
$pdf->SetY(105);
$pdf->SetX(77);
$pdf->Cell(123,10, 'Transfer na lotnisko i z lotniska oraz na stoki.');
$pdf->SetY(110);
$pdf->SetX(77);
$pdf->Cell(123,10, 'Wylot z Katowic 06:05 - Mediolan /Bergamo 7:55, powrót Mediolan/Bergamo 8:25 - Katowice 10:10');
$pdf->SetY(115);
$pdf->SetX(77);
$pdf->Cell(123,10, 'Należy stawić się na stanowisko Wizzair i podać kod rez. samolotu lub swoje nazwisko.');
$pdf->SetY(120);
$pdf->SetX(77);
$pdf->Cell(123,10, 'Koniec odprawy o godz. 5:05. Waga bagażu 20 kg + sprzęt narciarski + 5 kg podręczny bagaż.');
}
$pdf->SetFont('Arial', '', 8);
$pdf->SetY(100);
if($order->products[0]->data['shippable']){
$pdf->Cell(40,10, 'Wyżywienie: BB HB FB ALL INCL');
}else{
$pdf->Cell(40,10, 'Wyżywienie: brak');
}
$pdf->SetY(110);
if($zakwaterowanie == 'jedna dorosła'){
$pdf->Cell(40,10, 'Rodzaj pokoju: jednoosobowy');
}elseif($zakwaterowanie == 'dwie dorosłe'){
$pdf->Cell(40,10, 'Rodzaj pokoju: dwuosobowy');
}elseif($zakwaterowanie == 'dwie dorosłe + dorosła' || $zakwaterowanie == 'dwie dorosłe + dziecko'){
$pdf->Cell(40,10, 'Rodzaj pokoju: dwuosobowy +1');
}elseif($zakwaterowanie == 'dwie dorosłe + dwie dorosłe' || $zakwaterowanie == 'dwie dorosłe + dwójka dzieci'){
$pdf->Cell(40,10, 'Rodzaj pokoju: dwuosobowy +2');
}
$pdf->SetY(120);
if($typ_transportu == 'samolot' || $typ_transportu == 'autokar'){
$pdf->Cell(40,10, 'Ubezpieczenia: KL NNW SKI');
}else{
$pdf->Cell(40,10, 'Ubezpieczenia: brak');
}
$pdf->SetY(100);
$pdf->SetX(77);
$pdf->MultiCell(123,30, '' ,1,'L');
$pdf->SetFont('Arial', '', 7);
$pdf->SetY(130);
$pdf->SetFillColor(195,195,195);
$pdf->MultiCell(6,6, 'Lp.' ,1,'C',1);
$pdf->SetY(130);
$pdf->SetX(16);
$pdf->MultiCell(16,6, 'Płeć/dziecko' ,1,'C',1);
$pdf->SetY(130);
$pdf->SetX(32);
$pdf->MultiCell(20,6, 'ImiÄ™' ,1,'C',1);
$pdf->SetY(130);
$pdf->SetX(52);
$pdf->MultiCell(25,6, 'Nazwisko' ,1,'C',1);
$pdf->SetY(130);
$pdf->SetX(77);
$pdf->MultiCell(20,6, 'Data ur.' ,1,'C',1);
$pdf->SetY(130);
$pdf->SetX(97);
$pdf->MultiCell(20,6, 'Paszport' ,1,'C',1);
$pdf->SetY(130);
$pdf->SetX(117);
$pdf->MultiCell(43,6, 'Ulica' ,1,'C',1);
$pdf->SetY(130);
$pdf->SetX(160);
$pdf->MultiCell(40,6, 'Kod, Miasto' ,1,'C',1);
$pdf->SetFont('Arial', '', 6);
$pdf->SetY(136);
$pdf->MultiCell(6,6, '1.' ,1,'C');
$pdf->SetY(136);
$pdf->SetX(16);
$pdf->MultiCell(16,6, $u1_plec ,1,'C');
$pdf->SetY(136);
$pdf->SetX(32);
$pdf->MultiCell(20,6, $u1_imie ,1,'C');
$pdf->SetY(136);
$pdf->SetX(52);
$pdf->MultiCell(25,6, $u1_nazwisko ,1,'C');
$pdf->SetY(136);
$pdf->SetX(77);
$pdf->MultiCell(20,6, $u1_dataur ,1,'C');
$pdf->SetY(136);
$pdf->SetX(97);
$pdf->MultiCell(20,6, $u1_paszport ,1,'C');
$pdf->SetY(136);
$pdf->SetX(117);
$pdf->MultiCell(43,6, $u1_ulica ,1,'C');
$pdf->SetY(136);
$pdf->SetX(160);
$pdf->MultiCell(40,6, $u1_kod.' '.$u1_miasto ,1,'C');
$pdf->SetY(142);
$pdf->MultiCell(6,6, '2.' ,1,'C');
$pdf->SetY(142);
$pdf->SetX(16);
$pdf->MultiCell(16,6, $u2_plec ,1,'C');
$pdf->SetY(142);
$pdf->SetX(32);
$pdf->MultiCell(20,6, $u2_imie ,1,'C');
$pdf->SetY(142);
$pdf->SetX(52);
$pdf->MultiCell(25,6, $u2_nazwisko ,1,'C');
$pdf->SetY(142);
$pdf->SetX(77);
$pdf->MultiCell(20,6, $u2_dataur ,1,'C');
$pdf->SetY(142);
$pdf->SetX(97);
$pdf->MultiCell(20,6, $u2_paszport ,1,'C');
$pdf->SetY(142);
$pdf->SetX(117);
$pdf->MultiCell(43,6, $u2_ulica ,1,'C');
$pdf->SetY(142);
$pdf->SetX(160);
$pdf->MultiCell(40,6, $u2_kod.' '.$u2_miasto ,1,'C');
$pdf->SetY(148);
$pdf->MultiCell(6,6, '3.' ,1,'C');
$pdf->SetY(148);
$pdf->SetX(16);
$pdf->MultiCell(16,6, $u3_plec ,1,'C');
$pdf->SetY(148);
$pdf->SetX(32);
$pdf->MultiCell(20,6, $u3_imie ,1,'C');
$pdf->SetY(148);
$pdf->SetX(52);
$pdf->MultiCell(25,6, $u3_nazwisko ,1,'C');
$pdf->SetY(148);
$pdf->SetX(77);
$pdf->MultiCell(20,6, $u3_dataur ,1,'C');
$pdf->SetY(148);
$pdf->SetX(97);
$pdf->MultiCell(20,6, $u3_paszport ,1,'C');
$pdf->SetY(148);
$pdf->SetX(117);
$pdf->MultiCell(43,6, $u3_ulica ,1,'C');
$pdf->SetY(148);
$pdf->SetX(160);
$pdf->MultiCell(40,6, $u3_kod.' '.$u3_miasto ,1,'C');
$pdf->SetY(154);
$pdf->MultiCell(6,6, '4.' ,1,'C');
$pdf->SetY(154);
$pdf->SetX(16);
$pdf->MultiCell(16,6, $u4_plec ,1,'C');
$pdf->SetY(154);
$pdf->SetX(32);
$pdf->MultiCell(20,6, $u4_imie ,1,'C');
$pdf->SetY(154);
$pdf->SetX(52);
$pdf->MultiCell(25,6, $u4_nazwisko ,1,'C');
$pdf->SetY(154);
$pdf->SetX(77);
$pdf->MultiCell(20,6, $u4_dataur ,1,'C');
$pdf->SetY(154);
$pdf->SetX(97);
$pdf->MultiCell(20,6, $u4_paszport ,1,'C');
$pdf->SetY(154);
$pdf->SetX(117);
$pdf->MultiCell(43,6, $u4_ulica ,1,'C');
$pdf->SetY(154);
$pdf->SetX(160);
$pdf->MultiCell(40,6, $u4_kod.' '.$u4_miasto ,1,'C');
$pdf->SetFont('Arial', '', 8);
$pdf->SetY(160);
$pdf->MultiCell(67,40, '' ,1,'C');
$pdf->SetY(160);
$pdf->Cell(67,6, 'Dane osoby zawierajÄ…cej umowÄ™:');
$pdf->SetY(166);
$pdf->Cell(67,6, $z_email);
$pdf->SetY(170);
$pdf->Cell(67,6, $z_imie.' '.$z_nazwisko);
$pdf->SetY(174);
$pdf->Cell(67,6, $z_ulica);
$pdf->SetY(178);
$pdf->Cell(67,6, $z_kod.' '.$z_miasto);
$pdf->SetY(182);
$pdf->Cell(67,6, 'Tel.: '.$z_telefon);
$pdf->SetY(160);
$pdf->SetX(77);
$pdf->MultiCell(123,40, '' ,1,'C');
$pdf->SetY(160);
$pdf->SetX(77);
$pdf->Cell(123,6, 'Ogólne warunki uczestnictwa w imprezach organizowanych przez VIA EUROPA, ogólne warunki');
$pdf->SetY(164);
$pdf->SetX(77);
$pdf->Cell(123,6, 'ubezpieczenia Towarzystwa ALLIANZ, oraz oferta zawarta na stronie internetowej');
$pdf->SetY(168);
$pdf->SetX(77);
$pdf->Cell(123,6, 'www.viaeuropa.com.pl, które stanowią integralną część umowy otrzymałe(a)m, przeczyta-');
$pdf->SetY(172);
$pdf->SetX(77);
$pdf->Cell(123,6, 'łe(a)m, zrozumiałe(a)m i zaakceptowałe(a)m.');
$pdf->SetY(176);
$pdf->SetX(77);
$pdf->Cell(123,6, 'Jednocześnie potwierdzam, że otrzymałe(a)m oryginał Umowy = Rezerwacji.');
$pdf->SetY(187);
$pdf->SetX(95);
$pdf->Cell(123,6, '.......................................................................................................');
$pdf->SetY(192);
$pdf->SetX(115);
$pdf->SetFont('Arial', '', 7);
$pdf->Cell(123,6, 'data i podpis osoby zawierajÄ…cej umowÄ™');
$pdf->SetY(200);
$pdf->MultiCell(67,30, '' ,1,'C');
$pdf->Image('img/pieczatka.jpg',18,206,50);
$pdf->SetY(200);
$pdf->SetX(77);
$pdf->MultiCell(123,30, '' ,1,'C');
$pdf->SetFont('Arial', '', 10);
$pdf->SetY(201);
$pdf->SetX(87);
$pdf->Cell(123,6, 'Do zapłaty: '.$do_zaplaty.' '.$waluta);
$pdf->SetFont('Arial', 'U', 8);
$pdf->SetY(208);
$pdf->SetX(87);
$pdf->Cell(123,6, 'Należność przekazywana przez klienta bezpośrednio na konto VIA EUROPA');
$pdf->SetFont('Arial', '', 7);
$pdf->SetY(212);
$pdf->SetX(80);
$pdf->Cell(123,6, 'ul. Zapisdowsa 43, 55-040 New York, PKO BP II o/Wrocław Nr: 86 1020 5226 0000 6702 0022 9047');
$pdf->Output("umowy/umowa".$id.".pdf");
}
?>That's all folks. I'will answer for any questions, and if someone interested I can do this job for him for about 300$. mr.m.kozlowski@gmail.com
You can see the example of my reservation agreement here: http://wroclaw.iq.pl/umowa102.pdf
i am completely new to ubercart so if i am making anything non sense or not related to your topic please forgive me
As you know
for pdf view there is drupal module at http://drupal.org/project/print after installing and configuring this for any page for example www.sitename?q=printpdf/node/66/ will give us th pdf view of node/66.
when a client wanted me to have pdf download of his orders and invoices i just made th e goal with this making detecting the url and simply changing that to give the pdf or printer friendly version etc..
then some............
visit that generated url programatically and save that sile to server with with an unique identification ..after that attach it and email.....
oh said a lot with empty hands...
Yes, if you use http://drupal.org/project/print module with wkhtmltopdf, once configured properly you will have a "Print to PDF" link. This is probably easier than a custom module. But if you need for control over formating onf the invoice, then you may have to do some custom coding...
@ zeezhao
Really thanks my friend that was a valuable information

