Export Resume Analysis as PDF
Generates and downloads a professionally formatted PDF report containing the complete resume analysis, including scores, strengths, suggestions, and visualizations.Endpoint
Authentication
This endpoint requires authentication. Include your authentication token in the request headers.Path Parameters
The unique identifier of the resume whose analysis report to export
Response
This endpoint returns a binary PDF file with appropriate headers for file download.Response Headers
Set to
application/pdfSet to
attachment; filename*=UTF-8''<encoded_filename>.pdfThe filename follows the pattern: 简历分析报告_<original_filename>.pdfResponse Body
Binary PDF file content containing:- Resume metadata (filename, upload date, analysis date)
- Overall score with visual indicator
- Detailed score breakdown (content, structure, skills, expression, projects)
- Score visualization charts
- Identified strengths (bulleted list)
- Improvement suggestions (categorized list)
- AI-generated summary
- Branding and professional formatting
Examples
Success Response
HTTP Status: 200 OK
Headers:Error Responses
Error Response Format
Unlike successful responses (which return binary PDF), errors return JSON:HTTP Status: 500 Internal Server Error
If PDF generation fails, the endpoint returns an HTTP 500 status with an empty body.PDF Report Contents
The generated PDF includes the following sections:Header Section
Header Section
- Report title: “简历分析报告” (Resume Analysis Report)
- Resume filename
- Upload timestamp
- Analysis timestamp
- Report generation date
Overall Score Section
Overall Score Section
- Large, prominent overall score display
- Score interpretation (Exceptional/Excellent/Good/Average/Needs Improvement)
- Visual score indicator (color-coded)
Score Breakdown Section
Score Breakdown Section
Detailed scores with visual bars:
- Content Score (内容分数)
- Structure Score (结构分数)
- Skill Match Score (技能匹配)
- Expression Score (表达分数)
- Project Score (项目经验)
Strengths Section
Strengths Section
- Title: “主要优势” (Key Strengths)
- Bulleted list of identified strengths
- Professional formatting with icons
Suggestions Section
Suggestions Section
- Title: “改进建议” (Improvement Suggestions)
- Categorized suggestions:
- Content Optimization (内容优化)
- Structure Improvement (结构改进)
- Skill Enhancement (技能展示)
- Detailed descriptions for each suggestion
Summary Section
Summary Section
- Title: “AI 分析总结” (AI Analysis Summary)
- AI-generated comprehensive summary
- Professional narrative format
Footer Section
Footer Section
PDF Specifications
- Format: PDF 1.4 compatible
- Page Size: A4 (210 × 297 mm)
- Orientation: Portrait
- Encoding: UTF-8 with full Chinese character support
- Fonts: Embedded Chinese fonts for proper rendering
- File Size: Typically 200-500 KB depending on content length
- Color: Full color with professional branding
Implementation Notes
Filename Encoding: The
Content-Disposition header uses RFC 5987 encoding (filename*=UTF-8''...) to properly handle Chinese characters in filenames. Modern browsers will automatically decode this.Caching: Generated PDFs are created on-demand and not cached. Each export request generates a fresh PDF with the latest analysis data.
Use Cases
- Portfolio Building: Download analysis reports for personal records
- Progress Tracking: Compare exported reports over time as resume improves
- Sharing with Mentors: Send PDF reports to career coaches or mentors for feedback
- Job Application Documentation: Include analysis as supplementary material
- Offline Review: Review analysis without requiring internet access
Best Practices
Check Analysis Status First
Check Analysis Status First
Before offering export functionality, verify the resume has completed analysis:
Handle Browser Compatibility
Handle Browser Compatibility
Different browsers handle file downloads differently. Use the Blob API for maximum compatibility:
Provide User Feedback
Provide User Feedback
PDF generation can take 1-3 seconds. Show loading indicators:
Related Endpoints
- Get Resume Detail - Check analysis status before export
- List Resumes - Get all resumes to select for export
- Upload Resume - Upload and analyze a new resume
