Мне нужно добавить изображение к каждой строке в моем PDF. На данный момент я получаю это:
Rectangle: 16x16 (rot: 0 degrees)Domain\administrator [Allow]
Rectangle: 16x16 (rot: 0 degrees)Domain\User1 [Allow]
Rectangle: 16x16 (rot: 0 degrees)Domain\User2 [Allow]
Мое приложение выполняет поиск в каталогах и отображает права пользователя на найденные папки.
Это сохраняет его в текстовый файл, где я затем красный из текстового файла и добавить в мой PDF
var image1 = iTextSharp.text.Image.GetInstance(Resources.user, System.Drawing.Imaging.ImageFormat.Png);
List<string> dirf = new List<string>();
try
{
foreach (string dirfo in Directory.GetDirectories(location))
{
foldersCounted++;
document.Add(new LineSeparator(0.5f, 100, null, 0, -5));
document.Add(new Paragraph(dirfo, font6));
string seperator = csvPermissions.Replace(", ", "\n" + image1);
document.Add(new Paragraph(seperator, font5));
document.Add(new Paragraph("\n"));
document.Add(new LineSeparator(0.5f, 100, null, 0, -5));
В этой строке string seperator = csvPermissions.Replace(", ", "\n" + image1);
Я добавил image1
и, как вы можете видеть, выводит Rectangle: 16x16 (rot: 0 degrees)
Я бы хотел, чтобы рядом с каждой строкой отображались права пользователя (это значок пользователя)
Просто интересно, возможно ли это, и если да, то как мне этого достичь?
Спасибо
EDIT
Вот что мне это дает сейчас:
`image`
text text text text text
text text text text text
text text text text text
Я бы хотел показать:
image text text text text
image text text text text
image text text text text