0

Draw forms properly in PDFiumEngine when rasterizing.

https://pdfium.googlesource.com/pdfium.git/+/75f84a56 changed the PDFium
rendering APIs to let callers better control how forms are drawn. The
path for low quality printing / print as image never got updated.

BUG=825985,pdfium:594

Change-Id: I36658f651da3911034648651c6118acbd4050712
Reviewed-on: https://chromium-review.googlesource.com/985133
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Cr-Commit-Position: refs/heads/master@{#548344}
This commit is contained in:
Lei Zhang
2018-04-05 05:40:06 +00:00
committed by Commit Bot
parent 309cd58c61
commit 95ed2935fa

@ -1550,7 +1550,13 @@ FPDF_DOCUMENT PDFiumEngine::CreateSinglePageRasterPdf(
FPDF_RenderPageBitmap(bitmap, page_to_print->GetPrintPage(), page_rect.x(),
page_rect.y(), page_rect.width(), page_rect.height(),
print_settings.orientation,
FPDF_ANNOT | FPDF_PRINTING | FPDF_NO_CATCH);
FPDF_PRINTING | FPDF_NO_CATCH);
// Draw the forms.
FPDF_FFLDraw(form_, bitmap, page_to_print->GetPrintPage(), page_rect.x(),
page_rect.y(), page_rect.width(), page_rect.height(),
print_settings.orientation,
FPDF_ANNOT | FPDF_PRINTING | FPDF_NO_CATCH);
unsigned char* bitmap_data =
static_cast<unsigned char*>(FPDFBitmap_GetBuffer(bitmap));