Fix DA in SetFont

This commit is contained in:
Svetlana Kulikova
2025-07-18 14:24:27 +03:00
parent 5ec24525b8
commit f45b3ba0da

View File

@ -2481,6 +2481,14 @@ CAnnotRedact::CAnnotRedact(PDFDoc* pdfDoc, Object* oAnnotRef, int nPageIndex, in
}
oObj.free();
oAnnot.free();
}
void CAnnotRedact::SetFont(PDFDoc* pdfDoc, NSFonts::IFontManager* pFontManager, CPdfFontList *pFontList, Object* oAnnotRef)
{
Object oAnnot, oObj;
XRef* pXref = pdfDoc->getXRef();
oAnnotRef->fetch(pXref, &oAnnot);
// 20 - Шрифт, размер, цвет текста замены - DA
if (oAnnot.dictLookup("DA", &oObj)->isString())
{
@ -2519,14 +2527,6 @@ CAnnotRedact::CAnnotRedact(PDFDoc* pdfDoc, Object* oAnnotRef, int nPageIndex, in
}
oObj.free();
oAnnot.free();
}
void CAnnotRedact::SetFont(PDFDoc* pdfDoc, NSFonts::IFontManager* pFontManager, CPdfFontList *pFontList, Object* oAnnotRef)
{
Object oAnnot, oObj;
XRef* pXref = pdfDoc->getXRef();
oAnnotRef->fetch(pXref, &oAnnot);
Object oAP, oN;
if (!oAnnot.dictLookup("RO", &oN)->isStream())
{