Page 1 of 1

SVG in PDF

Posted: 02 Jan 2022, 16:03
by redant
I have an HTML page with an embedded Google chart which is rendered as an SVG image.

When I convert the page to PDF I simply get a blank page which I have discovered has something to do with the SVG embedded image.

Is it possible to create a pdf page in this instance? If so, what should I change/do to achieve this? I could find no information in the documentation.

Pointers would be appreciated.

Re: SVG in PDF

Posted: 02 Jan 2022, 21:17
by Jan
Hi,

SVGs can be rendered in PDF documents in Phoca PDF. Which version of Phoca PDF do you run?

Try to test it with Joomla 4 and Phoca PDF 4 version, see demo:
https://www.phoca.cz/demo/phoca-pdf-svg-demo

Image

It is important that:
- svg image is stored on your server
- it has defined width and height

Jan

Re: SVG in PDF

Posted: 03 Jan 2022, 08:52
by redant
Thanks, Jan

You say: " svg image is stored on your server "

This may be the problem I think as the SVG image is created "on the fly."

If I could explain a little more:-
The page I want to convert to PDF is essentially a dashboard view for a certain user.
The dashboard page is created by reading data from a table.
One of the elements in the page is graph created by the PlotaLot extension.

I am using Phoca V4 on the latest build of Joomla 4

Thanks so much.

Re: SVG in PDF

Posted: 03 Jan 2022, 13:32
by Jan
Hi, yes, if it is the same or similar principle like Google charts, where the charts are rendered by Javascript (see demo here: https://www.phoca.cz/demo/phoca-downloa ... odule-demo ) then it is not possible to include it into PDF which gets the data from server. :-(

Jan