Code Monkey home page Code Monkey logo

lucas-gaitzsch / pdf-turtle Goto Github PK

View Code? Open in Web Editor NEW
48.0 48.0 5.0 1.03 MB

A painless HTML to PDF rendering service. Generate PDF reports and documents from HTML templates or raw HTML.

Home Page: https://pdfturtle.gaitzsch.dev

License: GNU Affero General Public License v3.0

Go 97.63% CSS 1.71% Dockerfile 0.66%
container docker go golang html html-template html-to-pdf html-to-pdf-api html-to-pdf-converter html5 microservice pdf pdf-document pdf-documents pdf-generation pdf-generator pdf-lib pdf-library pdf-turtle service

pdf-turtle's People

Contributors

lucas-gaitzsch avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

pdf-turtle's Issues

CSS font url inlining

Hi ๐Ÿ‘‹

I've found this tool incredibly helpful in getting PDF templates up and running with minimal set up, thanks so much.

One small feature request, I'm not able to render the footer with a custom font. I can use this in the body very easily, by including the font file in the assets, and then using the following css inside the header.

@font-face {
	font-family: "gill";
	src: url("assets/gill-regular.TTF") format("truetype");
	font-weight: normal;
	font-style: normal;
}

* {
	font-family: "gill", sans-serif;
}

Unfortunately, this font is just not found when rendering the footer. I've tried in both the hosted playground (https://pdfturtle.gaitzsch.dev/) and running in a docker container on my local machine.

Originally posted by @whytekiwi in #2 (comment)

rendering issue

@lucas-gaitzsch take a look at this html page in print preview getting every page,
but in pdf-turtle playground only getting first page.
if i delete height & width then getting all the pages but the header is not repeating in every page

@media print { 
  body{
    counter-reset: page;
    margin: 0 auto;
    width: 210mm;
    height: 297mm;
  }
}

Docker error when starting on Windows 11 WSL2

We tried to start the container on Windows 11 with WSL2 and the container failed with the following error:

2024-04-25 16:42:34 goroutine 1 [running]:
2024-04-25 16:42:34 github.com/gofiber/fiber/v2/middleware/cors.New({0xc0000bdc20?, 0x1?, 0x2?})
2024-04-25 16:42:34 /go/pkg/mod/github.com/gofiber/fiber/[email protected]/middleware/cors/cors.go:113 +0x8a8
2024-04-25 16:42:34 github.com/lucas-gaitzsch/pdf-turtle/server.(*Server).Serve(0xc00019c608, {0xf080a8, 0xc0002bfa40})
2024-04-25 16:42:34 /build/server/server.go:52 +0x1af
2024-04-25 16:42:34 main.main()
2024-04-25 16:42:34 /build/main.go:62 +0xca
2024-04-25 16:43:34 panic: [CORS] Insecure setup, 'AllowCredentials' is set to true, and 'AllowOrigins' is set to a wildcard.

The docker run command was the default one from the website

This is too good!

Hello!

We started testing this in our environment and just wanted to say, what a breath of fresh air!

This thing has been flying and it's easy to use, has great documentation and superb performance.

Keep up the good work man ๐Ÿ‘

Support for Apple Silicon

I tried to start the container today on my M2 Mac and it failed with some weird go errors. I assume that it is not compiled for Apple Silicon, would be nice to have that!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.