Create PDF with picture

Get technical support of Document .Net in C# and VB.Net
rafanunes
Posts: 2
Joined: Tue Jan 17, 2023 9:57 pm
Contact:

Create PDF with picture

Post by rafanunes »

Hello, I am using sautinsoft to create a PDF with pictures, I am using the Picture class, and although it works fine on windows, on ubuntu the pdf is generated without the images, I already made sure that the path exists, but the image does not load in the generated file, instead, a blank content is inserted. Here is my code:

Code: Select all

private void InserirImagemNoPdf(DocumentCore documentCore, Section section, string valor, CharacterFormat format)
	{
		string caminhoImagem = _caminhoDocs + valor; //image path
		if (System.IO.File.Exists(caminhoImagem))
		{
			Picture pict = new(documentCore, _resultPath + valor);
			section.Content.End.Insert(pict.Content);
		}
	}
Any help would be great, thak you.
rafanunes
Posts: 2
Joined: Tue Jan 17, 2023 9:57 pm
Contact:

Re: Create PDF with picture

Post by rafanunes »

SOLVED.

All I had to do was install the gdi plus lib on my Ubuntu machine and it worked.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest