Merhaba hocalarım,
TCPDF sınıfını kullanıyorum. Pdf dosyasının arkaplanına resim koymak istiyorum fakat sadece ilk sayfaya koyuyor. Bunun nedeni nedir? Kodu aldığım gibi koyuyurum fakat sadece 1 sayfaya ekliyor.
Page break olarak php kodu değil de p tagında pagebreak="true" kullanıyorum. Ücretli veya ücretsiz çözüme ihtiyacım var.
PHP PDF Arkaplan Sorunu
2
●41
- 01-10-2021, 14:28:30
- 01-10-2021, 15:00:26Merhaba, sınıfı nasıl kullanıyorsunuz örnek kod blogunu görebilirmiyim ?ebubekirgns adlı üyeden alıntı: mesajı görüntüle
- 01-10-2021, 15:07:51Scorpion2763 adlı üyeden alıntı: mesajı görüntüle
public function __construct($proposal, $tag = '') { if ($proposal->rel_id != null && $proposal->rel_type == 'customer') { $this->load_language($proposal->rel_id); } else if ($proposal->rel_id != null && $proposal->rel_type == 'lead') { $CI = &get_instance(); $this->load_language($proposal->rel_id); $CI->db->select('default_language')->where('id', $proposal->rel_id); $language = $CI->db->get('leads')->row()->default_language; load_pdf_language($language); } $proposal = hooks()->apply_filters('proposal_html_pdf_data', $proposal); $GLOBALS['proposal_pdf'] = $proposal; parent::__construct(); $this->tag = $tag; $this->proposal = $proposal; $this->proposal_number = format_proposal_number($this->proposal->id); $this->SetTitle($this->proposal_number); $this->SetDisplayMode('default', 'OneColumn'); // get the current page break margin $bMargin = $this->getBreakMargin(); // get current auto-page-break mode $auto_page_break = $this->AutoPageBreak; // disable auto-page-break $this->SetAutoPageBreak(false, 0); // set bacground image $img_file = 'https://www.ttscrm.com/CRM/media/teklifzemin.png'; $this->Image($img_file, 0, 0, 210, 297, '', '', '', false, 300, '', false, false, 0); // restore auto-page-break status $this->SetAutoPageBreak($auto_page_break, $bMargin); // set the starting point for the page content $this->setPageMark(); # Don't remove these lines - important for the PDF layout $this->proposal->content = $this->fix_editor_html($this->proposal->content); }