B2024-021
This commit is contained in:
parent
6e37911462
commit
72eaac478f
@ -701,22 +701,24 @@ namespace Volian.Print.Library
|
|||||||
{
|
{
|
||||||
if (File.Exists(outputFileName))
|
if (File.Exists(outputFileName))
|
||||||
{
|
{
|
||||||
String tmpExt = System.IO.Path.GetExtension(outputFileName);
|
if (!BaselineTesting)
|
||||||
String tmpPTH = System.IO.Path.GetDirectoryName(outputFileName);
|
|
||||||
String tmpFN = System.IO.Path.GetFileName(outputFileName);
|
|
||||||
String tmpFNNoExt = System.IO.Path.GetFileNameWithoutExtension(outputFileName);
|
|
||||||
|
|
||||||
var files = new HashSet<string>(Directory.GetFiles(tmpPTH, "*.pdf"));
|
|
||||||
//string baseName = Path.Combine(scpath, "Screenshot_");
|
|
||||||
string filename;
|
|
||||||
int i = 0;
|
|
||||||
do
|
|
||||||
{
|
{
|
||||||
filename = tmpPTH + @"\" + tmpFNNoExt + "_" + ++i + ".pdf";
|
String tmpExt = System.IO.Path.GetExtension(outputFileName);
|
||||||
} while (files.Contains(filename));
|
String tmpPTH = System.IO.Path.GetDirectoryName(outputFileName);
|
||||||
|
String tmpFN = System.IO.Path.GetFileName(outputFileName);
|
||||||
|
String tmpFNNoExt = System.IO.Path.GetFileNameWithoutExtension(outputFileName);
|
||||||
|
|
||||||
outputFileName = filename;
|
var files = new HashSet<string>(Directory.GetFiles(tmpPTH, "*.pdf"));
|
||||||
|
//string baseName = Path.Combine(scpath, "Screenshot_");
|
||||||
|
string filename;
|
||||||
|
int i = 0;
|
||||||
|
do
|
||||||
|
{
|
||||||
|
filename = tmpPTH + @"\" + tmpFNNoExt + "_" + ++i + ".pdf";
|
||||||
|
} while (files.Contains(filename));
|
||||||
|
|
||||||
|
outputFileName = filename;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
writer = PdfWriter.GetInstance(document, new FileStream(outputFileName, FileMode.Create));
|
writer = PdfWriter.GetInstance(document, new FileStream(outputFileName, FileMode.Create));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user