Open jaguarxii opened 8 months ago
Describe the bug Background does not show on PDF file but shows in previewer
To Reproduce Create a SVG that has transparency to set as watermark, in my example it has 10% opacity.
`
public void Compose(IDocumentContainer container) { TextStyle dafaultStyle = TextStyle.Default.FontFamily("Nunito"); SKSvg svgWatermark = new SKSvg(); svgWatermark.FromSvg(pdfAux.pdfConstants["pdf_watermark"]);
container .Page(page => { page.DefaultTextStyle(dafaultStyle); page.Size(PageSizes.A4.Portrait()); page.Margin(0, Unit.Millimetre); page.Header().Element(ComposeHeader); page.Background().AlignCenter().AlignMiddle().Width(250).Height(250).Svg(svgWatermark);
Expected behavior The background should appear on the PDF file as it appears in the previewer
Screenshots
Environment Windows 11 / dotnet 8 / webapp MVC Debian 12 / dotnet 8 / webapp MVC QuestPDF 2023.12.6 HarfBuzzSharp.NativeAssets.Linux 7.3.0.1 SkiaSharp, SkiaSharp.HarfBuzz, SkiaSharp.NativeAssets.Linux 2.88.7 Svg.Skia 1.0.0.13
Thank you for reporting this issue. Would you please share the SVG file? 😄
Hi, here it is
Describe the bug Background does not show on PDF file but shows in previewer
To Reproduce Create a SVG that has transparency to set as watermark, in my example it has 10% opacity.
`
public void Compose(IDocumentContainer container) { TextStyle dafaultStyle = TextStyle.Default.FontFamily("Nunito"); SKSvg svgWatermark = new SKSvg(); svgWatermark.FromSvg(pdfAux.pdfConstants["pdf_watermark"]);
`
Expected behavior The background should appear on the PDF file as it appears in the previewer
Screenshots
Environment Windows 11 / dotnet 8 / webapp MVC Debian 12 / dotnet 8 / webapp MVC QuestPDF 2023.12.6 HarfBuzzSharp.NativeAssets.Linux 7.3.0.1 SkiaSharp, SkiaSharp.HarfBuzz, SkiaSharp.NativeAssets.Linux 2.88.7 Svg.Skia 1.0.0.13