diff --git a/core/fpdfapi/fpdf_parser/cpdf_document.cpp b/core/fpdfapi/fpdf_parser/cpdf_document.cpp
index 89b41d5..8910fa1 100644
--- a/core/fpdfapi/fpdf_parser/cpdf_document.cpp
+++ b/core/fpdfapi/fpdf_parser/cpdf_document.cpp
@@ -220,127 +220,6 @@
 }
 #endif  // _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_
 
-#if _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_
-struct FX_LANG2CS {
-  uint32_t uLang;
-  uint8_t uCharset;
-};
-const FX_LANG2CS gs_FXLang2CharsetTable[] = {
-    {3109, 0},         {3121, 178}, {3129, 162}, {3139, 204}, {3141, 204},
-    {3166, 0},         {3184, 238}, {3197, 0},   {3201, 0},   {3239, 161},
-    {3241, 0},         {3246, 0},   {3247, 186}, {3248, 0},   {3259, 178},
-    {3267, 0},         {3273, 0},   {3276, 0},   {3301, 0},   {3310, 1},
-    {3325, 177},       {3329, 1},   {3338, 238}, {3341, 238}, {3345, 1},
-    {3355, 0},         {3370, 0},   {3371, 0},   {3383, 128}, {3424, 204},
-    {3427, 1},         {3428, 129}, {3436, 178}, {3464, 186}, {3466, 186},
-    {3486, 204},       {3487, 0},   {3493, 1},   {3494, 0},   {3508, 0},
-    {3518, 0},         {3520, 0},   {3569, 1},   {3580, 238}, {3588, 0},
-    {3645, 238},       {3651, 204}, {3672, 238}, {3673, 238}, {3678, 238},
-    {3679, 238},       {3683, 0},   {3684, 0},   {3693, 1},   {3697, 1},
-    {3700, 222},       {3710, 162}, {3734, 204}, {3741, 178}, {3749, 162},
-    {3763, 163},       {3886, 134}, {105943, 0}, {106375, 1}, {3923451837, 134},
-    {3923451838, 136},
-};
-
-uint32_t FX_GetLangHashCode(const FX_CHAR* pStr) {
-  ASSERT(pStr);
-  int32_t iLength = FXSYS_strlen(pStr);
-  const FX_CHAR* pStrEnd = pStr + iLength;
-  uint32_t uHashCode = 0;
-  while (pStr < pStrEnd)
-    uHashCode = 31 * uHashCode + tolower(*pStr++);
-  return uHashCode;
-}
-
-uint8_t FX_GetCsFromLangCode(uint32_t uCode) {
-  int32_t iStart = 0;
-  int32_t iEnd = FX_ArraySize(gs_FXLang2CharsetTable) - 1;
-  while (iStart <= iEnd) {
-    int32_t iMid = (iStart + iEnd) / 2;
-    const FX_LANG2CS& charset = gs_FXLang2CharsetTable[iMid];
-    if (uCode == charset.uLang)
-      return charset.uCharset;
-
-    if (uCode < charset.uLang)
-      iEnd = iMid - 1;
-    else
-      iStart = iMid + 1;
-  }
-  return FXFONT_ANSI_CHARSET;
-}
-
-uint8_t FX_GetCharsetFromLang(const FX_CHAR* pLang, int32_t iLength) {
-  ASSERT(pLang);
-  if (iLength < 0)
-    iLength = FXSYS_strlen(pLang);
-
-  uint32_t uHash = FX_GetLangHashCode(pLang);
-  return FX_GetCsFromLangCode(uHash);
-}
-
-void CFString2CFXByteString(CFStringRef src, CFX_ByteString& dest) {
-  SInt32 len = CFStringGetLength(src);
-  CFRange range = CFRangeMake(0, len);
-  CFIndex used = 0;
-  UInt8* pBuffer = (UInt8*)calloc(len + 1, sizeof(UInt8));
-  CFStringGetBytes(src, range, kCFStringEncodingASCII, 0, false, pBuffer, len,
-                   &used);
-  dest = (FX_CHAR*)pBuffer;
-  free(pBuffer);
-}
-
-bool HasCharSet(CFArrayRef languages, const std::vector<uint8_t>& charsets) {
-  for (int i = 0; i < CFArrayGetCount(languages); ++i) {
-    CFStringRef language = (CFStringRef)CFArrayGetValueAtIndex(languages, i);
-    uint8_t charset = FX_GetCharsetFromLang(
-        CFStringGetCStringPtr(language, kCFStringEncodingMacRoman), -1);
-    if (pdfium::ContainsValue(charsets, charset))
-      return true;
-  }
-  return false;
-}
-
-void FX_GetCharWidth(CTFontRef font, UniChar start, UniChar end, int* width) {
-  CGFloat size = CTFontGetSize(font);
-  for (; start <= end; ++start) {
-    CGGlyph pGlyph = 0;
-    CFIndex count = 1;
-    CTFontGetGlyphsForCharacters(font, &start, &pGlyph, count);
-    CGSize advances;
-    CTFontGetAdvancesForGlyphs(font, kCTFontDefaultOrientation, &pGlyph,
-                               &advances, 1);
-    *width = (int)(advances.width / size * 1000);
-    width++;
-  }
-}
-
-void InsertWidthArray(CTFontRef font,
-                      int start,
-                      int end,
-                      CPDF_Array* pWidthArray) {
-  int size = end - start + 1;
-  int* widths = FX_Alloc(int, size);
-  FX_GetCharWidth(font, start, end, widths);
-  int i;
-  for (i = 1; i < size; i++) {
-    if (widths[i] != *widths)
-      break;
-  }
-  if (i == size) {
-    int first = pWidthArray->GetIntegerAt(pWidthArray->GetCount() - 1);
-    pWidthArray->AddInteger(first + size - 1);
-    pWidthArray->AddInteger(*widths);
-  } else {
-    CPDF_Array* pWidthArray1 = new CPDF_Array;
-    pWidthArray->Add(pWidthArray1);
-    for (i = 0; i < size; i++) {
-      pWidthArray1->AddInteger(widths[i]);
-    }
-  }
-  FX_Free(widths);
-}
-#endif  // _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_
-
 void InsertWidthArray1(CFX_Font* pFont,
                        CFX_UnicodeEncoding* pEncoding,
                        FX_WCHAR start,
@@ -520,10 +399,6 @@
   CPDF_Object* pInfoObj = GetOrParseIndirectObject(m_pParser->GetInfoObjNum());
   if (pInfoObj)
     m_pInfoDict = pInfoObj->GetDict();
-  if (CPDF_Array* pIDArray = m_pParser->GetIDArray()) {
-    m_ID1 = pIDArray->GetStringAt(0);
-    m_ID2 = pIDArray->GetStringAt(1);
-  }
 }
 
 void CPDF_Document::LoadDoc() {
@@ -736,20 +611,6 @@
   return m_pParser->GetPermissions();
 }
 
-FX_BOOL CPDF_Document::IsFormStream(uint32_t objnum, FX_BOOL& bForm) const {
-  CPDF_Object* pObj = GetIndirectObject(objnum);
-  if (pObj) {
-    CPDF_Stream* pStream = pObj->AsStream();
-    bForm = pStream && pStream->GetDict()->GetStringBy("Subtype") == "Form";
-    return TRUE;
-  }
-  if (!m_pParser) {
-    bForm = FALSE;
-    return TRUE;
-  }
-  return m_pParser->IsFormStream(objnum, bForm);
-}
-
 CPDF_Font* CPDF_Document::LoadFont(CPDF_Dictionary* pFontDict) {
   ASSERT(pFontDict);
   return m_pDocPage->GetFont(pFontDict, FALSE);
@@ -782,24 +643,6 @@
   return m_pDocPage->GetImage(pObj);
 }
 
-void CPDF_Document::RemoveColorSpaceFromPageData(CPDF_Object* pCSObj) {
-  GetPageData()->ReleaseColorSpace(pCSObj);
-}
-
-void CPDF_Document::ClearPageData() {
-  GetPageData()->Clear(FALSE);
-}
-
-void CPDF_Document::ClearRenderData() {
-  m_pDocRender->Clear(FALSE);
-}
-
-void CPDF_Document::ClearRenderFont() {
-  CFX_FontCache* pCache = m_pDocRender->GetFontCache();
-  if (pCache)
-    pCache->FreeCache(FALSE);
-}
-
 void CPDF_Document::CreateNewDoc() {
   ASSERT(!m_pRootDict && !m_pInfoDict);
   m_pRootDict = new CPDF_Dictionary;
@@ -1236,225 +1079,3 @@
   return LoadFont(pBaseDict);
 }
 #endif  //  _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_
