Generate PDF from base64 string

Phoca PDF - creating PDF documents in Joomla! CMS
joshuatan17
Phoca Newbie
Phoca Newbie
Posts: 6
Joined: 07 May 2015, 10:14

Generate PDF from base64 string

Post by joshuatan17 »

Hi there,

I'm wondering if there's a way to generate PDF from base64 string?

$data = some base64 encoding;
echo '<img src="data:image/png;base64,' . $data . '" />';
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48402
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Generate PDF from base64 string

Post by Jan »

Hi, not sure what you exactly mean?

Jan
If you find Phoca extensions useful, please support the project
joshuatan17
Phoca Newbie
Phoca Newbie
Posts: 6
Joined: 07 May 2015, 10:14

Re: Generate PDF from base64 string

Post by joshuatan17 »

Hi Jan,

I want to generate an article with images. But instead of image files within the article, I want to use base64 encoding to echo the image. Is that possible?
For example...
$data = some base64 encoding;
echo '<img src="data:image/png;base64,' . $data . '" />';
(I'm embedding PHP inside the article)
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48402
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Generate PDF from base64 string

Post by Jan »

Hi, now I understand, but I think, TCPDF class (PDF feature) does not support this way of displaying images like internet browsers do :idea: (but I am really not sure) :idea: :-(

Jan
If you find Phoca extensions useful, please support the project
Post Reply