Commit 95ed2935 authored by Lei Zhang's avatar Lei Zhang Committed by Commit Bot

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/985133Reviewed-by: default avatardsinclair <dsinclair@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Cr-Commit-Position: refs/heads/master@{#548344}
parent 309cd58c
...@@ -1550,7 +1550,13 @@ FPDF_DOCUMENT PDFiumEngine::CreateSinglePageRasterPdf( ...@@ -1550,7 +1550,13 @@ FPDF_DOCUMENT PDFiumEngine::CreateSinglePageRasterPdf(
FPDF_RenderPageBitmap(bitmap, page_to_print->GetPrintPage(), page_rect.x(), FPDF_RenderPageBitmap(bitmap, page_to_print->GetPrintPage(), page_rect.x(),
page_rect.y(), page_rect.width(), page_rect.height(), page_rect.y(), page_rect.width(), page_rect.height(),
print_settings.orientation, 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 = unsigned char* bitmap_data =
static_cast<unsigned char*>(FPDFBitmap_GetBuffer(bitmap)); static_cast<unsigned char*>(FPDFBitmap_GetBuffer(bitmap));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment