unidoc / unipdf-examples

Examples for creating and processing PDF files with UniPDF https://github.com/unidoc/unipdf
https://unidoc.io
268 stars 100 forks source link

Generate a page with only image #196

Closed victorfernandesraton closed 2 years ago

victorfernandesraton commented 2 years ago

How to draw image with all size in page?

sampila commented 2 years ago

How to draw image with all size in page?

Hi @victorfernandesraton, Could you explain more about your use case?

Best regards, Alip

victorfernandesraton commented 2 years ago

I need create pdf from images avaliable in s3 static and dowload the images in local is very unsafe because this behavior depends of filesystem and i need manage local temp folders

I suposed wich is a way to using bytes buffering for add image insteread to find on filesystem

sampila commented 2 years ago

Hi @victorfernandesraton,

Yes, you can add the image to pdf using bytes with creator.NewImageFromData(bytes []byte). More detail about it https://apidocs.unidoc.io/unipdf/v3.37.0/github.com/unidoc/unipdf/v3/creator/#Creator.NewImageFromData Hope this help.

Best regards, Alip

victorfernandesraton commented 2 years ago

sure i'll try this. Thanks

sampila commented 2 years ago

You are welcome. We closing this issue, you can re-open this issue if you have an issue regarding this.