0
How to insert a video into a generated pdf using the iTextSharp library?
I need the library because it also does file union and digital signature.
0
How to insert a video into a generated pdf using the iTextSharp library?
I need the library because it also does file union and digital signature.
3
Using iTextSharp, do it as follows:
//cria o documento
var doc = new Document();
//caminho do arquivo gerado
String outfile = "c:/documento.pdf";
//pega instância do objeto PdfWriter
PdfWriter writer=PdfWriter.GetInstance(doc, new FileStream(outfile, FileMode.Create));
//abre o documento para escrita
doc.Open();
//cria uma instância da classe PdfFileSpecification
PdfFileSpecification fs = PdfFileSpecification.FileEmbedded(writer, "c:/video.mpg", "video.mpg", null);
//criar e adiciona uma anotação de vídeo no documento
writer.AddAnnotation(PdfAnnotation.CreateScreen(writer, new Rectangle(200f, 700f, 400f, 800f), "Vídeo", fs,"video/mpeg", true));
//fecha o documento
doc.Close();
//visualiza o resultado
System.Diagnostics.Process.Start(outfile);
The following file formats are supported:
Browser other questions tagged c# pdf
You are not signed in. Login or sign up in order to post.