Printable Vietnamese Lunar Calendar (PDF/SVG) API

Print-ready Vietnamese lunar calendars as PDF or SVG: wall, desk, 365-page block or one-page year, with holidays, can chi, good hours, logo and bleed.

POSTGEThttps://apibox.io.vn/v1/vn-calendar-print

Generate a calendar for any year 2021–2199 in four layouts: wall (12 month pages), desk (12 landscape pages with an events column), block (one page per day: big solar day, weekday, lunar day and month length, can chi of year / month / day, hoàng đạo hours, solar term, holiday, quote) and year (one page). Lunar dates come from the Vietnamese calendar at UTC+7 (Hồ Ngọc Đức's algorithm used by /v1/lunar-calendar): Tết Đinh Mùi is 06/02/2027 and the 12th month of Bính Ngọ has 29 days. Days off come from /v1/vn-holidays, hoàng đạo / hắc đạo from /v1/vn-good-days.

Options: size (a2, a3, a4, a5, a6, 13x19, 19x27, 10x15, letter or width_mm + height_mm), orientation, bleed_mm (0–10, with crop marks and PDF TrimBox / BleedBox), theme color, company name, logo (PNG / JPEG), company_holidays, quotes (one per month or day), week_start (monday or sunday) and a month range. format=pdf (default, Be Vietnam Pro embedded), svg (one page: page or date) or json (the day data used for the layout).

A full 365-page block calendar renders in about a second. Colours are RGB; ask your printer to convert to CMYK.

Markdown · OpenAPI · Postman · llms.txt

Parameters

NameInTypeRequiredDefault
yearbodynumbernoYear 2021–2199 (default next year from July).
layoutbodystringnowallwall, desk, block or year.
formatbodystringnopdfpdf, svg (one page) or json.
sizebodystringnoa2, a3, a4, a5, a6, 13x19, 19x27, 10x15, letter (default by layout).
orientationbodystringnoportrait or landscape.
bleed_mmbodynumberno0Bleed in mm (0–10); adds crop marks.
colorbodystringno#b3122eTheme colour (hex).
companybodystringnoCompany name printed on each page.
logobodyfilenoLogo PNG / JPEG (multipart or logo_base64, ≤ 2 MB).
company_holidaysbodyarrayno[{ "date": "2027-02-11", "name": "Nghỉ bù" }] (up to 100).
quotesbodyarraynoQuotes / greetings (up to 366, one per line accepted).
week_startbodystringnomondaymonday or sunday.
from_monthbodynumbernoFirst month to print (1–12).
to_monthbodynumbernoLast month to print (1–12).
pagebodynumbernoSVG: page number to return.
datebodystringnoSVG block layout: the day to return.
good_daysbodybooleannotrueBlock layout: print hoàng đạo / hắc đạo and trực.

Example

curl -X POST "https://apibox.io.vn/v1/vn-calendar-print" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"year":2027,"format":"json","from_month":2,"to_month":2}'

Response

{
  "year": 2027,
  "can_chi_year": "Đinh Mùi",
  "tet": "2027-02-06",
  "layout": "wall",
  "paper_mm": {
    "width": 297,
    "height": 420,
    "bleed": 0
  },
  "days": [
    {
      "date": "2027-02-05",
      "weekday_vi": "Thứ Sáu",
      "lunar": "29/12/2026",
      "lunar_month_length": 29,
      "can_chi": {
        "year": "Bính Ngọ",
        "month": "Tân Sửu",
        "day": "Ất Mão",
        "first_hour": "Bính Tý"
      },
      "solar_term": "Lập xuân",
      "lucky_hours": [
        "Tý",
        "Dần",
        "Mão",
        "Ngọ",
        "Mùi",
        "Dậu"
      ],
      "festival": "Giao thừa (Tất niên)",
      "day_off": "Tết Nguyên đán",
      "company": null,
      "observance": null,
      "red": true
    },
    {
      "date": "2027-02-06",
      "weekday_vi": "Thứ Bảy",
      "lunar": "01/01/2027",
      "lunar_month_length": 30,
      "can_chi": {
        "year": "Đinh Mùi",
        "month": "Nhâm Dần",
        "day": "Bính Thìn",
        "first_hour": "Mậu Tý"
      },
      "solar_term": "Lập xuân",
      "lucky_hours": [
        "Dần",
        "Thìn",
        "Tỵ",
        "Thân",
        "Dậu",
        "Hợi"
      ],
      "festival": "Tết Nguyên Đán",
      "day_off": "Tết Nguyên đán",
      "company": null,
      "observance": null,
      "red": true
    }
  ],
  "months": [
    {
      "month": 2,
      "lunar_span": "Âm lịch: tháng Chạp Bính Ngọ – tháng Giêng Đinh Mùi",
      "events": [
        "04/02 (28/12 ÂL): Tết Nguyên đán",
        "05/02 (29/12 ÂL): Giao thừa (Tất niên); Tết Nguyên đán",
        "06/02 (1/1 ÂL): Tết Nguyên đán; Mùng 1",
        "20/02 (15/1 ÂL): Tết Nguyên Tiêu (Rằm tháng Giêng); Rằm"
      ]
    }
  ]
}

Use cases

  • Print company Tết calendars with logo and company days off
  • Automate calendar production for a print shop (n8n / API)
  • Generate SVG pages for a designer to finish
  • Feed a calendar app with correct Vietnamese lunar data

FAQ

Why not use a Chinese lunar calendar library?

Vietnam uses UTC+7, so some new moons fall on a different day than in China (UTC+8) and some months and even Tết can differ. This API computes the Vietnamese calendar.

Can I add my own days off and quotes?

Yes: company_holidays as [{ "date", "name" }] are printed in red, and quotes are spread over the months (wall, desk) or days (block).

Is the PDF ready for professional printing?

Set bleed_mm (usually 3) to get the bleed, crop marks and TrimBox / BleedBox. Colours are RGB; most print shops convert them to CMYK.

Related APIs

Start with 1,000 free requests every month. Get free API key →