PDFsharp & MigraDoc Foundation
https://forum.pdfsharp.net/

How to iterate through collection of pdf files in a dir
https://forum.pdfsharp.net/viewtopic.php?f=2&t=1416
Page 1 of 1

Author:  gnihar [ Wed Nov 10, 2010 10:42 am ]
Post subject:  How to iterate through collection of pdf files in a dir

How goes the c# syntax for foreach iteration through series of .pdf files in a directory?

ie. foreach (PdfSharp.Pdf.PdfDocument doc1 in di2.GetFiles())

does not work. Thanks!

Author:  Thomas Hoevel [ Wed Nov 10, 2010 12:20 pm ]
Post subject:  Re: How to iterate through collection of pdf files in a dir

To open a file you use code like
Code:
PdfDocument inputDocument1 = PdfReader.Open(filename1, PdfDocumentOpenMode.Import);


See also here:
http://www.pdfsharp.net/wiki/PDFsharpSamples.ashx
http://www.pdfsharp.net/wiki/CombineDoc ... ample.ashx

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/