Thanks for creating this great J! 4 extension.
Works for most of my articles. However, the one I'm working on uses monospaced type
and the PDF removes the spaces. I'm using the monofree font.
This is the page: http://songs.keithvb.com/songs-by-write ... -and-young
This is what I started with and what I want:
A AM7 F#m A
I'll light the fire, while you place the flowers
D A D F
In the vase that you bought today.
This is what the PDF looks like:
A AM7 F#m A
I'll light the fire, while you place the flowers
D A D F
In the vase that you bought today.
Thanks, Keith.
PDF not quite right
-
- Phoca Newbie
- Posts: 2
- Joined: 29 May 2023, 20:00
- Jan
- Phoca Hero
- Posts: 48386
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: PDF not quite right
Hi, the HTML source for the text if following:
The problem is, Phoca PDF gets this text without from Joomla system:
So the only way to change it is to replace spaces in output (in plugin code) to &npsp; (but the another problem is, it can change spaces even there where we don't want to change it, e.g. in html tags:
Try to test following, open this file:
plugins/phocapdf/content/content.php
and on line cca 240 add following code:
above this code:
This should do the trick:
Jan
Code: Select all
<p>[Verse 1]<br>A AM7 F#m A<br>I'll light the fire, while you place the flowers<br> D A D F<br>In the vase that you bought today.<br> A AM7 F#m A<br>Staring at the fire for hours and hours,<br> D A D E<br>While I listen to you play your love songs<br>D E A AM7 F#m A D F<br>All night long for me, only for me.</p>
So the only way to change it is to replace spaces in output (in plugin code) to &npsp; (but the another problem is, it can change spaces even there where we don't want to change it, e.g. in html tags:
Try to test following, open this file:
plugins/phocapdf/content/content.php
and on line cca 240 add following code:
Code: Select all
$documentOutput = str_replace('<br />', '<br/>', $documentOutput);
$documentOutput = str_replace(' ', ' ', $documentOutput);
Code: Select all
// Build the PDF Document string from the document buffer
$pdf->writeHTML($documentOutput , true);
Jan
If you find Phoca extensions useful, please support the project
-
- Phoca Newbie
- Posts: 2
- Joined: 29 May 2023, 20:00
Re: PDF not quite right
Works perfectly. Thanks for the clear instructions.
Keith
Keith
- Jan
- Phoca Hero
- Posts: 48386
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact: