Skip to content
Discussion options

You must be logged in to vote

Alright, i updated this module, and it now supports the official Typst Docker image besides other improvement. Make sure you are using go-typst 0.7.0; then you can just run this to check if everything works correctly:

package main

import (
	"bytes"
	"log"
	"os"

	"github.com/Dadido3/go-typst"
)

func main() {
	markup := bytes.NewBufferString(`= Hello world`)

	// Compile the prepared markup with Typst and write the result it into `output.pdf`.
	f, err := os.Create("output.pdf")
	if err != nil {
		log.Panicf("Failed to create output file: %v.", err)
	}
	defer f.Close()

	typstCaller := typst.Docker{}
	if err := typstCaller.Compile(markup, f, nil); err != nil {
		log.Panic("failed to compi…

Replies: 4 comments 3 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by 1MisterT
Comment options

You must be logged in to vote
3 replies
@1MisterT
Comment options

@Dadido3
Comment options

@1MisterT
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
enhancement New feature or request
2 participants