Wisp
A low-level library for interacting with PDF files
Install / Use
/learn @patriksvensson/WispREADME
Wisp

A low-level library for interacting with PDF files.
This is currently a work in progress.
Example
// Open the PDF document
var document = CosDocument.Open(
File.OpenRead(
"/Users/patrik/input.pdf"));
// Create a new object
var obj = new CosObject(
document.XRefTable.GetNextId(),
new CosDictionary()
{
{ new CosName("/Foo"), new CosInteger(32) },
{ new CosName("/Bar"), new CosString("Patrik") },
});
// Add the created object to the document
document.Objects.Set(obj);
// Get an object from the document and manipulate it
// In this case we know that the object 25:0 exist, but this
// will most certainly crash if you're running this as is.
var other = document.Objects.Get(number: 25, generation: 0);
((CosDictionary)other.Object)[new CosName("Baz")] = new CosString("Hello");
// Change the author of the document
document.Info.Title = new CosString("Wisp test");
document.Info.Author = new CosString("Patrik Svensson");
// Save the document
document.Save(
File.OpenWrite("/Users/patrik/output.pdf"),
CosCompression.Smallest);
Building
We're using Cake as a dotnet tool for building. So make sure that you've restored Cake by running the following in the repository root:
> dotnet tool restore
After that, running the build is as easy as writing:
> dotnet cake
Related Skills
node-connect
342.5kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
85.3kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
342.5kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
342.5kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
