Pipo01 Posted June 22, 2014 Report Share Posted June 22, 2014 boas 馃檪 gostava de saber se alguem me podia dar ajudas e ideias e exemplos de codigo para personlizar o meu pdf sff aqui esta um foto de como esta ele agora http://www.4shared.com/photo/CSpspVXQba/1__6_.html aqui esta o codigo que desenvolvi FileStream tix = new FileStream(@".\\Relat贸rio.pdf", FileMode.Create); Document documento = new Document(PageSize.A4, 25, 25, 30, 30); PdfWriter escrever = PdfWriter.GetInstance(documento, tix); documento.Open(); PdfPTable tabela = new PdfPTable(dataGridView1.Columns.Count); //adiciona cabe莽alhos do datagridview para a tabela for (int j = 0; j < dataGridView1.Columns.Count; j++) { tabela.AddCell(new Phrase(dataGridView1.Columns[j].HeaderText)); } //define a primeira linha como cabe莽alho tabela.HeaderRows = 1; //adiciona as linhas atuais do datagridview para a tabela for (int i = 0; i < dataGridView1.Rows.Count; i++) { for (int k = 0; k < dataGridView1.Columns.Count; k++) { if (dataGridView1[k, i].Value != null) { tabela.AddCell(new Phrase(dataGridView1[k, i].Value.ToString())); } } } documento.Add(tabela); System.Diagnostics.Process.Start(@".\\Relat贸rio.pdf"); documento.Close(); Link to comment Share on other sites More sharing options...
Pipo01 Posted June 22, 2014 Author Report Share Posted June 22, 2014 algu茅m? Link to comment Share on other sites More sharing options...
nelsonr Posted June 22, 2014 Report Share Posted June 22, 2014 Tens de ter calma. Colocaste o topico e nem passadas 3 horas ja est谩s a fazer bump Link to comment Share on other sites More sharing options...
Pipo01 Posted June 22, 2014 Author Report Share Posted June 22, 2014 tens razao...mas quero ter ideias o mais depressa para por a mao a massa 馃檪 Link to comment Share on other sites More sharing options...
Pipo01 Posted June 22, 2014 Author Report Share Posted June 22, 2014 alguem me explica como posso fazer um cabe莽alho com um texto e uma imagem e uma label da data e hora? e um rodape para numerar uma pagina? Link to comment Share on other sites More sharing options...
Pipo01 Posted June 23, 2014 Author Report Share Posted June 23, 2014 alguem? 馃槥 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now