ACR Report Viewer for VS Code
Preview ACR report, receipt and label templates at true paper size in VS Code, merge them with data, and export to PDF/PNG. Also print-previews Markdown, text, HTML and source code (Python, C/C++, C#, JS/TS, Rust, PHP…) and includes a PDF viewer.
日本語版はこちら | Version française ici
Getting started (try the sample in 3 steps)
- Open the Command Palette (
Ctrl+Shift+P) and run ACR: Open Samples (the sample folder opens in a new window)
- Open
acr-slip-list-en.template.json (English) or acr-slip-list-ja.template.json (Japanese) and press Ctrl+Alt+7. The purchase slip list (12,982 rows, 1,394 pages) is merged with its sample data (<name>.data.json in the same folder is picked up automatically)
- Use Save PNG or Save PDF in the panel to save the result
The rendering is done by the ACR engine (Google Skia), not by a browser's print emulation, so what you see is the actual paper-size output.
Features
- ACR report templates (JSON)
- Template design view: shows a template the way the ACR Designer canvas shows it (
Ctrl+Alt+8)
- Data-merge preview: merges a template with data and shows the result page by page (
Ctrl+Alt+7)
- Saves the merged result as PDF, or as PNG in a single ZIP file (ACR-PNG-PACKAGE format, same as ACR CLI) with a ZIP viewer
- Receipts and labels (
.rcpt.json): preview and PDF export of receipt/label templates
- Print preview of documents: Markdown / plain text (.txt) / HTML / source code (.py, .c, .cpp, .css, .cs, .js, .ts, .rs, .php, etc.)
- Live preview with no save required, one-click paper orientation toggle, PDF export
- Proper CJK (Japanese/Chinese/Korean) font fallback
- A preview button appears at the top right of the editor for Markdown / text / HTML, ACR templates and receipt/label templates
- Built-in PDF viewer (ACR PDF Preview)
- Interface language: Japanese / English / Français, selectable from the panels
Keyboard shortcuts
Ctrl+Alt+0: Open print preview (Markdown / text / HTML / source code)
Ctrl+Alt+9: Export as PDF (Markdown / text / HTML / source code)
Ctrl+Alt+8: Show the design of an ACR template
Ctrl+Alt+7: Merge an ACR template with data and show the result
ACR templates
Open an ACR template (a JSON file) in the editor, then use the shortcuts or the button at the top right of the editor.
Show the template design (Ctrl+Alt+8)
Shows the bands and controls of the template the way the ACR Designer canvas shows them. The view refreshes when you save the file.
Merge the template with data (Ctrl+Alt+7)
Merges the template with data and shows the result page by page.
- If a file named
<template name>.data.json is in the same folder as the template, it is loaded automatically. For a template named <name>.template.json, <name>.data.json is also looked for (e.g. acr-slip-list-en.template.json → acr-slip-list-en.data.json).
- Otherwise the DataField input form opens. Type a value for each DataField and press "Show". "Add row" adds more detail rows.
- The panel has these buttons: Select file (choose another data file), Input form, Render, Clear (removes the data and opens the input form), Save PNG, Save PDF, and a language selector.
- A data file is JSON of this form:
{ "Parameters": { "Data": [ { "FIELD1": "value", "FIELD2": "value" } ] } }
Receipts and labels
Open a receipt/label template (.rcpt.json) and run ACR: Preview Receipt/Label (or press the button at the top right of the editor). ACR: Export Receipt/Label as PDF exports it as PDF.
PDF files
PDF files you save from the data-merge panel open in ACR PDF Preview when you press "Open" in the notification. Other PDF files are not opened by this extension automatically. To view any PDF in ACR PDF Preview, right-click the editor tab and choose Reopen Editor With... > ACR PDF Preview.
Watermark and license
This extension is for previewing and checking reports. PNG and PDF files produced from an ACR template always carry a "Generated by Across Report" watermark, whether or not you have registered a license.
To output reports without the watermark (for printing or production use), use ACR Viewer or ACR CLI with a registered license. See the official website for details.
The extension itself is free to use under the terms in LICENSE.txt (the source code is not public; reverse engineering and redistribution are not permitted).
Installation
Install from the VS Code Marketplace (recommended) or Open VSX.
To install manually, download the .vsix file matching your OS from Releases:
- Windows (x64):
acr-viewer-vscode-win32-x64-X.X.X.vsix
- Windows (ARM64):
acr-viewer-vscode-win32-arm64-X.X.X.vsix
- macOS (Apple Silicon):
acr-viewer-vscode-darwin-arm64-X.X.X.vsix
- macOS (Intel):
acr-viewer-vscode-darwin-x64-X.X.X.vsix
- Linux (x64):
acr-viewer-vscode-linux-x64-X.X.X.vsix
- Linux (ARM64):
acr-viewer-vscode-linux-arm64-X.X.X.vsix
code --install-extension acr-viewer-vscode-<your-platform>-X.X.X.vsix
- Windows (x64 / ARM64)
- macOS (Apple Silicon / Intel)
- Linux (x64 / ARM64)
On Linux, the .deb or .rpm build of VS Code is required. The Snap build of VS Code is not supported.
Settings
acrViewer.debugLog (default: off): outputs debug logs from the extension and the ACR engine to the Developer Tools console, for troubleshooting.
Feedback
If you find this extension useful, a review on the Marketplace helps a lot. Questions and reports: across.support@gmail.com
Learn more
ACR — Across Report Renderer