[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7BVQ8P24F900GA4B2HTQCAZ":3,"skill-same:01M7BVQ8P24F900GA4B2HTQCAZ":73},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":51,"commitSha":52,"skillDirectory":53,"forksCount":54,"repositoryHtmlUrl":55,"repositoryHomepageUrl":6,"ownerHtmlUrl":56,"ownerBlogUrl":6,"ownerDescription":57,"updatedAt":58,"install":59,"resources":72},"01M7BVQ8P24F900GA4B2HTQCAZ","doc-parser",null,">","om-scogo\u002Fskillsh-scraper","om-scogo","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F160466840?v=4","01M79AWB6DFVCQ7RK70CS34B96","Om Achrekar","01M79AWB6ZM9SKR8KDH1WSSM22",0,"MIT","https:\u002F\u002Fgithub.com\u002Fom-scogo\u002Fskillsh-scraper\u002Fblob\u002Fmain\u002Fdata\u002Fskills\u002Fclaude-office-skills-skills\u002Fdoc-parser\u002Fdoc-parser\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\n# ═══════════════════════════════════════════════════════════════════════════════\n# CLAUDE OFFICE SKILL - Enhanced Metadata v2.0\n# ═══════════════════════════════════════════════════════════════════════════════\n\n# Basic Information\nname: doc-parser\ndescription: \">\"\nversion: \"1.0\"\nauthor: claude-office-skills\nlicense: MIT\n\n# Categorization\ncategory: parsing\ntags:\n  - parsing\n  - extraction\n  - layout\n  - docling\ndepartment: All\n\n# AI Model Compatibility\nmodels:\n  recommended:\n    - claude-sonnet-4\n    - claude-opus-4\n  compatible:\n    - claude-3-5-sonnet\n    - gpt-4\n    - gpt-4o\n\n# MCP Tools Integration\nmcp:\n  server: office-mcp\n  tools:\n    - analyze_document_structure\n    - extract_text_from_pdf\n\n# Skill Capabilities\ncapabilities:\n  - document_parsing\n  - layout_analysis\n\n# Language Support\nlanguages:\n  - en\n  - zh\n---\n\n# Document Parser Skill\n\n## Overview\n\nThis skill enables advanced document parsing using **docling** - IBM's state-of-the-art document understanding library. Parse complex PDFs, Word documents, and images while preserving structure, extracting tables, figures, and handling multi-column layouts.\n\n## How to Use\n\n1. Provide the document to parse\n2. Specify what you want to extract (text, tables, figures, etc.)\n3. I'll parse it and return structured data\n\n**Example prompts:**\n- \"Parse this PDF and extract all tables\"\n- \"Convert this academic paper to structured markdown\"\n- \"Extract figures and captions from this document\"\n- \"Parse this report preserving the document structure\"\n\n## Domain Knowledge\n\n### docling Fundamentals\n\n```python\nfrom docling.document_converter import DocumentConverter\n\n# Initialize converter\nconverter = DocumentConverter()\n\n# Convert document\nresult = converter.convert(\"document.pdf\")\n\n# Access parsed content\ndoc = result.document\nprint(doc.export_to_markdown())\n```\n\n### Supported Formats\n\n| Format | Extension | Notes |\n|--------|-----------|-------|\n| PDF | .pdf | Native and scanned |\n| Word | .docx | Full structure preserved |\n| PowerPoint | .pptx | Slides as sections |\n| Images | .png, .jpg | OCR + layout analysis |\n| HTML | .html | Structure preserved |\n\n### Basic Usage\n\n```python\nfrom docling.document_converter import DocumentConverter\n\n# Create converter\nconverter = DocumentConverter()\n\n# Convert single document\nresult = converter.convert(\"report.pdf\")\n\n# Access document\ndoc = result.document\n\n# Export options\nmarkdown = doc.export_to_markdown()\ntext = doc.export_to_text()\njson_doc = doc.export_to_dict()\n```\n\n### Advanced Configuration\n\n```python\nfrom docling.document_converter import DocumentConverter\nfrom docling.datamodel.base_models import InputFormat\nfrom docling.datamodel.pipeline_options import PdfPipelineOptions\n\n# Configure pipeline\npipeline_options = PdfPipelineOptions()\npipeline_options.do_ocr = True\npipeline_options.do_table_structure = True\npipeline_options.table_structure_options.do_cell_matching = True\n\n# Create converter with options\nconverter = DocumentConverter(\n    allowed_formats=[InputFormat.PDF, InputFormat.DOCX],\n    pdf_backend_options=pipeline_options\n)\n\nresult = converter.convert(\"document.pdf\")\n```\n\n### Document Structure\n\n```python\n# Document hierarchy\ndoc = result.document\n\n# Access metadata\nprint(doc.name)\nprint(doc.origin)\n\n# Iterate through content\nfor element in doc.iterate_items():\n    print(f\"Type: {element.type}\")\n    print(f\"Text: {element.text}\")\n    \n    if element.type == \"table\":\n        print(f\"Rows: {len(element.data.table_cells)}\")\n```\n\n### Extracting Tables\n\n```python\nfrom docling.document_converter import DocumentConverter\nimport pandas as pd\n\ndef extract_tables(doc_path):\n    \"\"\"Extract all tables from document.\"\"\"\n    converter = DocumentConverter()\n    result = converter.convert(doc_path)\n    doc = result.document\n    \n    tables = []\n    \n    for element in doc.iterate_items():\n        if element.type == \"table\":\n            # Get table data\n            table_data = element.export_to_dataframe()\n            tables.append({\n                'page': element.prov[0].page_no if element.prov else None,\n                'dataframe': table_data\n            })\n    \n    return tables\n\n# Usage\ntables = extract_tables(\"report.pdf\")\nfor i, table in enumerate(tables):\n    print(f\"Table {i+1} on page {table['page']}:\")\n    print(table['dataframe'])\n```\n\n### Extracting Figures\n\n```python\ndef extract_figures(doc_path, output_dir):\n    \"\"\"Extract figures with captions.\"\"\"\n    import os\n    \n    converter = DocumentConverter()\n    result = converter.convert(doc_path)\n    doc = result.document\n    \n    figures = []\n    os.makedirs(output_dir, exist_ok=True)\n    \n    for element in doc.iterate_items():\n        if element.type == \"picture\":\n            figure_info = {\n                'caption': element.caption if hasattr(element, 'caption') else None,\n                'page': element.prov[0].page_no if element.prov else None,\n            }\n            \n            # Save image if available\n            if hasattr(element, 'image'):\n                img_path = os.path.join(output_dir, f\"figure_{len(figures)+1}.png\")\n                element.image.save(img_path)\n                figure_info['path'] = img_path\n            \n            figures.append(figure_info)\n    \n    return figures\n```\n\n### Handling Multi-column Layouts\n\n```python\nfrom docling.document_converter import DocumentConverter\n\ndef parse_multicolumn(doc_path):\n    \"\"\"Parse document with multi-column layout.\"\"\"\n    \n    converter = DocumentConverter()\n    result = converter.convert(doc_path)\n    doc = result.document\n    \n    # docling automatically handles column detection\n    # Text is returned in reading order\n    \n    structured_content = []\n    \n    for element in doc.iterate_items():\n        content_item = {\n            'type': element.type,\n            'text': element.text if hasattr(element, 'text') else None,\n            'level': element.level if hasattr(element, 'level') else None,\n        }\n        \n        # Add bounding box if available\n        if element.prov:\n            content_item['bbox'] = element.prov[0].bbox\n            content_item['page'] = element.prov[0].page_no\n        \n        structured_content.append(content_item)\n    \n    return structured_content\n```\n\n### Export Formats\n\n```python\nfrom docling.document_converter import DocumentConverter\n\nconverter = DocumentConverter()\nresult = converter.convert(\"document.pdf\")\ndoc = result.document\n\n# Markdown export\nmarkdown = doc.export_to_markdown()\nwith open(\"output.md\", \"w\") as f:\n    f.write(markdown)\n\n# Plain text\ntext = doc.export_to_text()\n\n# JSON\u002Fdict format\njson_doc = doc.export_to_dict()\n\n# HTML format (if supported)\n# html = doc.export_to_html()\n```\n\n### Batch Processing\n\n```python\nfrom docling.document_converter import DocumentConverter\nfrom pathlib import Path\nfrom concurrent.futures import ThreadPoolExecutor\n\ndef batch_parse(input_dir, output_dir, max_workers=4):\n    \"\"\"Parse multiple documents in parallel.\"\"\"\n    \n    input_path = Path(input_dir)\n    output_path = Path(output_dir)\n    output_path.mkdir(exist_ok=True)\n    \n    converter = DocumentConverter()\n    \n    def process_single(doc_path):\n        try:\n            result = converter.convert(str(doc_path))\n            md = result.document.export_to_markdown()\n            \n            out_file = output_path \u002F f\"{doc_path.stem}.md\"\n            with open(out_file, 'w') as f:\n                f.write(md)\n            \n            return {'file': str(doc_path), 'status': 'success'}\n        except Exception as e:\n            return {'file': str(doc_path), 'status': 'error', 'error': str(e)}\n    \n    docs = list(input_path.glob('*.pdf')) + list(input_path.glob('*.docx'))\n    \n    with ThreadPoolExecutor(max_workers=max_workers) as executor:\n        results = list(executor.map(process_single, docs))\n    \n    return results\n```\n\n## Best Practices\n\n1. **Use Appropriate Pipeline**: Configure for your document type\n2. **Handle Large Documents**: Process in chunks if needed\n3. **Verify Table Extraction**: Complex tables may need review\n4. **Check OCR Quality**: Enable OCR for scanned documents\n5. **Cache Results**: Store parsed documents for reuse\n\n## Common Patterns\n\n### Academic Paper Parser\n```python\ndef parse_academic_paper(pdf_path):\n    \"\"\"Parse academic paper structure.\"\"\"\n    \n    converter = DocumentConverter()\n    result = converter.convert(pdf_path)\n    doc = result.document\n    \n    paper = {\n        'title': None,\n        'abstract': None,\n        'sections': [],\n        'references': [],\n        'tables': [],\n        'figures': []\n    }\n    \n    current_section = None\n    \n    for element in doc.iterate_items():\n        text = element.text if hasattr(element, 'text') else ''\n        \n        if element.type == 'title':\n            paper['title'] = text\n        \n        elif element.type == 'heading':\n            if 'abstract' in text.lower():\n                current_section = 'abstract'\n            elif 'reference' in text.lower():\n                current_section = 'references'\n            else:\n                paper['sections'].append({\n                    'title': text,\n                    'content': ''\n                })\n                current_section = 'section'\n        \n        elif element.type == 'paragraph':\n            if current_section == 'abstract':\n                paper['abstract'] = text\n            elif current_section == 'section' and paper['sections']:\n                paper['sections'][-1]['content'] += text + '\\n'\n        \n        elif element.type == 'table':\n            paper['tables'].append({\n                'caption': element.caption if hasattr(element, 'caption') else None,\n                'data': element.export_to_dataframe() if hasattr(element, 'export_to_dataframe') else None\n            })\n    \n    return paper\n```\n\n### Report to Structured Data\n```python\ndef parse_business_report(doc_path):\n    \"\"\"Parse business report into structured format.\"\"\"\n    \n    converter = DocumentConverter()\n    result = converter.convert(doc_path)\n    doc = result.document\n    \n    report = {\n        'metadata': {\n            'title': None,\n            'date': None,\n            'author': None\n        },\n        'executive_summary': None,\n        'sections': [],\n        'key_metrics': [],\n        'recommendations': []\n    }\n    \n    # Parse document structure\n    for element in doc.iterate_items():\n        # Implement parsing logic based on document structure\n        pass\n    \n    return report\n```\n\n## Examples\n\n### Example 1: Parse Financial Report\n```python\nfrom docling.document_converter import DocumentConverter\n\ndef parse_financial_report(pdf_path):\n    \"\"\"Extract structured data from financial report.\"\"\"\n    \n    converter = DocumentConverter()\n    result = converter.convert(pdf_path)\n    doc = result.document\n    \n    financial_data = {\n        'income_statement': None,\n        'balance_sheet': None,\n        'cash_flow': None,\n        'notes': []\n    }\n    \n    # Extract tables\n    tables = []\n    for element in doc.iterate_items():\n        if element.type == 'table':\n            table_df = element.export_to_dataframe()\n            \n            # Identify table type\n            if 'revenue' in str(table_df).lower() or 'income' in str(table_df).lower():\n                financial_data['income_statement'] = table_df\n            elif 'asset' in str(table_df).lower() or 'liabilities' in str(table_df).lower():\n                financial_data['balance_sheet'] = table_df\n            elif 'cash' in str(table_df).lower():\n                financial_data['cash_flow'] = table_df\n            else:\n                tables.append(table_df)\n    \n    # Extract markdown for notes\n    financial_data['markdown'] = doc.export_to_markdown()\n    \n    return financial_data\n\nreport = parse_financial_report('annual_report.pdf')\nprint(\"Income Statement:\")\nprint(report['income_statement'])\n```\n\n### Example 2: Technical Documentation Parser\n```python\nfrom docling.document_converter import DocumentConverter\n\ndef parse_technical_docs(doc_path):\n    \"\"\"Parse technical documentation.\"\"\"\n    \n    converter = DocumentConverter()\n    result = converter.convert(doc_path)\n    doc = result.document\n    \n    documentation = {\n        'title': None,\n        'version': None,\n        'sections': [],\n        'code_blocks': [],\n        'diagrams': []\n    }\n    \n    current_section = None\n    \n    for element in doc.iterate_items():\n        if element.type == 'title':\n            documentation['title'] = element.text\n        \n        elif element.type == 'heading':\n            current_section = {\n                'title': element.text,\n                'level': element.level if hasattr(element, 'level') else 1,\n                'content': []\n            }\n            documentation['sections'].append(current_section)\n        \n        elif element.type == 'code':\n            if current_section:\n                current_section['content'].append({\n                    'type': 'code',\n                    'content': element.text\n                })\n            documentation['code_blocks'].append(element.text)\n        \n        elif element.type == 'picture':\n            documentation['diagrams'].append({\n                'page': element.prov[0].page_no if element.prov else None,\n                'caption': element.caption if hasattr(element, 'caption') else None\n            })\n    \n    return documentation\n\ndocs = parse_technical_docs('api_documentation.pdf')\nprint(f\"Title: {docs['title']}\")\nprint(f\"Sections: {len(docs['sections'])}\")\n```\n\n### Example 3: Contract Analysis\n```python\nfrom docling.document_converter import DocumentConverter\n\ndef analyze_contract(pdf_path):\n    \"\"\"Parse contract document for key clauses.\"\"\"\n    \n    converter = DocumentConverter()\n    result = converter.convert(pdf_path)\n    doc = result.document\n    \n    contract = {\n        'parties': [],\n        'clauses': [],\n        'dates': [],\n        'amounts': [],\n        'full_text': doc.export_to_text()\n    }\n    \n    import re\n    \n    # Extract dates\n    date_pattern = r'\\b\\d{1,2}[\u002F-]\\d{1,2}[\u002F-]\\d{2,4}\\b|\\b(?:Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)[a-z]* \\d{1,2},? \\d{4}\\b'\n    contract['dates'] = re.findall(date_pattern, contract['full_text'], re.IGNORECASE)\n    \n    # Extract monetary amounts\n    amount_pattern = r'\\$[\\d,]+(?:\\.\\d{2})?|\\b\\d+(?:,\\d{3})*(?:\\.\\d{2})?\\s*(?:USD|dollars)\\b'\n    contract['amounts'] = re.findall(amount_pattern, contract['full_text'], re.IGNORECASE)\n    \n    # Parse sections as clauses\n    for element in doc.iterate_items():\n        if element.type == 'heading':\n            contract['clauses'].append({\n                'title': element.text,\n                'content': ''\n            })\n        elif element.type == 'paragraph' and contract['clauses']:\n            contract['clauses'][-1]['content'] += element.text + '\\n'\n    \n    return contract\n\ncontract_data = analyze_contract('agreement.pdf')\nprint(f\"Key dates: {contract_data['dates']}\")\nprint(f\"Amounts: {contract_data['amounts']}\")\n```\n\n## Limitations\n\n- Very large documents may require chunking\n- Handwritten content needs OCR preprocessing\n- Complex nested tables may need manual review\n- Some PDF types (encrypted) not supported\n- GPU recommended for best performance\n\n## Installation\n\n```bash\npip install docling\n\n# For full functionality\npip install docling[all]\n\n# For OCR support\npip install docling[ocr]\n```\n\n## Resources\n\n- [docling GitHub](https:\u002F\u002Fgithub.com\u002FDS4SD\u002Fdocling)\n- [Documentation](https:\u002F\u002Fds4sd.github.io\u002Fdocling\u002F)\n- [IBM Research Blog](https:\u002F\u002Fresearch.ibm.com\u002F)\n","# Document Parser Skill\n\n## Overview\n\nThis skill enables advanced document parsing using **docling** - IBM's state-of-the-art document understanding library. Parse complex PDFs, Word documents, and images while preserving structure, extracting tables, figures, and handling multi-column layouts.\n\n## How to Use\n\n1. Provide the document to parse\n2. Specify what you want to extract (text, tables, figures, etc.)\n3. I'll parse it and return structured data\n\n**Example prompts:**\n- \"Parse this PDF and extract all tables\"\n- \"Convert this academic paper to structured markdown\"\n- \"Extract figures and captions from this document\"\n- \"Parse this report preserving the document structure\"\n\n## Domain Knowledge\n\n### docling Fundamentals\n\n```python\nfrom docling.document_converter import DocumentConverter\n\n# Initialize converter\nconverter = DocumentConverter()\n\n# Convert document\nresult = converter.convert(\"document.pdf\")\n\n# Access parsed content\ndoc = result.document\nprint(doc.export_to_markdown())\n```\n\n### Supported Formats\n\n| Format | Extension | Notes |\n|--------|-----------|-------|\n| PDF | .pdf | Native and scanned |\n| Word | .docx | Full structure preserved |\n| PowerPoint | .pptx | Slides as sections |\n| Images | .png, .jpg | OCR + layout analysis |\n| HTML | .html | Structure preserved |\n\n### Basic Usage\n\n```python\nfrom docling.document_converter import DocumentConverter\n\n# Create converter\nconverter = DocumentConverter()\n\n# Convert single document\nresult = converter.convert(\"report.pdf\")\n\n# Access document\ndoc = result.document\n\n# Export options\nmarkdown = doc.export_to_markdown()\ntext = doc.export_to_text()\njson_doc = doc.export_to_dict()\n```\n\n### Advanced Configuration\n\n```python\nfrom docling.document_converter import DocumentConverter\nfrom docling.datamodel.base_models import InputFormat\nfrom docling.datamodel.pipeline_options import PdfPipelineOptions\n\n# Configure pipeline\npipeline_options = PdfPipelineOptions()\npipeline_options.do_ocr = True\npipeline_options.do_table_structure = True\npipeline_options.table_structure_options.do_cell_matching = True\n\n# Create converter with options\nconverter = DocumentConverter(\n    allowed_formats=[InputFormat.PDF, InputFormat.DOCX],\n    pdf_backend_options=pipeline_options\n)\n\nresult = converter.convert(\"document.pdf\")\n```\n\n### Document Structure\n\n```python\n# Document hierarchy\ndoc = result.document\n\n# Access metadata\nprint(doc.name)\nprint(doc.origin)\n\n# Iterate through content\nfor element in doc.iterate_items():\n    print(f\"Type: {element.type}\")\n    print(f\"Text: {element.text}\")\n    \n    if element.type == \"table\":\n        print(f\"Rows: {len(element.data.table_cells)}\")\n```\n\n### Extracting Tables\n\n```python\nfrom docling.document_converter import DocumentConverter\nimport pandas as pd\n\ndef extract_tables(doc_path):\n    \"\"\"Extract all tables from document.\"\"\"\n    converter = DocumentConverter()\n    result = converter.convert(doc_path)\n    doc = result.document\n    \n    tables = []\n    \n    for element in doc.iterate_items():\n        if element.type == \"table\":\n            # Get table data\n            table_data = element.export_to_dataframe()\n            tables.append({\n                'page': element.prov[0].page_no if element.prov else None,\n                'dataframe': table_data\n            })\n    \n    return tables\n\n# Usage\ntables = extract_tables(\"report.pdf\")\nfor i, table in enumerate(tables):\n    print(f\"Table {i+1} on page {table['page']}:\")\n    print(table['dataframe'])\n```\n\n### Extracting Figures\n\n```python\ndef extract_figures(doc_path, output_dir):\n    \"\"\"Extract figures with captions.\"\"\"\n    import os\n    \n    converter = DocumentConverter()\n    result = converter.convert(doc_path)\n    doc = result.document\n    \n    figures = []\n    os.makedirs(output_dir, exist_ok=True)\n    \n    for element in doc.iterate_items():\n        if element.type == \"picture\":\n            figure_info = {\n                'caption': element.caption if hasattr(element, 'caption') else None,\n                'page': element.prov[0].page_no if element.prov else None,\n            }\n            \n            # Save image if available\n            if hasattr(element, 'image'):\n                img_path = os.path.join(output_dir, f\"figure_{len(figures)+1}.png\")\n                element.image.save(img_path)\n                figure_info['path'] = img_path\n            \n            figures.append(figure_info)\n    \n    return figures\n```\n\n### Handling Multi-column Layouts\n\n```python\nfrom docling.document_converter import DocumentConverter\n\ndef parse_multicolumn(doc_path):\n    \"\"\"Parse document with multi-column layout.\"\"\"\n    \n    converter = DocumentConverter()\n    result = converter.convert(doc_path)\n    doc = result.document\n    \n    # docling automatically handles column detection\n    # Text is returned in reading order\n    \n    structured_content = []\n    \n    for element in doc.iterate_items():\n        content_item = {\n            'type': element.type,\n            'text': element.text if hasattr(element, 'text') else None,\n            'level': element.level if hasattr(element, 'level') else None,\n        }\n        \n        # Add bounding box if available\n        if element.prov:\n            content_item['bbox'] = element.prov[0].bbox\n            content_item['page'] = element.prov[0].page_no\n        \n        structured_content.append(content_item)\n    \n    return structured_content\n```\n\n### Export Formats\n\n```python\nfrom docling.document_converter import DocumentConverter\n\nconverter = DocumentConverter()\nresult = converter.convert(\"document.pdf\")\ndoc = result.document\n\n# Markdown export\nmarkdown = doc.export_to_markdown()\nwith open(\"output.md\", \"w\") as f:\n    f.write(markdown)\n\n# Plain text\ntext = doc.export_to_text()\n\n# JSON\u002Fdict format\njson_doc = doc.export_to_dict()\n\n# HTML format (if supported)\n# html = doc.export_to_html()\n```\n\n### Batch Processing\n\n```python\nfrom docling.document_converter import DocumentConverter\nfrom pathlib import Path\nfrom concurrent.futures import ThreadPoolExecutor\n\ndef batch_parse(input_dir, output_dir, max_workers=4):\n    \"\"\"Parse multiple documents in parallel.\"\"\"\n    \n    input_path = Path(input_dir)\n    output_path = Path(output_dir)\n    output_path.mkdir(exist_ok=True)\n    \n    converter = DocumentConverter()\n    \n    def process_single(doc_path):\n        try:\n            result = converter.convert(str(doc_path))\n            md = result.document.export_to_markdown()\n            \n            out_file = output_path \u002F f\"{doc_path.stem}.md\"\n            with open(out_file, 'w') as f:\n                f.write(md)\n            \n            return {'file': str(doc_path), 'status': 'success'}\n        except Exception as e:\n            return {'file': str(doc_path), 'status': 'error', 'error': str(e)}\n    \n    docs = list(input_path.glob('*.pdf')) + list(input_path.glob('*.docx'))\n    \n    with ThreadPoolExecutor(max_workers=max_workers) as executor:\n        results = list(executor.map(process_single, docs))\n    \n    return results\n```\n\n## Best Practices\n\n1. **Use Appropriate Pipeline**: Configure for your document type\n2. **Handle Large Documents**: Process in chunks if needed\n3. **Verify Table Extraction**: Complex tables may need review\n4. **Check OCR Quality**: Enable OCR for scanned documents\n5. **Cache Results**: Store parsed documents for reuse\n\n## Common Patterns\n\n### Academic Paper Parser\n```python\ndef parse_academic_paper(pdf_path):\n    \"\"\"Parse academic paper structure.\"\"\"\n    \n    converter = DocumentConverter()\n    result = converter.convert(pdf_path)\n    doc = result.document\n    \n    paper = {\n        'title': None,\n        'abstract': None,\n        'sections': [],\n        'references': [],\n        'tables': [],\n        'figures': []\n    }\n    \n    current_section = None\n    \n    for element in doc.iterate_items():\n        text = element.text if hasattr(element, 'text') else ''\n        \n        if element.type == 'title':\n            paper['title'] = text\n        \n        elif element.type == 'heading':\n            if 'abstract' in text.lower():\n                current_section = 'abstract'\n            elif 'reference' in text.lower():\n                current_section = 'references'\n            else:\n                paper['sections'].append({\n                    'title': text,\n                    'content': ''\n                })\n                current_section = 'section'\n        \n        elif element.type == 'paragraph':\n            if current_section == 'abstract':\n                paper['abstract'] = text\n            elif current_section == 'section' and paper['sections']:\n                paper['sections'][-1]['content'] += text + '\\n'\n        \n        elif element.type == 'table':\n            paper['tables'].append({\n                'caption': element.caption if hasattr(element, 'caption') else None,\n                'data': element.export_to_dataframe() if hasattr(element, 'export_to_dataframe') else None\n            })\n    \n    return paper\n```\n\n### Report to Structured Data\n```python\ndef parse_business_report(doc_path):\n    \"\"\"Parse business report into structured format.\"\"\"\n    \n    converter = DocumentConverter()\n    result = converter.convert(doc_path)\n    doc = result.document\n    \n    report = {\n        'metadata': {\n            'title': None,\n            'date': None,\n            'author': None\n        },\n        'executive_summary': None,\n        'sections': [],\n        'key_metrics': [],\n        'recommendations': []\n    }\n    \n    # Parse document structure\n    for element in doc.iterate_items():\n        # Implement parsing logic based on document structure\n        pass\n    \n    return report\n```\n\n## Examples\n\n### Example 1: Parse Financial Report\n```python\nfrom docling.document_converter import DocumentConverter\n\ndef parse_financial_report(pdf_path):\n    \"\"\"Extract structured data from financial report.\"\"\"\n    \n    converter = DocumentConverter()\n    result = converter.convert(pdf_path)\n    doc = result.document\n    \n    financial_data = {\n        'income_statement': None,\n        'balance_sheet': None,\n        'cash_flow': None,\n        'notes': []\n    }\n    \n    # Extract tables\n    tables = []\n    for element in doc.iterate_items():\n        if element.type == 'table':\n            table_df = element.export_to_dataframe()\n            \n            # Identify table type\n            if 'revenue' in str(table_df).lower() or 'income' in str(table_df).lower():\n                financial_data['income_statement'] = table_df\n            elif 'asset' in str(table_df).lower() or 'liabilities' in str(table_df).lower():\n                financial_data['balance_sheet'] = table_df\n            elif 'cash' in str(table_df).lower():\n                financial_data['cash_flow'] = table_df\n            else:\n                tables.append(table_df)\n    \n    # Extract markdown for notes\n    financial_data['markdown'] = doc.export_to_markdown()\n    \n    return financial_data\n\nreport = parse_financial_report('annual_report.pdf')\nprint(\"Income Statement:\")\nprint(report['income_statement'])\n```\n\n### Example 2: Technical Documentation Parser\n```python\nfrom docling.document_converter import DocumentConverter\n\ndef parse_technical_docs(doc_path):\n    \"\"\"Parse technical documentation.\"\"\"\n    \n    converter = DocumentConverter()\n    result = converter.convert(doc_path)\n    doc = result.document\n    \n    documentation = {\n        'title': None,\n        'version': None,\n        'sections': [],\n        'code_blocks': [],\n        'diagrams': []\n    }\n    \n    current_section = None\n    \n    for element in doc.iterate_items():\n        if element.type == 'title':\n            documentation['title'] = element.text\n        \n        elif element.type == 'heading':\n            current_section = {\n                'title': element.text,\n                'level': element.level if hasattr(element, 'level') else 1,\n                'content': []\n            }\n            documentation['sections'].append(current_section)\n        \n        elif element.type == 'code':\n            if current_section:\n                current_section['content'].append({\n                    'type': 'code',\n                    'content': element.text\n                })\n            documentation['code_blocks'].append(element.text)\n        \n        elif element.type == 'picture':\n            documentation['diagrams'].append({\n                'page': element.prov[0].page_no if element.prov else None,\n                'caption': element.caption if hasattr(element, 'caption') else None\n            })\n    \n    return documentation\n\ndocs = parse_technical_docs('api_documentation.pdf')\nprint(f\"Title: {docs['title']}\")\nprint(f\"Sections: {len(docs['sections'])}\")\n```\n\n### Example 3: Contract Analysis\n```python\nfrom docling.document_converter import DocumentConverter\n\ndef analyze_contract(pdf_path):\n    \"\"\"Parse contract document for key clauses.\"\"\"\n    \n    converter = DocumentConverter()\n    result = converter.convert(pdf_path)\n    doc = result.document\n    \n    contract = {\n        'parties': [],\n        'clauses': [],\n        'dates': [],\n        'amounts': [],\n        'full_text': doc.export_to_text()\n    }\n    \n    import re\n    \n    # Extract dates\n    date_pattern = r'\\b\\d{1,2}[\u002F-]\\d{1,2}[\u002F-]\\d{2,4}\\b|\\b(?:Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)[a-z]* \\d{1,2},? \\d{4}\\b'\n    contract['dates'] = re.findall(date_pattern, contract['full_text'], re.IGNORECASE)\n    \n    # Extract monetary amounts\n    amount_pattern = r'\\$[\\d,]+(?:\\.\\d{2})?|\\b\\d+(?:,\\d{3})*(?:\\.\\d{2})?\\s*(?:USD|dollars)\\b'\n    contract['amounts'] = re.findall(amount_pattern, contract['full_text'], re.IGNORECASE)\n    \n    # Parse sections as clauses\n    for element in doc.iterate_items():\n        if element.type == 'heading':\n            contract['clauses'].append({\n                'title': element.text,\n                'content': ''\n            })\n        elif element.type == 'paragraph' and contract['clauses']:\n            contract['clauses'][-1]['content'] += element.text + '\\n'\n    \n    return contract\n\ncontract_data = analyze_contract('agreement.pdf')\nprint(f\"Key dates: {contract_data['dates']}\")\nprint(f\"Amounts: {contract_data['amounts']}\")\n```\n\n## Limitations\n\n- Very large documents may require chunking\n- Handwritten content needs OCR preprocessing\n- Complex nested tables may need manual review\n- Some PDF types (encrypted) not supported\n- GPU recommended for best performance\n\n## Installation\n\n```bash\npip install docling\n\n# For full functionality\npip install docling[all]\n\n# For OCR support\npip install docling[ocr]\n```\n\n## Resources\n\n- [docling GitHub](https:\u002F\u002Fgithub.com\u002FDS4SD\u002Fdocling)\n- [Documentation](https:\u002F\u002Fds4sd.github.io\u002Fdocling\u002F)\n- [IBM Research Blog](https:\u002F\u002Fresearch.ibm.com\u002F)\n",{"mcp":24,"name":5,"tags":29,"author":34,"models":35,"license":15,"version":43,"category":30,"languages":44,"department":47,"description":7,"capabilities":48},{"tools":25,"server":28},[26,27],"analyze_document_structure","extract_text_from_pdf","office-mcp",[30,31,32,33],"parsing","extraction","layout","docling","claude-office-skills",{"compatible":36,"recommended":40},[37,38,39],"claude-3-5-sonnet","gpt-4","gpt-4o",[41,42],"claude-sonnet-4","claude-opus-4","1.0",[45,46],"en","zh","All",[49,50],"document_parsing","layout_analysis","main","8859218955d9504cd18b59e7892100718039d3b4","data\u002Fskills\u002Fclaude-office-skills-skills\u002Fdoc-parser\u002Fdoc-parser",1,"https:\u002F\u002Fgithub.com\u002Fom-scogo\u002Fskillsh-scraper","https:\u002F\u002Fgithub.com\u002Fom-scogo","SDE-1 @ Scogo ","2026-07-18 12:22:46",{"source":8,"skillName":5,"commands":60,"prompt":70,"zipAvailable":71},[61,64,67],{"tool":62,"command":63},"npx","npx skills add om-scogo\u002Fskillsh-scraper --skill doc-parser",{"tool":65,"command":66},"bunx","bunx skills add om-scogo\u002Fskillsh-scraper --skill doc-parser",{"tool":68,"command":69},"pnpm","pnpm dlx skills add om-scogo\u002Fskillsh-scraper --skill doc-parser","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fom-scogo\u002Fskillsh-scraper\u002Fblob\u002Fmain\u002Fdata\u002Fskills\u002Fclaude-office-skills-skills\u002Fdoc-parser\u002Fdoc-parser\u002FSKILL.md",true,[],[74,81,86,93,98,105],{"skillNo":75,"name":76,"nameZh":6,"description":77,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":78,"categories":79,"keywords":80,"publishedAt":19},"01M7D6MC9FAAEV4CMNYX8W7JTG","arxiv-search","Search arXiv physics, math, and computer science preprints using natural language queries. Powered by Valyu semantic search.","https:\u002F\u002Fgithub.com\u002Fom-scogo\u002Fskillsh-scraper\u002Fblob\u002Fmain\u002Fdata\u002Fskills\u002Fyorkeccak-scientific-skills\u002Farxiv-search\u002Fskills\u002Farxiv-search\u002FSKILL.md",[],[],{"skillNo":82,"name":76,"nameZh":6,"description":77,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":83,"categories":84,"keywords":85,"publishedAt":19},"01M7D6M85CKKN87TA98VCQV4H7","https:\u002F\u002Fgithub.com\u002Fom-scogo\u002Fskillsh-scraper\u002Fblob\u002Fmain\u002Fdata\u002Fskills\u002Fyorkeccak-scientific-skills\u002Farxiv-search\u002FSkill.md",[],[],{"skillNo":87,"name":88,"nameZh":6,"description":89,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":90,"categories":91,"keywords":92,"publishedAt":19},"01M7D4ZTCS4DR3CE4JY06X84T2","working-with-legacy-code","Safely change and test untested codebases using Feathers' \"Working Effectively with Legacy Code\". Use when the user mentions \"legacy code\", \"no tests\", \"untested codebase\", \"how do I test this\", \"seams\", \"characterization tests\", \"golden master\", \"sprout method\", \"afraid to change this code\", \"monster method\", \"dependency breaking\", or \"inherited a messy codebase\". Also trigger when changing code without tests safely, getting a class under test when constructors, statics, or singletons block it, adding features to tangled modules, or planning incremental test coverage for an old codebase. Covers the legacy-code change algorithm, seams, characterization tests, sprout\u002Fwrap, and dependency-breaking techniques. For refactoring code that already has tests, see refactoring-patterns. For day-to-day code quality, see clean-code.","https:\u002F\u002Fgithub.com\u002Fom-scogo\u002Fskillsh-scraper\u002Fblob\u002Fmain\u002Fdata\u002Fskills\u002Fwondelai-skills\u002Fworking-with-legacy-code\u002Fworking-with-legacy-code\u002FSKILL.md",[],[],{"skillNo":94,"name":88,"nameZh":6,"description":89,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":95,"categories":96,"keywords":97,"publishedAt":19},"01M7D4ZHZKJD2RSNGAF63V14P4","https:\u002F\u002Fgithub.com\u002Fom-scogo\u002Fskillsh-scraper\u002Fblob\u002Fmain\u002Fdata\u002Fskills\u002Fwondelai-skills\u002Fworking-with-legacy-code\u002FSkill.md",[],[],{"skillNo":99,"name":100,"nameZh":6,"description":101,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":102,"categories":103,"keywords":104,"publishedAt":19},"01M7D4ZB4CJBFW5JE67CPH2QRV","web-typography","Select, pair, and implement typefaces for web projects. Use when the user mentions \"font pairing\", \"which typeface\", \"line height\", \"responsive typography\", \"web font loading\", \"type hierarchy\", \"variable fonts\", \"FOUT\u002FFOIT\", \"typographic scale\", or \"the text is hard to read\". Also trigger when choosing between system fonts and web fonts, optimizing font-loading performance, or designing readable long-form content. Covers readability evaluation, CSS implementation, and performance optimization. For overall UI design systems, see refactoring-ui. For dramatic typographic experiences, see top-design.","https:\u002F\u002Fgithub.com\u002Fom-scogo\u002Fskillsh-scraper\u002Fblob\u002Fmain\u002Fdata\u002Fskills\u002Fwondelai-skills\u002Fweb-typography\u002Fweb-typography\u002FSKILL.md",[],[],{"skillNo":106,"name":100,"nameZh":6,"description":101,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":107,"categories":108,"keywords":109,"publishedAt":19},"01M7D4Z4MVYVY3NMJ18BNV6WNA","https:\u002F\u002Fgithub.com\u002Fom-scogo\u002Fskillsh-scraper\u002Fblob\u002Fmain\u002Fdata\u002Fskills\u002Fwondelai-skills\u002Fweb-typography\u002FSkill.md",[],[]]