ScreenshotNeo

BlogHTML to image & PDF

How to Fix Rupee Symbols Missing in DocRaptor PDFs

Diagnose why ₹ is missing in a DocRaptor PDF, from source encoding and font coverage to remote font loading and PDF viewer behavior.

By the ScreenshotNeo team4 October 20266 min read

A missing ₹ in a DocRaptor PDF can come from several layers: the source may contain the wrong character, the selected font may not include U+20B9, a remote font may not load, or the PDF may display differently across readers. Check them in that order. UTF-8 fixes encoding problems, but it cannot supply a glyph that is absent from the font.

1. Confirm the source contains the rupee character

Inspect the HTML or request payload sent to DocRaptor. The amount should contain the actual rupee sign, ₹ (Unicode U+20B9), or a correct HTML numeric character reference such as ₹ or ₹. Check that the value has not become a replacement character (�), a question mark, or mojibake earlier in your application.

Declare UTF-8 in the document head:

<meta charset="utf-8">

DocRaptor recommends specifying UTF-8 when character encoding errors occur. If the HTML is built from a template or serialized through another service, inspect the final HTML bytes or logged string immediately before the PDF request as well as the original input. [DocRaptor documentation]

2. Check whether the applied font has U+20B9

A font-family name does not guarantee that its font file contains every character. Verify the glyph map for the exact font face used in the PDF, including the weight and style applied to the amount. If the font is split into subsets, check that the subset CSS serves for U+20B9.

DocRaptor’s custom-font example for Open Sans includes a unicode-range that does not include U+20B9. That example is a useful reminder to inspect subset ranges rather than infer coverage from a family name. DocRaptor describes custom fonts as working through web-style @font-face selectors; that declaration makes a font available but does not add missing glyphs. [Custom Fonts & Web Fonts]

Use a font whose actual file has a U+20B9 glyph. Check the font’s character map or font metadata, and verify every face and subset you reference. There is no universal font recommendation here: confirm coverage for the specific asset you intend to use.

3. Verify CSS selection and remote font delivery

Confirm that the amount’s computed styling selects the intended family, weight, and style. A more specific selector, inherited style, or missing weight can cause the PDF renderer to use a fallback font that lacks the glyph.

If the font is remote, confirm that DocRaptor’s servers can fetch its URL and that the response is usable. Review the document log: external-resource failures may be logged and ignored while PDF generation succeeds, leaving the document incomplete. For diagnosis, set the API option ignore_resources_errors to false so resource failures surface as errors. Return to the normal setting only after resolving the underlying fetch problem, if that is appropriate for your application. [Custom-font tutorial] [API documentation]

Here is a minimal HTML pattern to adapt. Replace the example URL with a font file you host, and first verify that the file includes U+20B9 and is reachable by DocRaptor. This is a diagnostic pattern, not a claim that a particular font or request has been tested. DocRaptor documents WOFF2 support for Pipeline 8 or higher, so confirm your pipeline before choosing that format. [Custom Fonts & Web Fonts]

<!doctype html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <style>
    @font-face {
      font-family: "InvoiceFont";
      src: url("https://your-host.example/fonts/invoice-font.woff2") format("woff2");
      font-weight: 400;
      font-style: normal;
    }
    .amount { font-family: "InvoiceFont", sans-serif; }
  </style>
</head>
<body><p class="amount">₹1,234.50</p></body>
</html>

4. Inspect the generated PDF and compare readers

Do not treat a browser preview as proof that the generated PDF is correct. Inspect the PDF itself:

  1. Extract or copy the amount’s text from the PDF, and check whether the extracted text contains ₹.
  2. Open the same PDF in a second reader, including a current Adobe viewer if available. Compare rendering and printing behavior.
  3. If Acrobat Pro is available, run Preflight and inspect font embedding and subsetting.
  4. If text extraction contains the sign but one viewer or printer does not show it, investigate viewer-specific rendering or embedding behavior before changing application input.

DocRaptor lists trying another font encoding, such as OTF when TTF causes a print problem, and trying a visually similar font among remedies that have helped. Treat these as controlled experiments: change one variable at a time, regenerate the PDF, then compare extraction and display in the target reader. [DocRaptor documentation]

Diagnostic checklist

  • Input: The source contains U+20B9 or a valid HTML character reference, not a replacement character or corrupted byte sequence.
  • Encoding: The HTML head declares UTF-8.
  • Coverage: The exact font face and subset used for the amount contain U+20B9.
  • Selection: CSS applies the intended family, style, and weight to the currency text.
  • Delivery: The remote font URL is reachable by DocRaptor, and resource errors have been checked in the document log.
  • PDF: Text extraction, a second reader, and—if available—Acrobat Preflight have been checked.

Common errors and fixes

Symptom Likely cause What to check or change
₹ becomes � or another incorrect character The source text was decoded or serialized incorrectly. Inspect the final HTML or request payload, correct the character at its source, and declare UTF-8.
₹ is blank or shown as a box The applied font face may not contain U+20B9. Check the glyph map of the exact face and subset; select a face with coverage.
The browser preview is correct but the PDF is not The PDF renderer may select a different face, fail to fetch a remote font, or use a subset that omits the glyph. Check computed CSS assumptions, remote-resource logs, subset ranges, and the generated PDF.
PDF generation succeeds but the font is missing An external-resource error may have been logged and ignored. Review the document log and temporarily set ignore_resources_errors to false to expose fetch failures.
The sign appears in one reader but not another Viewer, printer, font embedding, or subsetting behavior may differ. Compare readers, inspect extracted text, and use Acrobat Pro Preflight if available.
WOFF2 font does not work in the selected setup The DocRaptor pipeline may not support that format. Confirm the pipeline; DocRaptor says WOFF2 requires Pipeline 8 or higher.
Changing to a different font fixes one amount but breaks another The replacement face may have different glyph coverage or CSS weights. Verify all required characters and the exact face/style used across the document.

Performance, reliability, and cost considerations

Font retrieval is an additional external dependency. A remote asset that is slow or inaccessible can make output unreliable, and an ignored resource error can leave a PDF incomplete while generation still succeeds. Check resource logs and make the font available through a dependable URL. Where your workflow allows it, compare the generated PDF against a known-good sample as part of document review.

For diagnosis, fail visibly on resource errors with ignore_resources_errors: false; this can make a missing dependency easier to identify. The dossier provides no benchmark or cost figure for changing font format, hosting, or pipeline, so assess those against your own workload and DocRaptor configuration.

Or skip the browser setup

This issue is about PDF text rendering, so a website screenshot cannot replace checking the PDF’s source text, font coverage, resource log, or viewer behavior. If you also need a clean screenshot of the HTML invoice or a related page, ScreenshotNeo can capture a URL with one GET request. See the API documentation for request options.

curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp

ScreenshotNeo removes cookie banners, newsletter popups, and chat widgets before the shot. Bot checks, blank pages, and failed loads are never billed. Its MCP server lets AI agents take screenshots. The free plan includes 1,000 screenshots a month with no card; paid plans start at $5 for 3,000. Sign up for 1,000 free screenshots a month, with no card required.

FAQ

Will adding &#8377; fix every missing rupee sign?

No. It can represent the correct character in HTML, but the selected font still needs a U+20B9 glyph, and the PDF must render it correctly.

Does @font-face guarantee the rupee glyph is available?

No. It declares a font for use. Check the actual file, face, and any Unicode subset range for U+20B9.

How can I tell a missing glyph from a PDF reader problem?

Check text extraction and open the same generated PDF in another reader. If extraction contains ₹ but only one reader fails to display it, investigate that reader or the PDF’s font embedding and subsetting.

Which font should I use?

Choose a font only after verifying that the exact file and face include U+20B9 and testing the resulting PDF in the viewing environment your readers use.