Hi Denis, Thanks for relply!
My pdf files have mixed image pages and text pages.
I'm using PixTools for .NET 8.3.
I find 2 senarios:
1 - PDF created by Pix works fine like tiff to extract pages
try
{
for (int i = 0; i < nuTotalPaginas; i++)
{
nextImg = new PixImage();
// make directory
string dsDiretorio = GeraDiretorioDISEC
(dsBarCode);
// set out file path
string dsCaminhoImagem =dsDiretorio+"\\"+
dsBarCode + "." + i.ToString().PadLeft(4, '0');
// load pdf page in PixImage object
PixImageStorage.Load(nextImg, dsArquivoPDF, i);
// save page to file
PixImageStorage.Save(nextImg, PixFileType.Tiff,
dsCaminhoImagem, PixCompressionSettings.G4,
OpenFileMode.CreateAlways);
}
}
catch (Exception ex)
{
throw new Exception("Falha ao quebrar arquivo pdf em
imagens TIF" + " Descrição do erro: "+ ex.Message);
}
2 - PDF not created by Pix. In this case I find only one solution,
configure PDF RenderingSettings after call extract page rotine, but
it's is soo sloow..:
private PDFRenderingSettings pdfSettings;
public void SetPDFRendering()
{
// Get current PDF rendering settings
pdfSettings = ReadFileDriver.PDFRendering;
// Change settings
pdfSettings.EnableRendering = true;
pdfSettings.DetectPageResolution = false;
pdfSettings.Resolution = 200; // DPI
pdfSettings.Smoothing = PixPDFSmoothing.None;
// Set new PDF rendering settings
ReadFileDriver.PDFRendering = pdfSettings;
}
You know other way to do this?