Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot convert html tag with !important on style properties, resulting error in pdfmake #220

Closed
fahmi-nugroho opened this issue Jul 13, 2024 · 2 comments

Comments

@fahmi-nugroho
Copy link

Provide the HTML code
<h3 style="margin-left:0px;">Catatan</h3><p style="margin-left:12px !important;">-Catatan untuk pemeriksaan Antigen SARS CoV-2 :</p><ul><li>Hasil NEGATIF tidak menyingkirkan kemungkinan terinfeksi SARS CoV-2 sehingga masih berisiko menularkan ke orang lain, disarankan tes ulang atau tes konfirmasi dengan NAAT (nucleic acid amplification tests) *,bila probabilitas pretes relatif tinggi, terutama bila pasien bergejala atau diketahui memiliki kontak dengan orang yang terkonfirmasi COVID-19</li><li>Hasil NEGATIF dapat terjadi pada kondisi kuantitas antigen pada spesimen di bawah level deteksi alat</li></ul><p style="margin-left:12px !important;">Saran Bila Hasil POSITIF :</p><ul><li>Pemeriksaan konfirmasi dengan pemeriksaan RT-PCR</li><li>Lakukan karantina atau isolasi sesuai dengan kriteria</li><li>Menerapkan PHBS (perilaku hidup bersih dan sehat: mencuci tangan, menerapkan etika batuk, menggunakan masker, menjaga stamina), dan physical distancing</li></ul>

Describe the bug
Convert result example
{ "text": "Catatan", "nodeName": "H3", "fontSize": 20, "bold": true, "marginBottom": 5, "marginLeft": 0, "style": [ "html-h3" ] }, { "text": "-Catatan untuk pemeriksaan Antigen SARS CoV-2 :", "nodeName": "P", "margin": [ "12px !important", 5, 0, 10 ], "style": [ "html-p" ] }
As you can see, if using important margin section filled with string, resulting error on pdfmake.

@Aymkdn
Copy link
Owner

Aymkdn commented Jul 13, 2024

I've just published v2.5.11 - I'm simply removing !important keyword in the styles.

@Aymkdn Aymkdn closed this as completed Jul 13, 2024
@fahmi-nugroho
Copy link
Author

Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants