SVG in PDF

Phoca PDF - creating PDF documents in Joomla! CMS
redant
Phoca Newbie
Phoca Newbie
Posts: 2
Joined: 02 Jan 2022, 15:54

SVG in PDF

Post 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.
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48402
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: SVG in PDF

Post 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
If you find Phoca extensions useful, please support the project
redant
Phoca Newbie
Phoca Newbie
Posts: 2
Joined: 02 Jan 2022, 15:54

Re: SVG in PDF

Post 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.
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48402
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: SVG in PDF

Post 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
If you find Phoca extensions useful, please support the project
Post Reply