ceTe.DynamicPDF.Rasterizer.40.x86 2.0.0.28903
ceTe.DynamicPDF.40 8.0.0.40
I was able to find a solution.
If I use the Rasterizer Standalone, it does not include the Hidden layers.
Sample Code - This did work
{
string file = @"c:\\temp\\PDFwithhiddenlayers.pdf";
ceTe.DynamicPDF.Rasterizer.InputPdf miinpdf;
miinpdf = new InputPdf(file);
int pc = miinpdf.Pages.Count;
for (int i = 0; i < pc; i++)
{
PdfRasterizer rasterizer = new PdfRasterizer(miinpdf);
string xfile = System.IO.Path.GetFileNameWithoutExtension(file);
rasterizer.Pages[i].Draw("C:\\temp\\" + xfile + "_" + (i+1) + ".jpg", ImageFormat.Jpeg, ImageSize.Dpi600);
}
}
Sample Code - This didn't work
{
string file = @"c:\\temp\\PDFwithhiddenlayers.pdf";
PdfDocument pdfA = new PdfDocument(file);
int pc = pdfA.Pages.Count;
pdfA = null;
string file2 = "C:\\temp\\temp.pdf";
for (int i = 1; i <= pc; i++)
{
Document document = new Document();
ImportedPage pagec = new ImportedPage(file, i);
Group grp = pagec.Elements;
int ii = grp.Count;
document.Pages.Add(pagec);
document.Draw(file2);
document = null;
ceTe.DynamicPDF.Rasterizer.InputPdf miinpdf;
miinpdf = new InputPdf(file2);
PdfRasterizer rasterizer = new PdfRasterizer(miinpdf);
string xfile = System.IO.Path.GetFileNameWithoutExtension(file);
rasterizer.Pages[0].Draw("C:\\temp\\" + xfile + "_" + (i) + ".jpg", ImageFormat.Jpeg, ImageSize.Dpi600);
}
}