-
-#if _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_
-CPDF_Font* CPDF_Document::AddMacFont(CTFontRef pFont,
-                                     FX_BOOL bVert,
-                                     FX_BOOL bTranslateName) {
-  CTFontRef font = (CTFontRef)pFont;
-  CTFontDescriptorRef descriptor = CTFontCopyFontDescriptor(font);
-  if (!descriptor)
-    return nullptr;
-
-  CFArrayRef languages = (CFArrayRef)CTFontDescriptorCopyAttribute(
-      descriptor, kCTFontLanguagesAttribute);
-  if (!languages) {
-    CFRelease(descriptor);
-    return nullptr;
-  }
-
-  bool bCJK =
-      HasCharSet(languages, {FXFONT_CHINESEBIG5_CHARSET, FXFONT_GB2312_CHARSET,
-                             FXFONT_HANGEUL_CHARSET, FXFONT_SHIFTJIS_CHARSET});
-  CFRelease(descriptor);
-  CFDictionaryRef traits = (CFDictionaryRef)CTFontCopyTraits(font);
-  if (!traits) {
-    CFRelease(languages);
-    return nullptr;
-  }
-
-  CFNumberRef sybolicTrait =
-      (CFNumberRef)CFDictionaryGetValue(traits, kCTFontSymbolicTrait);
-  CTFontSymbolicTraits trait = 0;
-  CFNumberGetValue(sybolicTrait, kCFNumberSInt32Type, &trait);
-  int flags = 0;
-  if (trait & kCTFontItalicTrait)
-    flags |= PDFFONT_ITALIC;
-  if (trait & kCTFontMonoSpaceTrait)
-    flags |= PDFFONT_FIXEDPITCH;
-  if (trait & kCTFontModernSerifsClass)
-    flags |= PDFFONT_SERIF;
-  if (trait & kCTFontScriptsClass)
-    flags |= PDFFONT_SCRIPT;
-
-  CFNumberRef weightTrait =
-      (CFNumberRef)CFDictionaryGetValue(traits, kCTFontWeightTrait);
-  Float32 weight = 0;
-  CFNumberGetValue(weightTrait, kCFNumberFloat32Type, &weight);
-  int italicangle = CTFontGetSlantAngle(font);
-  int ascend = CTFontGetAscent(font);
-  int descend = CTFontGetDescent(font);
-  int capheight = CTFontGetCapHeight(font);
-  CGRect box = CTFontGetBoundingBox(font);
-  int bbox[4];
-  bbox[0] = box.origin.x;
-  bbox[1] = box.origin.y;
-  bbox[2] = box.origin.x + box.size.width;
-  bbox[3] = box.origin.y + box.size.height;
-  CFX_ByteString basefont;
-  if (bTranslateName && bCJK) {
-    CFStringRef postName = CTFontCopyPostScriptName(font);
-    CFString2CFXByteString(postName, basefont);
-    CFRelease(postName);
-  }
-  if (basefont.IsEmpty()) {
-    CFStringRef fullName = CTFontCopyFullName(font);
-    CFString2CFXByteString(fullName, basefont);
-    CFRelease(fullName);
-  }
-  basefont.Replace(" ", "");
-  CPDF_Dictionary* pBaseDict = new CPDF_Dictionary;
-  CPDF_Dictionary* pFontDict = pBaseDict;
-  if (!bCJK) {
-    if (HasCharSet(languages, {FXFONT_ANSI_CHARSET, FXFONT_DEFAULT_CHARSET,
-                               FXFONT_SYMBOL_CHARSET})) {
-      if (HasCharSet(languages, {FXFONT_SYMBOL_CHARSET})) {
-        flags |= PDFFONT_SYMBOLIC;
-      } else {
-        flags |= PDFFONT_NONSYMBOLIC;
-      }
-      pBaseDict->SetAtName("Encoding", "WinAnsiEncoding");
-    } else {
-      flags |= PDFFONT_NONSYMBOLIC;
-      size_t i;
-      for (i = 0; i < FX_ArraySize(g_FX_CharsetUnicodes); ++i) {
-        if (HasCharSet(languages, {g_FX_CharsetUnicodes[i].m_Charset}))
-          break;
-      }
-      if (i < FX_ArraySize(g_FX_CharsetUnicodes)) {
-        CPDF_Dictionary* pEncoding = new CPDF_Dictionary;
-        pEncoding->SetAtName("BaseEncoding", "WinAnsiEncoding");
-        CPDF_Array* pArray = new CPDF_Array;
-        pArray->AddInteger(128);
-        const uint16_t* pUnicodes = g_FX_CharsetUnicodes[i].m_pUnicodes;
-        for (int j = 0; j < 128; j++) {
-          CFX_ByteString name = PDF_AdobeNameFromUnicode(pUnicodes[j]);
-          pArray->AddName(name.IsEmpty() ? ".notdef" : name);
-        }
-        pEncoding->SetAt("Differences", pArray);
-        AddIndirectObject(pEncoding);
-        pBaseDict->SetAtReference("Encoding", this, pEncoding);
-      }
-    }
-    if (weight > 0.0 && trait & kCTFontItalicTrait)
-      basefont += ",BoldItalic";
-    else if (weight > 0.0)
-      basefont += ",Bold";
-    else if (trait & kCTFontItalicTrait)
-      basefont += ",Italic";
-
-    pBaseDict->SetAtName("Subtype", "TrueType");
-    pBaseDict->SetAtName("BaseFont", basefont);
-    pBaseDict->SetAtNumber("FirstChar", 32);
-    pBaseDict->SetAtNumber("LastChar", 255);
-    int char_widths[224];
-    FX_GetCharWidth(font, 32, 255, char_widths);
-    CPDF_Array* pWidths = new CPDF_Array;
-    for (int i = 0; i < 224; i++)
-      pWidths->AddInteger(char_widths[i]);
-    pBaseDict->SetAt("Widths", pWidths);
-  } else {
-    flags |= PDFFONT_NONSYMBOLIC;
-    CFX_ByteString cmap;
-    CFX_ByteString ordering;
-    int supplement;
-    bool bFound = false;
-    CPDF_Array* pWidthArray = new CPDF_Array;
-    if (HasCharSet(languages, {FXFONT_CHINESEBIG5_CHARSET})) {
-      cmap = bVert ? "ETenms-B5-V" : "ETenms-B5-H";
-      ordering = "CNS1";
-      supplement = 4;
-      pWidthArray->AddInteger(1);
-      InsertWidthArray(font, 0x20, 0x7e, pWidthArray);
-      bFound = true;
-    }
-    if (!bFound && HasCharSet(languages, {FXFONT_GB2312_CHARSET})) {
-      cmap = bVert ? "GBK-EUC-V" : "GBK-EUC-H";
-      ordering = "GB1", supplement = 2;
-      pWidthArray->AddInteger(7716);
-      InsertWidthArray(font, 0x20, 0x20, pWidthArray);
-      pWidthArray->AddInteger(814);
-      InsertWidthArray(font, 0x21, 0x7e, pWidthArray);
-      bFound = true;
-    }
-    if (!bFound && HasCharSet(languages, {FXFONT_HANGEUL_CHARSET})) {
-      cmap = bVert ? "KSCms-UHC-V" : "KSCms-UHC-H";
-      ordering = "Korea1";
-      supplement = 2;
-      pWidthArray->AddInteger(1);
-      InsertWidthArray(font, 0x20, 0x7e, pWidthArray);
-      bFound = true;
-    }
-    if (!bFound && HasCharSet(languages, {FXFONT_SHIFTJIS_CHARSET})) {
-      cmap = bVert ? "90ms-RKSJ-V" : "90ms-RKSJ-H";
-      ordering = "Japan1";
-      supplement = 5;
-      pWidthArray->AddInteger(231);
-      InsertWidthArray(font, 0x20, 0x7d, pWidthArray);
-      pWidthArray->AddInteger(326);
-      InsertWidthArray(font, 0xa0, 0xa0, pWidthArray);
-      pWidthArray->AddInteger(327);
-      InsertWidthArray(font, 0xa1, 0xdf, pWidthArray);
-      pWidthArray->AddInteger(631);
-      InsertWidthArray(font, 0x7e, 0x7e, pWidthArray);
-    }
-    pBaseDict->SetAtName("Subtype", "Type0");
-    pBaseDict->SetAtName("BaseFont", basefont);
-    pBaseDict->SetAtName("Encoding", cmap);
-
-    pFontDict = new CPDF_Dictionary;
-    pFontDict->SetAt("W", pWidthArray);
-    pFontDict->SetAtName("Type", "Font");
-    pFontDict->SetAtName("Subtype", "CIDFontType2");
-    pFontDict->SetAtName("BaseFont", basefont);
-    CPDF_Dictionary* pCIDSysInfo = new CPDF_Dictionary;
-    pCIDSysInfo->SetAtString("Registry", "Adobe");
-    pCIDSysInfo->SetAtString("Ordering", ordering);
-    pCIDSysInfo->SetAtInteger("Supplement", supplement);
-    pFontDict->SetAt("CIDSystemInfo", pCIDSysInfo);
-    CPDF_Array* pArray = new CPDF_Array;
-    pBaseDict->SetAt("DescendantFonts", pArray);
-    AddIndirectObject(pFontDict);
-    pArray->AddReference(this, pFontDict);
-  }
-  AddIndirectObject(pBaseDict);
-  CPDF_Dictionary* pFontDesc = new CPDF_Dictionary;
-  pFontDesc->SetAtName("Type", "FontDescriptor");
-  pFontDesc->SetAtName("FontName", basefont);
-  pFontDesc->SetAtInteger("Flags", flags);
-  CPDF_Array* pBBox = new CPDF_Array;
-  for (int i = 0; i < 4; i++)
-    pBBox->AddInteger(bbox[i]);
-
-  pFontDesc->SetAt("FontBBox", pBBox);
-  pFontDesc->SetAtInteger("ItalicAngle", italicangle);
-  pFontDesc->SetAtInteger("Ascent", ascend);
-  pFontDesc->SetAtInteger("Descent", descend);
-  pFontDesc->SetAtInteger("CapHeight", capheight);
-  CGFloat fStemV = 0;
-  int16_t min_width = SHRT_MAX;
-
-  static const UniChar stem_chars[] = {'i', 'I', '!', '1'};
-  CGGlyph glyphs[FX_ArraySize(stem_chars)];
-  CGRect boundingRects[FX_ArraySize(stem_chars)];
-
-  const size_t count = FX_ArraySize(stem_chars);
-  if (CTFontGetGlyphsForCharacters(font, stem_chars, glyphs, count)) {
-    CTFontGetBoundingRectsForGlyphs(font, kCTFontHorizontalOrientation, glyphs,
-                                    boundingRects, count);
-    for (size_t i = 0; i < count; i++) {
-      int16_t width = boundingRects[i].size.width;
-      if (width > 0 && width < min_width) {
-        min_width = width;
-        fStemV = min_width;
-      }
-    }
-  }
-  pFontDesc->SetAtInteger("StemV", fStemV);
-  AddIndirectObject(pFontDesc);
-  pFontDict->SetAtReference("FontDescriptor", this, pFontDesc);
-  CFRelease(traits);
-  CFRelease(languages);
-  return LoadFont(pBaseDict);
-}
-#endif  // _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_
diff --git a/core/fpdfapi/fpdf_parser/include/cpdf_document.h b/core/fpdfapi/fpdf_parser/include/cpdf_document.h
index f332242..2d315e9 100644
--- a/core/fpdfapi/fpdf_parser/include/cpdf_document.h
+++ b/core/fpdfapi/fpdf_parser/include/cpdf_document.h
@@ -47,18 +47,11 @@
   CPDF_Dictionary* GetRoot() const { return m_pRootDict; }
   CPDF_Dictionary* GetInfo() const { return m_pInfoDict; }
 
