binsarjr / svelte-printpdf

My Component Print PDF support color,flexbox and grid system because using window.print() and css print.
https://svelte-printpdf.vercel.app
7 stars 2 forks source link

[BUG] Padding or Style Css still exist on parent element of PrintPdf #4

Open binsarjr opened 1 year ago

binsarjr commented 1 year ago

I Have code looks like this

 <section class="p-[20px] md:p-[75px]">
        <h1 class="text-xl font-bold">Cetak Kategori Umum</h1>
        {#if images.length == 0}
            <p>Sedang mengunduh semua gambar...</p>
        {:else}
            <PrintPdf {print}>
                <Page>
                    {#each images as image}
                        <img src={image.src} alt="" />
                    {/each}
                </Page>
            </PrintPdf>
        {/if}
    </section>

When print set to true and package running window.print padding on section as parent child still exist. its annoying