2017-02-06 14 views

답변

0

확인,이 대답은 아니지만, 내 동적 콘텐츠 제목 텍스트를 교체하고 wkhtmltopdf이 파일을 통과, 나는 각각의 생성 된 PDF에 대한 목차 스타일 시트와 임시 파일을 생성

해결

을하고있다

toc_file.path

하는 파괴 - wkhtmltopdf에 파일 경로를 통과

toc_file = Tempfile.new 
toc_content = File. 
    read('config/wkhtmltopdf_toc.xsl'). 
    gsub(':index_title', title) 
toc_file.write(toc_content) 
toc_file.rewind 

: 루비에서 같은 일을 할 수있다 pdf 파일이 생성됩니다.

toc_file.close 
toc_file.unlink