Saving PDF file slow after 10,000 pages in iTextSharpSlow-running File parserStreamline code for checking if...

Explain the objections to these measures against human trafficking

Can a dragon be stuck looking like a human?

A minimum of two personnel "are" or "is"?

A starship is travelling at 0.9c and collides with a small rock. Will it leave a clean hole through, or will more happen?

Compress command output by piping to bzip2

Does fast page mode apply to ROM?

How to acknowledge an embarrassing job interview, now that I work directly with the interviewer?

Can an insurance company drop you after receiving a bill and refusing to pay?

Difference between thick vs thin front suspension?

Groups acting on trees

Is there any differences between "Gucken" and "Schauen"?

Can I become debt free or should I file for bankruptcy? How do I manage my debt and finances?

It took me a lot of time to make this, pls like. (YouTube Comments #1)

Lick explanation

How to prevent users from executing commands through browser URL

Strange Sign on Lab Door

What's a good word to describe a public place that looks like it wouldn't be rough?

How do you funnel food off a cutting board?

Is a debit card dangerous for an account with low balance and no overdraft protection?

How would a Dictatorship make a country more successful?

Why did this image turn out darker?

Would these multi-classing house rules cause unintended problems?

Contest math problem about crossing out numbers in the table

Does Improved Divine Strike trigger when a paladin makes an unarmed strike?



Saving PDF file slow after 10,000 pages in iTextSharp


Slow-running File parserStreamline code for checking if a diretory exists and saving a file.Command-line program for applying several operations on a PDF fileCount PDF pages in constructorPDF Stamper Method to Add Field and Script to PDF FileAdd Field To PDF with Options for Multiple PagesClassifying image by file extension within a PDF creatorUnloading external DLL library after 10 seconds in order to release file locksExtract images from a PDF or ZIP file













-1












$begingroup$


I am trying to build a application that creates PDF and saves in local file. I am using this through iTextSharp in C#. I need to save at least 1 lac (100,000) PDF files.



After 10,000 files the saving gets slow. The first 10k gets saved in 2 mins, rest of the files take almost 5 hours.



I believe the issue is usage of memory. But I could not find a solution to fix that issue. I have posted the source code.



private void CreatePDF11()
{
Queue<String> QTempFileNames;
QTempFileNames = new Queue<string>();
string fileName = string.Empty;

DateTime fileCreationDatetime = DateTime.Now;

fileName = @"D:StatementMassPrinttesystw14j414435.PDF";

string DestinationDirectory = @"D:StatementMassPrint";

string StrTempFilePath = String.Empty;

string pdfPath = fileName;

int TempPdfFileName = 1;
if (DestinationDirectory != string.Empty)
{
StrTempFilePath = DestinationDirectory + "temp" + "(" + DateTime.Now.ToFileTime() + ")";
}

if (!(Directory.Exists(StrTempFilePath)))
{
Directory.CreateDirectory(StrTempFilePath);
}
string reportFileName = StrTempFilePath + "\" + TempPdfFileName.ToString() + ".Pdf";

for (int f = 0; f < 100000; f++)
{
reportFileName = StrTempFilePath + "\" + TempPdfFileName.ToString() + ".Pdf";

using (FileStream msReport = new FileStream(reportFileName, FileMode.Create))
{
//step 1
using (Document pdfDoc = new Document(PageSize.A5.Rotate(), 10f, 10f, 200f,40f))
{
try
{
// step 2
PdfWriter pdfWriter = PdfWriter.GetInstance(pdfDoc, msReport);
pdfWriter.PageEvent = new EpisodePageHeaderAndFooter();

//open the stream
pdfDoc.Open();

DataTable dtEpisodeWise = new DataTable();
dtEpisodeWise.Columns.Add("INVOICE_NO");
dtEpisodeWise.Columns.Add("INVOICE_DATE");
dtEpisodeWise.Columns.Add("CODE");
dtEpisodeWise.Columns.Add("SERVICE_DESCRIPTION");
dtEpisodeWise.Columns.Add("QTY",typeof(decimal));
dtEpisodeWise.Columns.Add("UNIT_PRICE",typeof(decimal));
dtEpisodeWise.Columns.Add("GROSS",typeof(decimal));
dtEpisodeWise.Columns.Add("DISCOUNT",typeof(decimal));
dtEpisodeWise.Columns.Add("NET",typeof(decimal));
dtEpisodeWise.Columns.Add("DEDUCTION",typeof(decimal));
dtEpisodeWise.Columns.Add("NET_PAYABLE_WITHOUT_VAT",typeof(decimal));
dtEpisodeWise.Columns.Add("VAT",typeof(decimal));
dtEpisodeWise.Columns.Add("NET_PAYABLE_WITH_VAT",typeof(decimal));

PdfPTable table = new PdfPTable(dtEpisodeWise.Columns.Count);
table.WidthPercentage = 100;

Font fontH1 = new Font(Font.FontFamily.HELVETICA, 6, Font.BOLDITALIC);
for (int k = 0; k < dtEpisodeWise.Columns.Count; k++)
{

string str = System.Globalization.CultureInfo.CurrentCulture.TextInfo.ToTitleCase(dtEpisodeWise.Columns[k].ColumnName.Replace("_", " ").ToLower()); ;
PdfPCell cell = new PdfPCell(new Phrase(str,fontH1));
cell.HorizontalAlignment = PdfPCell.ALIGN_CENTER;
cell.VerticalAlignment = PdfPCell.ALIGN_CENTER;
// cell.BackgroundColor = new iTextSharp.text.BaseColor(51, 102, 102);

table.AddCell(cell);
}

// for (int i = 0; i < 1000; i++)
// {
dtEpisodeWise.Rows.Add("CR100005", "25-05-1989", "CPT004", "SERVICE005", 1, 10, 100, 10, 90, 45, 45, 5, 50);
dtEpisodeWise.Rows.Add("CR100006", "25-05-1992", "CPT00555", "SERVICE105",6, 60, 600, 60, 450, 45, 45, 5, 500);

// }

Font fontH2 = new Font(Font.FontFamily.HELVETICA, 6, Font.ITALIC);

for (int i = 0; i < dtEpisodeWise.Rows.Count; i++)
{
for (int j = 0; j < dtEpisodeWise.Columns.Count; j++)
{

PdfPCell cell = new PdfPCell(new Phrase(dtEpisodeWise.Rows[i][j].ToString(),fontH2));

//Align the cell in the center

if (dtEpisodeWise.Columns[j].DataType == typeof(decimal))
{
cell.HorizontalAlignment = PdfPCell.ALIGN_RIGHT;
cell.VerticalAlignment = PdfPCell.ALIGN_CENTER;
}
else
{
cell.HorizontalAlignment = PdfPCell.ALIGN_LEFT;
cell.VerticalAlignment = PdfPCell.ALIGN_CENTER;
}

table.HeaderRows = 1;

table.AddCell(cell);
}
}
pdfDoc.Add(table);

pdfDoc.Close();
TempPdfFileName++;



}

catch (Exception ex)
{
//handle exception
}

finally
{


}

}

}
}


}
```









share|improve this question







New contributor




Jeevan is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.







$endgroup$








  • 1




    $begingroup$
    Oh, dammit, I hadn't seen that you posted it here now, I already answered it on SO (despite mentioning that you should put it here ^_^)
    $endgroup$
    – Icepickle
    yesterday








  • 5




    $begingroup$
    Well, why don't you just use a profiler and find out what is eating up the memory? Your question is also unprecise because one time you are speaking of pages then about files... which one is it?
    $endgroup$
    – t3chb0t
    yesterday


















-1












$begingroup$


I am trying to build a application that creates PDF and saves in local file. I am using this through iTextSharp in C#. I need to save at least 1 lac (100,000) PDF files.



After 10,000 files the saving gets slow. The first 10k gets saved in 2 mins, rest of the files take almost 5 hours.



I believe the issue is usage of memory. But I could not find a solution to fix that issue. I have posted the source code.



private void CreatePDF11()
{
Queue<String> QTempFileNames;
QTempFileNames = new Queue<string>();
string fileName = string.Empty;

DateTime fileCreationDatetime = DateTime.Now;

fileName = @"D:StatementMassPrinttesystw14j414435.PDF";

string DestinationDirectory = @"D:StatementMassPrint";

string StrTempFilePath = String.Empty;

string pdfPath = fileName;

int TempPdfFileName = 1;
if (DestinationDirectory != string.Empty)
{
StrTempFilePath = DestinationDirectory + "temp" + "(" + DateTime.Now.ToFileTime() + ")";
}

if (!(Directory.Exists(StrTempFilePath)))
{
Directory.CreateDirectory(StrTempFilePath);
}
string reportFileName = StrTempFilePath + "\" + TempPdfFileName.ToString() + ".Pdf";

for (int f = 0; f < 100000; f++)
{
reportFileName = StrTempFilePath + "\" + TempPdfFileName.ToString() + ".Pdf";

using (FileStream msReport = new FileStream(reportFileName, FileMode.Create))
{
//step 1
using (Document pdfDoc = new Document(PageSize.A5.Rotate(), 10f, 10f, 200f,40f))
{
try
{
// step 2
PdfWriter pdfWriter = PdfWriter.GetInstance(pdfDoc, msReport);
pdfWriter.PageEvent = new EpisodePageHeaderAndFooter();

//open the stream
pdfDoc.Open();

DataTable dtEpisodeWise = new DataTable();
dtEpisodeWise.Columns.Add("INVOICE_NO");
dtEpisodeWise.Columns.Add("INVOICE_DATE");
dtEpisodeWise.Columns.Add("CODE");
dtEpisodeWise.Columns.Add("SERVICE_DESCRIPTION");
dtEpisodeWise.Columns.Add("QTY",typeof(decimal));
dtEpisodeWise.Columns.Add("UNIT_PRICE",typeof(decimal));
dtEpisodeWise.Columns.Add("GROSS",typeof(decimal));
dtEpisodeWise.Columns.Add("DISCOUNT",typeof(decimal));
dtEpisodeWise.Columns.Add("NET",typeof(decimal));
dtEpisodeWise.Columns.Add("DEDUCTION",typeof(decimal));
dtEpisodeWise.Columns.Add("NET_PAYABLE_WITHOUT_VAT",typeof(decimal));
dtEpisodeWise.Columns.Add("VAT",typeof(decimal));
dtEpisodeWise.Columns.Add("NET_PAYABLE_WITH_VAT",typeof(decimal));

PdfPTable table = new PdfPTable(dtEpisodeWise.Columns.Count);
table.WidthPercentage = 100;

Font fontH1 = new Font(Font.FontFamily.HELVETICA, 6, Font.BOLDITALIC);
for (int k = 0; k < dtEpisodeWise.Columns.Count; k++)
{

string str = System.Globalization.CultureInfo.CurrentCulture.TextInfo.ToTitleCase(dtEpisodeWise.Columns[k].ColumnName.Replace("_", " ").ToLower()); ;
PdfPCell cell = new PdfPCell(new Phrase(str,fontH1));
cell.HorizontalAlignment = PdfPCell.ALIGN_CENTER;
cell.VerticalAlignment = PdfPCell.ALIGN_CENTER;
// cell.BackgroundColor = new iTextSharp.text.BaseColor(51, 102, 102);

table.AddCell(cell);
}

// for (int i = 0; i < 1000; i++)
// {
dtEpisodeWise.Rows.Add("CR100005", "25-05-1989", "CPT004", "SERVICE005", 1, 10, 100, 10, 90, 45, 45, 5, 50);
dtEpisodeWise.Rows.Add("CR100006", "25-05-1992", "CPT00555", "SERVICE105",6, 60, 600, 60, 450, 45, 45, 5, 500);

// }

Font fontH2 = new Font(Font.FontFamily.HELVETICA, 6, Font.ITALIC);

for (int i = 0; i < dtEpisodeWise.Rows.Count; i++)
{
for (int j = 0; j < dtEpisodeWise.Columns.Count; j++)
{

PdfPCell cell = new PdfPCell(new Phrase(dtEpisodeWise.Rows[i][j].ToString(),fontH2));

//Align the cell in the center

if (dtEpisodeWise.Columns[j].DataType == typeof(decimal))
{
cell.HorizontalAlignment = PdfPCell.ALIGN_RIGHT;
cell.VerticalAlignment = PdfPCell.ALIGN_CENTER;
}
else
{
cell.HorizontalAlignment = PdfPCell.ALIGN_LEFT;
cell.VerticalAlignment = PdfPCell.ALIGN_CENTER;
}

table.HeaderRows = 1;

table.AddCell(cell);
}
}
pdfDoc.Add(table);

pdfDoc.Close();
TempPdfFileName++;



}

catch (Exception ex)
{
//handle exception
}

finally
{


}

}

}
}


}
```









share|improve this question







New contributor




Jeevan is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.







$endgroup$








  • 1




    $begingroup$
    Oh, dammit, I hadn't seen that you posted it here now, I already answered it on SO (despite mentioning that you should put it here ^_^)
    $endgroup$
    – Icepickle
    yesterday








  • 5




    $begingroup$
    Well, why don't you just use a profiler and find out what is eating up the memory? Your question is also unprecise because one time you are speaking of pages then about files... which one is it?
    $endgroup$
    – t3chb0t
    yesterday
















-1












-1








-1





$begingroup$


I am trying to build a application that creates PDF and saves in local file. I am using this through iTextSharp in C#. I need to save at least 1 lac (100,000) PDF files.



After 10,000 files the saving gets slow. The first 10k gets saved in 2 mins, rest of the files take almost 5 hours.



I believe the issue is usage of memory. But I could not find a solution to fix that issue. I have posted the source code.



private void CreatePDF11()
{
Queue<String> QTempFileNames;
QTempFileNames = new Queue<string>();
string fileName = string.Empty;

DateTime fileCreationDatetime = DateTime.Now;

fileName = @"D:StatementMassPrinttesystw14j414435.PDF";

string DestinationDirectory = @"D:StatementMassPrint";

string StrTempFilePath = String.Empty;

string pdfPath = fileName;

int TempPdfFileName = 1;
if (DestinationDirectory != string.Empty)
{
StrTempFilePath = DestinationDirectory + "temp" + "(" + DateTime.Now.ToFileTime() + ")";
}

if (!(Directory.Exists(StrTempFilePath)))
{
Directory.CreateDirectory(StrTempFilePath);
}
string reportFileName = StrTempFilePath + "\" + TempPdfFileName.ToString() + ".Pdf";

for (int f = 0; f < 100000; f++)
{
reportFileName = StrTempFilePath + "\" + TempPdfFileName.ToString() + ".Pdf";

using (FileStream msReport = new FileStream(reportFileName, FileMode.Create))
{
//step 1
using (Document pdfDoc = new Document(PageSize.A5.Rotate(), 10f, 10f, 200f,40f))
{
try
{
// step 2
PdfWriter pdfWriter = PdfWriter.GetInstance(pdfDoc, msReport);
pdfWriter.PageEvent = new EpisodePageHeaderAndFooter();

//open the stream
pdfDoc.Open();

DataTable dtEpisodeWise = new DataTable();
dtEpisodeWise.Columns.Add("INVOICE_NO");
dtEpisodeWise.Columns.Add("INVOICE_DATE");
dtEpisodeWise.Columns.Add("CODE");
dtEpisodeWise.Columns.Add("SERVICE_DESCRIPTION");
dtEpisodeWise.Columns.Add("QTY",typeof(decimal));
dtEpisodeWise.Columns.Add("UNIT_PRICE",typeof(decimal));
dtEpisodeWise.Columns.Add("GROSS",typeof(decimal));
dtEpisodeWise.Columns.Add("DISCOUNT",typeof(decimal));
dtEpisodeWise.Columns.Add("NET",typeof(decimal));
dtEpisodeWise.Columns.Add("DEDUCTION",typeof(decimal));
dtEpisodeWise.Columns.Add("NET_PAYABLE_WITHOUT_VAT",typeof(decimal));
dtEpisodeWise.Columns.Add("VAT",typeof(decimal));
dtEpisodeWise.Columns.Add("NET_PAYABLE_WITH_VAT",typeof(decimal));

PdfPTable table = new PdfPTable(dtEpisodeWise.Columns.Count);
table.WidthPercentage = 100;

Font fontH1 = new Font(Font.FontFamily.HELVETICA, 6, Font.BOLDITALIC);
for (int k = 0; k < dtEpisodeWise.Columns.Count; k++)
{

string str = System.Globalization.CultureInfo.CurrentCulture.TextInfo.ToTitleCase(dtEpisodeWise.Columns[k].ColumnName.Replace("_", " ").ToLower()); ;
PdfPCell cell = new PdfPCell(new Phrase(str,fontH1));
cell.HorizontalAlignment = PdfPCell.ALIGN_CENTER;
cell.VerticalAlignment = PdfPCell.ALIGN_CENTER;
// cell.BackgroundColor = new iTextSharp.text.BaseColor(51, 102, 102);

table.AddCell(cell);
}

// for (int i = 0; i < 1000; i++)
// {
dtEpisodeWise.Rows.Add("CR100005", "25-05-1989", "CPT004", "SERVICE005", 1, 10, 100, 10, 90, 45, 45, 5, 50);
dtEpisodeWise.Rows.Add("CR100006", "25-05-1992", "CPT00555", "SERVICE105",6, 60, 600, 60, 450, 45, 45, 5, 500);

// }

Font fontH2 = new Font(Font.FontFamily.HELVETICA, 6, Font.ITALIC);

for (int i = 0; i < dtEpisodeWise.Rows.Count; i++)
{
for (int j = 0; j < dtEpisodeWise.Columns.Count; j++)
{

PdfPCell cell = new PdfPCell(new Phrase(dtEpisodeWise.Rows[i][j].ToString(),fontH2));

//Align the cell in the center

if (dtEpisodeWise.Columns[j].DataType == typeof(decimal))
{
cell.HorizontalAlignment = PdfPCell.ALIGN_RIGHT;
cell.VerticalAlignment = PdfPCell.ALIGN_CENTER;
}
else
{
cell.HorizontalAlignment = PdfPCell.ALIGN_LEFT;
cell.VerticalAlignment = PdfPCell.ALIGN_CENTER;
}

table.HeaderRows = 1;

table.AddCell(cell);
}
}
pdfDoc.Add(table);

pdfDoc.Close();
TempPdfFileName++;



}

catch (Exception ex)
{
//handle exception
}

finally
{


}

}

}
}


}
```









share|improve this question







New contributor




Jeevan is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.







$endgroup$




I am trying to build a application that creates PDF and saves in local file. I am using this through iTextSharp in C#. I need to save at least 1 lac (100,000) PDF files.



After 10,000 files the saving gets slow. The first 10k gets saved in 2 mins, rest of the files take almost 5 hours.



I believe the issue is usage of memory. But I could not find a solution to fix that issue. I have posted the source code.



private void CreatePDF11()
{
Queue<String> QTempFileNames;
QTempFileNames = new Queue<string>();
string fileName = string.Empty;

DateTime fileCreationDatetime = DateTime.Now;

fileName = @"D:StatementMassPrinttesystw14j414435.PDF";

string DestinationDirectory = @"D:StatementMassPrint";

string StrTempFilePath = String.Empty;

string pdfPath = fileName;

int TempPdfFileName = 1;
if (DestinationDirectory != string.Empty)
{
StrTempFilePath = DestinationDirectory + "temp" + "(" + DateTime.Now.ToFileTime() + ")";
}

if (!(Directory.Exists(StrTempFilePath)))
{
Directory.CreateDirectory(StrTempFilePath);
}
string reportFileName = StrTempFilePath + "\" + TempPdfFileName.ToString() + ".Pdf";

for (int f = 0; f < 100000; f++)
{
reportFileName = StrTempFilePath + "\" + TempPdfFileName.ToString() + ".Pdf";

using (FileStream msReport = new FileStream(reportFileName, FileMode.Create))
{
//step 1
using (Document pdfDoc = new Document(PageSize.A5.Rotate(), 10f, 10f, 200f,40f))
{
try
{
// step 2
PdfWriter pdfWriter = PdfWriter.GetInstance(pdfDoc, msReport);
pdfWriter.PageEvent = new EpisodePageHeaderAndFooter();

//open the stream
pdfDoc.Open();

DataTable dtEpisodeWise = new DataTable();
dtEpisodeWise.Columns.Add("INVOICE_NO");
dtEpisodeWise.Columns.Add("INVOICE_DATE");
dtEpisodeWise.Columns.Add("CODE");
dtEpisodeWise.Columns.Add("SERVICE_DESCRIPTION");
dtEpisodeWise.Columns.Add("QTY",typeof(decimal));
dtEpisodeWise.Columns.Add("UNIT_PRICE",typeof(decimal));
dtEpisodeWise.Columns.Add("GROSS",typeof(decimal));
dtEpisodeWise.Columns.Add("DISCOUNT",typeof(decimal));
dtEpisodeWise.Columns.Add("NET",typeof(decimal));
dtEpisodeWise.Columns.Add("DEDUCTION",typeof(decimal));
dtEpisodeWise.Columns.Add("NET_PAYABLE_WITHOUT_VAT",typeof(decimal));
dtEpisodeWise.Columns.Add("VAT",typeof(decimal));
dtEpisodeWise.Columns.Add("NET_PAYABLE_WITH_VAT",typeof(decimal));

PdfPTable table = new PdfPTable(dtEpisodeWise.Columns.Count);
table.WidthPercentage = 100;

Font fontH1 = new Font(Font.FontFamily.HELVETICA, 6, Font.BOLDITALIC);
for (int k = 0; k < dtEpisodeWise.Columns.Count; k++)
{

string str = System.Globalization.CultureInfo.CurrentCulture.TextInfo.ToTitleCase(dtEpisodeWise.Columns[k].ColumnName.Replace("_", " ").ToLower()); ;
PdfPCell cell = new PdfPCell(new Phrase(str,fontH1));
cell.HorizontalAlignment = PdfPCell.ALIGN_CENTER;
cell.VerticalAlignment = PdfPCell.ALIGN_CENTER;
// cell.BackgroundColor = new iTextSharp.text.BaseColor(51, 102, 102);

table.AddCell(cell);
}

// for (int i = 0; i < 1000; i++)
// {
dtEpisodeWise.Rows.Add("CR100005", "25-05-1989", "CPT004", "SERVICE005", 1, 10, 100, 10, 90, 45, 45, 5, 50);
dtEpisodeWise.Rows.Add("CR100006", "25-05-1992", "CPT00555", "SERVICE105",6, 60, 600, 60, 450, 45, 45, 5, 500);

// }

Font fontH2 = new Font(Font.FontFamily.HELVETICA, 6, Font.ITALIC);

for (int i = 0; i < dtEpisodeWise.Rows.Count; i++)
{
for (int j = 0; j < dtEpisodeWise.Columns.Count; j++)
{

PdfPCell cell = new PdfPCell(new Phrase(dtEpisodeWise.Rows[i][j].ToString(),fontH2));

//Align the cell in the center

if (dtEpisodeWise.Columns[j].DataType == typeof(decimal))
{
cell.HorizontalAlignment = PdfPCell.ALIGN_RIGHT;
cell.VerticalAlignment = PdfPCell.ALIGN_CENTER;
}
else
{
cell.HorizontalAlignment = PdfPCell.ALIGN_LEFT;
cell.VerticalAlignment = PdfPCell.ALIGN_CENTER;
}

table.HeaderRows = 1;

table.AddCell(cell);
}
}
pdfDoc.Add(table);

pdfDoc.Close();
TempPdfFileName++;



}

catch (Exception ex)
{
//handle exception
}

finally
{


}

}

}
}


}
```






c# wpf






share|improve this question







New contributor




Jeevan is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











share|improve this question







New contributor




Jeevan is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









share|improve this question




share|improve this question






New contributor




Jeevan is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









asked yesterday









JeevanJeevan

1




1




New contributor




Jeevan is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





New contributor





Jeevan is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






Jeevan is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.








  • 1




    $begingroup$
    Oh, dammit, I hadn't seen that you posted it here now, I already answered it on SO (despite mentioning that you should put it here ^_^)
    $endgroup$
    – Icepickle
    yesterday








  • 5




    $begingroup$
    Well, why don't you just use a profiler and find out what is eating up the memory? Your question is also unprecise because one time you are speaking of pages then about files... which one is it?
    $endgroup$
    – t3chb0t
    yesterday
















  • 1




    $begingroup$
    Oh, dammit, I hadn't seen that you posted it here now, I already answered it on SO (despite mentioning that you should put it here ^_^)
    $endgroup$
    – Icepickle
    yesterday








  • 5




    $begingroup$
    Well, why don't you just use a profiler and find out what is eating up the memory? Your question is also unprecise because one time you are speaking of pages then about files... which one is it?
    $endgroup$
    – t3chb0t
    yesterday










1




1




$begingroup$
Oh, dammit, I hadn't seen that you posted it here now, I already answered it on SO (despite mentioning that you should put it here ^_^)
$endgroup$
– Icepickle
yesterday






$begingroup$
Oh, dammit, I hadn't seen that you posted it here now, I already answered it on SO (despite mentioning that you should put it here ^_^)
$endgroup$
– Icepickle
yesterday






5




5




$begingroup$
Well, why don't you just use a profiler and find out what is eating up the memory? Your question is also unprecise because one time you are speaking of pages then about files... which one is it?
$endgroup$
– t3chb0t
yesterday






$begingroup$
Well, why don't you just use a profiler and find out what is eating up the memory? Your question is also unprecise because one time you are speaking of pages then about files... which one is it?
$endgroup$
– t3chb0t
yesterday












0






active

oldest

votes











Your Answer





StackExchange.ifUsing("editor", function () {
return StackExchange.using("mathjaxEditing", function () {
StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix) {
StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["\$", "\$"]]);
});
});
}, "mathjax-editing");

StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "196"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});






Jeevan is a new contributor. Be nice, and check out our Code of Conduct.










draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fcodereview.stackexchange.com%2fquestions%2f214466%2fsaving-pdf-file-slow-after-10-000-pages-in-itextsharp%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes








Jeevan is a new contributor. Be nice, and check out our Code of Conduct.










draft saved

draft discarded


















Jeevan is a new contributor. Be nice, and check out our Code of Conduct.













Jeevan is a new contributor. Be nice, and check out our Code of Conduct.












Jeevan is a new contributor. Be nice, and check out our Code of Conduct.
















Thanks for contributing an answer to Code Review Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


Use MathJax to format equations. MathJax reference.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fcodereview.stackexchange.com%2fquestions%2f214466%2fsaving-pdf-file-slow-after-10-000-pages-in-itextsharp%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Fairchild Swearingen Metro Inhaltsverzeichnis Geschichte | Innenausstattung | Nutzung | Zwischenfälle...

Pilgersdorf Inhaltsverzeichnis Geografie | Geschichte | Bevölkerungsentwicklung | Politik | Kultur...

Marineschifffahrtleitung Inhaltsverzeichnis Geschichte | Heutige Organisation der NATO | Nationale und...