1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
$carga = [System.Reflection.Assembly]::LoadFrom("C:\Users\juan\itext\itextsharp.dll") $document = [iTextSharp.text.Document]::new() $stream = [IO.File]::OpenWrite("C:\Users\juan\itext\output.pdf") $writer = ([iTextSharp.text.pdf.PdfWriter]::GetInstance($document, $stream)) $document.Open() $dc = $writer.DirectContent 0..($document.PageSize.Height/10) | %{ $dc.MoveTo(0, $document.PageSize.Height-($_*10)) $dc.LineTo($document.PageSize.Width, $document.PageSize.Height-($_*10)) $dc.Stroke() } $document.Close() $stream.Close() |