WkHtmlToPdf不可读的字体

时间:2015-06-09 17:32:57

标签: php wkhtmltopdf

我在wkhtmltopdf中安装了VPS/Centos。 但它似乎找不到字体(我已经安装了type1fonts-75dpi。 在php中,这是

的结果
exec(wkhtmltopdf http://www.google.com test.pdf);

enter image description here

2 个答案:

答案 0 :(得分:2)

这是Cento6的解决方案

yum install libXext  libXrender  fontconfig  libfontconfig.so.1
yum install urw-fonts

答案 1 :(得分:1)

对于有兴趣的人,我通过安装真型字体解决了我的问题。之后,wkhtmltopdf能够显示这些字体。

Ubuntu(18.04)

{"ID":6,"NAME":"Komal","AGE":22,"ADDRESS":"Assam","SALARY":20000}

高山Linux(3.9)

@echo off
set file=C:\temp\TEST_EXTRACT.txt
echo %file% >> C:\temp\T1.txt
for /f "tokens=*" %%A in (%file%) do (ECHO %%A >> C:\temp\T2.txt
ECHO cmd.exe /K cd C:\Users\test\AppData\Local\Google\Cloud SDK && gcloud pubsub topics publish pubsubtopic1 --message %%A > C:\temp\T3.txt)

Below mentioned the PL SQL code which is used for calling the batch file

BEGIN
SYS.DBMS_SCHEDULER.CREATE_JOB( 
    job_name => 'LOOP_JOB',
    job_type => 'EXECUTABLE',
    job_action => 'C:\WINDOWS\system32\cmd.exe',
    --repeat_interval => 'FREQ=WEEKLY;BYDAY=MON,TUE,WED,THU,FRI;  BYHOUR=18;BYMINUTE=0;BYSECOND=0',
    --start_date => SYSTIMESTAMP at time zone 'EUROPE/LONDON',
    job_class => 'DEFAULT_JOB_CLASS',
    comments => 'Job to test call out to batch script on Windows',
    auto_drop => FALSE,
    number_of_arguments => 3,
    enabled => FALSE);

SYS.DBMS_SCHEDULER.SET_JOB_ARGUMENT_VALUE( 
    job_name => 'LOOP_JOB', argument_position => 1, argument_value => '/q'); 
SYS.DBMS_SCHEDULER.SET_JOB_ARGUMENT_VALUE( 
    job_name => 'LOOP_JOB', argument_position => 2, argument_value => '/c'); 
SYS.DBMS_SCHEDULER.SET_JOB_ARGUMENT_VALUE( 
    job_name => 'LOOP_JOB', argument_position => 3, argument_value => 'C:\temp\loop.bat'); 
SYS.DBMS_SCHEDULER.ENABLE( 'LOOP_JOB' ); 
END;
/