peregrinus / wscdoc
Read, inspect and conservatively create/edit Worksheet Crafter .wscdoc files.
Requires
- php: ^8.2
- ext-json: *
- ext-mbstring: *
- ext-zip: *
Requires (Dev)
- phpunit/phpunit: ^11.0
This package is auto-updated.
Last update: 2026-08-19 15:28:13 UTC
README
Unofficial, independent PHP tooling for Worksheet Crafter .wscdoc files.
Current implementation focuses on:
- archive validation
info.json- embedded
preview.jpg - internal format detection
- fallback manifest/assets
ws2.abdscanning- UTF-16LE JSON block extraction
- conservative variable-length rich-text replacement
- saving a modified copy while preserving unknown archive data
Install
composer require peregrinus/wscdoc
Inspect
use Peregrinus\WscDoc\WscDocument; $doc = WscDocument::open('worksheet.wscdoc'); echo $doc->formatVersion(); echo $doc->info()->pageCount(); echo $doc->info()->creatorVersion(); file_put_contents('preview.jpg', $doc->previewBytes()); foreach ($doc->fallbackAssets() as $asset) { printf( "%s %s verified=%s\n", $asset->archivePath, $asset->checksum(), var_export($asset->verifiesManifestChecksum(), true) ); }
Conservative text mutation
This currently targets JSON-backed FormattedText blocks found in modern documents.
$doc = WscDocument::open('template.wscdoc'); $count = $doc->replaceFormattedText( '[[TITLE]]', 'Taufe – Gott sagt Ja zu dir' ); $doc->saveAs('generated.wscdoc');
The implementation rewrites only the affected local length-prefixed UTF-16LE JSON block and preserves unrelated ws2.abd data.
Status
This is reverse-engineered, experimental software.
See:
build/wscdoc-format.mdbuild/masterplan.md
License
peregrinus/wscdoc is licensed under the GNU General Public License, version 3 or any later version (GPL-3.0-or-later).
See LICENSE.
Legal / interoperability notice
This is an independent interoperability project. It is not affiliated with, sponsored by, approved by, or endorsed by SchoolCraft GmbH.
The package does not intentionally include Worksheet Crafter application code, templates, illustrations, fonts, asset packages, or proprietary sample documents.
Worksheet Crafter and related names are used solely to identify the third-party file format with which this software interoperates.
The GPL license applies to this library, not to third-party content that users may process with it. Users are responsible for the rights to content contained in or written to .wscdoc files.
See NOTICE.md for details.