Issue 1611 in pdfium: FPDF_RenderPage() method takes a long time to render the page

43 views
Skip to first unread message

gdv1… via monorail

unread,
Nov 5, 2020, 2:27:42 PM11/5/20
to pdfiu...@googlegroups.com
Status: Unconfirmed
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 1611 by gdv1...@gmail.com: FPDF_RenderPage() method takes a long time to render the page
https://bugs.chromium.org/p/pdfium/issues/detail?id=1611

What steps will reproduce the problem?
Run the following test with the attached PDF:

TEST_F(CPDFParserEmbedderTest, SlowPdfOpen) {
auto start = high_resolution_clock::now();

EXPECT_TRUE(EmbedderTest::OpenDocument(
"example_1.pdf"));
FPDF_PAGE page = EmbedderTest::LoadPage(0);
ASSERT_TRUE(page);
ScopedFPDFBitmap page_bitmap = EmbedderTest::RenderPage(page);

auto stop = high_resolution_clock::now();
auto duration = duration_cast<microseconds>(stop - start);
cout << "Time taken by function: " << duration.count() << " microseconds"
<< endl;

WriteBitmapToPng(page_bitmap.get(), "results.png");
}

What is the expected output? What do you see instead?
Page rendering takes about 200s. Looking for a way to reduce the render time.

What version of the product are you using? On what operating system?
PDFium v4103. OS Windows 10.

Please provide any additional information below.
Acrobat Reader opens the file in a few seconds

Attachments:
example_1.pdf 3.4 MB

--
You received this message because:
1. The project was configured to send all issue notifications to this address

You may adjust your notification preferences at:
https://bugs.chromium.org/hosting/settings

n… via monorail

unread,
Nov 5, 2020, 5:33:55 PM11/5/20
to pdfiu...@googlegroups.com
Updates:
Status: Untriaged

Comment #1 on issue 1611 by ni...@chromium.org: FPDF_RenderPage() method takes a long time to render the page
https://bugs.chromium.org/p/pdfium/issues/detail?id=1611#c1

Tested with AGG, Skia, SkiaPaths rendering on my linux machine, when rendering at 100% scale, the process time is shown as below:
Skia: 1m55.737s
SkiaPaths: took way too long (more than 5min)
AGG: 3m32.595s

Directly opening this file on a windows laptop with Acrobat, it was rendered at scale 14%, which I believe it was the case that the reporter experienced, that the PDF finish rendering within a few second.
When rendering with Acrobat at 100% scale, the rendering process took longer, but still it still finishes within 1min.

Even after we enable Skia rendering for PDFium, rendering performance improvement is still needed.

n… via monorail

unread,
Nov 9, 2020, 7:56:37 PM11/9/20
to pdfiu...@googlegroups.com

Comment #2 on issue 1611 by ni...@chromium.org: FPDF_RenderPage() method takes a long time to render the page
https://bugs.chromium.org/p/pdfium/issues/detail?id=1611#c2

Issue 1613 has been merged into this issue.

n… via monorail

unread,
Nov 9, 2020, 7:57:24 PM11/9/20
to pdfiu...@googlegroups.com
Updates:
Status: Available

Comment #3 on issue 1611 by ni...@chromium.org: FPDF_RenderPage() method takes a long time to render the page
https://bugs.chromium.org/p/pdfium/issues/detail?id=1611#c3

In issue 1613, the reporter provided more testing cases.
Reply all
Reply to author
Forward
0 new messages