Hi everyone, not sure if this has been asked befor...
# cfml-general
d
Hi everyone, not sure if this has been asked before but here goes. When I create a PDF document using cfdocument it appears that the first page of the PDF has all text in BOLD. The other pages are in normal text. In most cases the text is from a loop of data so all the same code is being used. There appears to be NO way to prevent this as I have tried many things (ie. CSS, hard coding, etc.). I have CF2018 V15 but this problem has seem to be around for quite some time. Anyone know of a way to get around this or should I just use another html to PDF tool. I'm trying not to as my dev server is MAC and my production is Linux. Thanks for any help.
w
from your description it sounds like you have some css class or style not under control. have you tried generating the same pdf with all external css references removed?
so that it's completely unstyled or as close as you can get
i'm presuming the source for the pdf is html obviously. if it's not, what is it
d
@websolete I have done this both way. Just using a <table> and NO css or any other font settings. Yes, this is ALL HTML.
w
and when it's just plain unstyled html you're saying page 1 is always rendered bold?
d
yup, you are correct.
p
Without the cfdocument wrap does the HTML display as expected?
w
is that true whether there is ONLY one page or more than one?
d
Also, however page 2 and so on are all printed correctly in normal mode.
@Patrick Yes, the page does display correctly (although I didn't actually check it) as page 2 and beyond display correctly.
w
as patrick is implying, i'd confirm that the html renders correctly on its own
d
Hey guys, I have to go but will be back in about 2 hours. Thanks for your immediate response. Nice to know that people care here on Slack CFML.
w
plans to talk about him when he's gone
j
Hmmm. I third the "confirm the html works." As it's a table I'm wondering if this could be an unclosed <thead><th> tag sequence? Again, confirming in a browser, inspect elements would be helpful.
p
yea prob needs some validation or verification for sure
d
Hi guys, I'm back. Sorry for the delay. I read your message while I was out. Decided to give you an example. Here is sample code (no css, just a table with enough rows to go over the page. Also, I'm giving you guys the PDF generated.
w
you have an erroneous </table> tag on line 232
should be </html>
d
Thanks. VScode puts in an ending table that I didn't see. I have fixed that and re-ran and the same results. Nothing has changed as far as the PDf generating is concerned.
Now, I ran the same example (with correction) on CF2021 and it works as its supposed to. It would appear that this is an issue with CF2018 only.