Hi,
I'm trying to modify existing PDFs via the calls in fpdf_edit.h. If I render after making changes I can see the effect of the calls but when I attempt to serialize the output to a new PDF I either get a blank page or unchanged output depending on whether I pass FPDF_INCREMENTAL to FPDF_SaveAsCopy(...) or not.
Now, I am using a relatively old version of the pdfium codebase. I believe I pulled this code around April of 2019. Would updating Pdfium fix my issues? Updating will be some work for me because I have Pdfium set up as a visual studio solution, which I did by hand, but if it is certain these issues are old code related I'd undertake the effort.
For reference my code looks like the following
ScopedFPDFPage sfpp(FPDF_LoadPage(doc, 0));
auto page = sfpp.get();
FPDF_PAGEOBJECT obj = FPDFPage_GetObject(page, 2); // modify some object
FPDFPageObj_Transform(obj, 0, 0, 0, 0, 0, 0); // for example
FPDFPage_GenerateContent(page);
// if i render here the object with the zeroed out transform will not be rendered
PdfSaver saver(outputFilename);
FPDF_SaveAsCopy(doc, &saver, 0); // or 1, neither works