Committed by
David PHAM-VAN
make pdf background transparent on linux
Showing
1 changed file
with
2 additions
and
2 deletions
@@ -288,8 +288,8 @@ void print_job::raster_pdf(const uint8_t data[], | @@ -288,8 +288,8 @@ void print_job::raster_pdf(const uint8_t data[], | ||
288 | auto bWidth = static_cast<int>(width * scale); | 288 | auto bWidth = static_cast<int>(width * scale); |
289 | auto bHeight = static_cast<int>(height * scale); | 289 | auto bHeight = static_cast<int>(height * scale); |
290 | 290 | ||
291 | - auto bitmap = FPDFBitmap_Create(bWidth, bHeight, 0); | ||
292 | - FPDFBitmap_FillRect(bitmap, 0, 0, bWidth, bHeight, 0xffffffff); | 291 | + auto bitmap = FPDFBitmap_Create(bWidth, bHeight, 1); |
292 | + FPDFBitmap_FillRect(bitmap, 0, 0, bWidth, bHeight, 0x00ffffff); | ||
293 | 293 | ||
294 | FPDF_RenderPageBitmap(bitmap, page, 0, 0, bWidth, bHeight, 0, | 294 | FPDF_RenderPageBitmap(bitmap, page, 0, 0, bWidth, bHeight, 0, |
295 | FPDF_ANNOT | FPDF_LCD_TEXT | FPDF_NO_NATIVETEXT); | 295 | FPDF_ANNOT | FPDF_LCD_TEXT | FPDF_NO_NATIVETEXT); |
-
Please register or login to post a comment