New PDF option

Status
Not open for further replies.
yes the only way is a special template, but in that case the problem is the selection of the template just for pdf output, Ive spent 1 hour trought the code but I didn't sorted out the problem.... I'm very newbie in PHP, I guess it's selected by view.base.php
 
probably missunderstood, you have added, not solved.....
Anyway, update to the github today morning, very strange thing is happen:
two list view, identical, changing only the prefilter condition of a field (0/1)
both having this setting in layout:
Front-end template: use default
Admin template: admin
Empty data message: empty
PDF icon: use global
PDF template: admin
Show title: yes

Them generating different pdf!???
NB: the only custom_css.php exist under bluesky tmpl, but none of them using it
I will analyze in deep them to see if there is any other parameter that affecting the pdf production
 

Attachments

  • Chiuse-5.pdf
    13 KB · Views: 498
  • Aperte-17.pdf
    23 KB · Views: 467
another note:
before the uptade if I've in the list view 10 rows generate pdf, now work only if I've less than 10 rows displayed
 
Not yet but it's something I need as well. From what I understand you need to download compatible fonts for the language you require, however I haven't been able to find out more details than that.

I was going to see if Rob has any knowledge on the subject when he gets back.

Keep us updated if you discover anything and I'll do the same.
 
I have not succeeded in getting a multi-page list to print with the pdf option. It is always the usual error (attached) but I have managed to get a form to print as a pdf.
Any suggestions on a the list stuff or should I just stick to trying to implement my project in a form with possibly a repeating group to get flexibility.
 

Attachments

  • dompdf.txt
    1.1 KB · Views: 524
Is the problem with the questions marks solved, in non-english characters, or is it still occur? Where can I download fonts for my language? I've been searching a lot but nothing found...
 
For the non-English characters do:

(1) file
?\libraries\dompdf\dompdf_config.inc.php, line 209, change
def("DOMPDF_DEFAULT_FONT", "serif");

to
def("DOMPDF_DEFAULT_FONT", "Arial");

2) run from command prompt this :
[your path to php]\php.exe [your path to joomla app]\libraries\dompdf\load_font.php Arial C:\WINDOWS\Fonts\ARIAL.TTF
 
For the non-English characters do:



2) run from command prompt this :
[your path to php]\php.exe [your path to joomla app]\libraries\dompdf\load_font.php Arial C:\WINDOWS\Fonts\ARIAL.TTF

How exactly am I going to do it, if my ite is on shared hosting, without ssh access??
 
Unzip and copy to ...libraries\dompdf\lib\fonts

Instead of editing dompdf_config.inc.php (which may be overridden when updating) you can add custom CSS to your list template
#listform_$c table.fabrikList {font-family: arial;
}
 

Attachments

  • ARIAL.zip
    450.3 KB · Views: 468
  • ARIALbd.zip
    436.6 KB · Views: 435
  • ARIALbi.zip
    342.4 KB · Views: 419
  • ARIALi (2).zip
    335.2 KB · Views: 428
I did what u said, but still get the question marks on the pdf file...

I also tried with my local arial fonts files, taken from my c:windows\fonts which are in my local language.

Same result...
 
It's working on my site with some greek characters:
pdf without the custom CSS is showing ???, with CSS the correct characters.

Did you edit the dompdf_config.inc.php or add custom CSS to your list template (both methods are working on my site)?
Which PDF template are you using, the same as for your list or an other one?
Do you have a link to your list?
 
It's working on my site with some greek characters:
pdf without the custom CSS is showing ???, with CSS the correct characters.

Did you edit the dompdf_config.inc.php or add custom CSS to your list template (both methods are working on my site)?
Which PDF template are you using, the same as for your list or an other one?
Do you have a link to your list?

First, thnks for the help.

I uploaded to the libraries\dompdf\lib\fonts the arial files from my local directory c:windows/fonts.

I downloaded the custom_css_example.php, and made this part of the code

PHP:
header('Content-type: text/css');
$c = $_REQUEST['c'];
$buttonCount = (int) $_REQUEST['buttoncount'];
$buttonTotal = $buttonCount === 0 ? '100%' : 30 * $buttonCount ."px";
echo "

#listform_$c .fabrikForm {
	margin-top: 25px !important;
}

";?>


to


PHP:
header('Content-type: text/css');
$c = $_REQUEST['c'];
$buttonCount = (int) $_REQUEST['buttoncount'];
$buttonTotal = $buttonCount === 0 ? '100%' : 30 * $buttonCount ."px";


listform_$c table.fabrikList {font-family: arial;
}


?>


Renamed the new file and made it custom_css.php
Uploaded it to components/com_fabrik/views/form/tmpl/default/ as I am using in the list options

Front-end template = default
PDF template = default

Did I make any wrong move????

Link to my list:


http://georgeapps.gr/physio/index.php/pelates

Backend: http://georgeapps.gr/physio/administrator/

usernm & pass: send by pm.

I'll be here for anything ellse.

Thnks again
 
Your custom_css.php doesn't create CSS code (echo and starting php tag is missing), so it's not setting arial font.
Try with
PHP:
 <?php

header('Content-type: text/css');
$c = $_REQUEST['c'];
$buttonCount = (int) $_REQUEST['buttoncount'];
$buttonTotal = $buttonCount === 0 ? '100%' : 30 * $buttonCount ."px";
echo "


listform_$c table.fabrikList {font-family: arial; 
} 

";?>
 
I had the starting php tag, somehow it didn't pasted here. Anyway, i copied your code to the custom_css.php in the default template folder, but still I get ????.

I don't know what else to do!
 
ok, there's still a typo (I didn't realise when copying your code into mine): # is missing, it must be

#listform_$c table.fabrikList {font-family: arial;
}
 
I am really sorry for disturbing u, but after this change, i get again the question marks.

Funny thing is that u said u got greek characters in yur local server...
 
The CSS seems now loading correctly.
Did you put those ARIAL.TFF + ARIAL.ufm in libraries\dompdf\lib\fonts?

Ah, maybe this file was also modified during this "load_fonts" run (upzip and copy in libraries\dompdf\lib\fonts, too)
 

Attachments

  • dompdf_font_family_cache.dist.zip
    727 bytes · Views: 540
Status
Not open for further replies.
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top