CalcBuilder Forum

PDF still has double line

User TheFencepedia 2024-07-18 17:28:36

Hi,

The fix you suggested worked for a while, but now I have a double line around the PDF version of my output. The screen version still looks fine, but the PDF has a double line.

PLEASE can you advise how I can fix this? I need the PDF to have one single line around each cell, just like the screen version of my output.

User TheFencepedia 2024-07-19 04:11:38

Hi again,

I just wanted to let you know that I have contacted JCE and posted in the Joomla facebook group, and the consensus seems to be that this is an issue when generating the PDF, and not necessarily with JCE.

How is this PDF generated? Is there somewhere I can see what is done?

User TheFencepedia 2024-07-19 04:55:17

Hi again,

I hired a freelancer on Upwork to look into this while I wait for JCE and you to get back to me, and gave them the code from JCE. This was what they said:

My first thought was that you had given border both to <table> and <td> tags, and that caused the problem. But I have just tried it with the Phoca PDF component (on Joomla 5.1.2), and I couldn't reproduce the issue.

They also asked:

what generates the pdf file.Is it a custom component, or a PHP library, or anything else?


It seems as though JCE might not be the issue?

I just want a solution though. I just need the output to have single lines, so whatever I have to do to make that happen, let me know.

Moonsoft support 2024-07-19 09:49:41

Hi,
the answer you have from your freelancer is exactly the same we have given you already (please check previous ticket). You set an html to generate the pdf, whatever editor you use is ok as long as the html generated is correct. The html you generate with your editor has 2 borders, one for the table, another one for the cells. So you will see 2 borders at your output, the library used is not causing any issue, it's just showing what you have configured to be printed.

Why are you not seeing the duplicate borders when you see the ouput at the browser? Because the external css has a property that 'joins' the two of them (you still have 2 borders, but they are overlapped). Of course, your template css is not present at the pdf output.

Solution: remove one of them. Go to your html view from your editor, or, edit your table properties from your editor. Remove the table border and try again.

If you're not sure on how to use the editor to do that, please share again an access (in private data), we'll take a quick look and search for the proper setting.

Best regards
Moonsoft Team

User TheFencepedia 2024-07-19 16:32:21

Okay. JCE came back to me and said this:

Try with the border attribute removed from the table tag, eg:

table cellpadding="5" cellspacing="0">

Thank you,

Ryan Demmer
JCE Developer


However, I did that with this calculator: https://www.drawafence.com/try-it

which is calculator number 24 in Calcbuilder, and while it solves the very OUTER line problem, it's still giving me double lines around cells.

Note that the contractor on Upwork also said they COULD NOT recreate the problem with another PDF generator.


Please could you take a look and figure out how I can get a single line around all cells on my output table? I feel like this should be easier than this.

User TheFencepedia 2024-07-19 18:04:14

Good news! JCE solved it.

The correct code is

table style="border-collapse: collapse;” cellpadding="5" cellspacing="0"

in case anyone has this issue again!

Moonsoft support 2024-07-20 08:16:23

Hi,
yes, that's the solution, the pdf generator just shows what you configure in the code, setting the right styles through your editor or directly at your html code is the right way to go. Thanks for sharing!

Best regards
Moonsoft Team

...
List Manager

Build different lists for your site

Buy now!
...
CalcBuilder

Create dynamic calculators

Buy now!