-  void GetID(CFX_ByteString& id1, CFX_ByteString& id2) const {
-    id1 = m_ID1;
-    id2 = m_ID2;
-  }
-
   int GetPageCount() const;
   CPDF_Dictionary* GetPage(int iPage);
   int GetPageIndex(uint32_t objnum);
   uint32_t GetUserPermissions() const;
   CPDF_DocPageData* GetPageData() const { return m_pDocPage; }
-  void ClearPageData();
-  void RemoveColorSpaceFromPageData(CPDF_Object* pObject);
 
   std::unique_ptr<JBig2_DocumentContext>* CodecContext() {
     return &m_pCodecContext;
@@ -66,8 +59,6 @@
   std::unique_ptr<CPDF_LinkList>* LinksContext() { return &m_pLinksContext; }
 
   CPDF_DocRenderData* GetRenderData() const { return m_pDocRender.get(); }
-  void ClearRenderData();
-  void ClearRenderFont();
 
   FX_BOOL IsFormStream(uint32_t objnum, FX_BOOL& bForm) const;
 
@@ -102,11 +93,6 @@
                             FX_BOOL bVert,
                             FX_BOOL bTranslateName = FALSE);
 #endif
-#if _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_
-  CPDF_Font* AddMacFont(CTFontRef pFont,
-                        FX_BOOL bVert,
-                        FX_BOOL bTranslateName = FALSE);
-#endif
 
  protected:
   friend class CPDF_Creator;
@@ -125,14 +111,11 @@
                     uint32_t objnum,
                     int& index,
                     int level = 0);
-  FX_BOOL CheckOCGVisible(CPDF_Dictionary* pOCG, FX_BOOL bPrinting);
   CPDF_Object* ParseIndirectObject(uint32_t objnum) override;
 
   std::unique_ptr<CPDF_Parser> m_pParser;
   CPDF_Dictionary* m_pRootDict;
   CPDF_Dictionary* m_pInfoDict;
-  CFX_ByteString m_ID1;
-  CFX_ByteString m_ID2;
   bool m_bLinearized;
   int m_iFirstPageNo;
   uint32_t m_dwFirstPageObjNum;
