signintech / gopdf

A simple library for generating PDF written in Go lang

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

(Question): How to image bytes to pdf?

rushkii opened this issue · comments

Hello, I want to add image into PDF per page but using bytes method like img2pdf python did. I want to download from an image URL and get the raw bytes and that bytes convert into PDF, I don't want to download and create a file then convert it into PDF. How to use it?

Hey, you can try one of the attempts the same way I did in #214. In your scenario, I'd assume creating an actual Image instance might seem the appropriate way to go in case you don't use transparent files.