Closed pushtime-sky closed 3 weeks ago
Hi @pushtime-sky,
Usually, when parts are missing, it's because forms were not rendered.
See FPDFDOC_InitFormFillEnvironment()
and FPDF_FFLDraw()
.
Best regards, Benoit
From the docs one would expect the OP's FPDFPage_Flatten()
call to achieve the same, but last time I tested it seemed to take no visible effect, neither with rendering nor saving. There may be something wrong with this API?
(Also, it's a pity there's not matrix rendering equivalent to FPDF_FFLDraw()
...)
Hi@mara004 I am also try the api FPDFPage_Flatten() But is not effect。
@bblanchon thank you! I'll try it
From a quick search, I saw Bug 2055 in pdfium's issue tracker, where @kmoon-chromium mentions that FPDFPage_Flatten()
requires that you reload the page afterwards. Also, it is stated that flattening does not play with XFA.
However, this does not fix the issue for my non-XFA test sample. It may be that flattening is buggy and only works with a subset of documents, see also https://crbug.com/861842
I am useing the c++ interface by pdfium.dll(117.0.5880.0),but When I try to print the attached filled form,the some content of the filled form is blank code: FPDFPage_Flatten(pdfPage, FLAT_PRINT); FPDF_RenderPage(hdcPrinter, pdfPage, 0, 0, pageWidth, pageHeight, islandscape ? 1 : 0,flags); cardclaimform_filled_printed.pdf