We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Need Attachment to tiff conversion

Hi Anish,


Please visit the following link for required information on Extract Images from the PDF File

HI Nayyer,


We are using aspose for extracting images from PDF, but we are facing one issue.

There are only 2 images contains in first page of one pdf file, pdf is having total three pages. But while reading images from the pdf, each pages returning these 2 images.

Below is the code we are using.

Document pdfDocument = new Document(FileName);
for (int k = 0; k < tiffImageList.Count; k++)
{
Stream PdfPageArray = new MemoryStream((byte[])tiffImageList[(k+1)]);
Document pdfDocumentPage = new Document(PdfPageArray);
int imageCount = pdfDocument.Pages[(k+1)].Resources.Images.Count;
}

HI Nayyer,


We are using aspose for extracting images from PDF, but we are facing one issue.

There are only 2 images contains in our pdf file, pdf is having total three pages and the images are in first page. But while reading images from the pdf, each pages of the pdf returning these 2 images. Please help me to resolve the issue.

Below is the code we are using.

Document pdfDocument = new Document(FileName);
for (int k = 0; k < pdfDocument.Pages.Count; k++)
{
Stream PdfPageArray = new MemoryStream((byte[])tiffImageList[(k)]);
Document pdfDocumentPage = new Document(PdfPageArray);
int imageCount = pdfDocument.Pages[(k+1)].Resources.Images.Count;
}

Attached the pdf we are having this issue.

Hi Anish,


Thanks for sharing the resource file.

I have tested the scenario and I am able to
notice the same problem. For the sake of correction, I have logged this problem
as PDFNEWNET-39746 in our issue tracking system. We will
further look into the details of this problem and will keep you updated on the
status of correction. Please be patient and spare us little time. We are sorry
for this inconvenience.

OK Nayyer, thanks for verifying my issue.


One more doubt, Can we change the font of the TIF after converting pdf to TIF.
Below are the code am using,


Aspose.Pdf.Document pdfDocument = new Aspose.Pdf.Document(pdf1);
Resolution resolution = new Resolution(150);
TiffSettings tiffSettings = new TiffSettings();
tiffSettings.Compression = CompressionType.CCITT4;
tiffSettings.Depth = Aspose.Pdf.Devices.ColorDepth.Default;
tiffSettings.SkipBlankPages = false;
TiffDevice tiffDevice = new TiffDevice(resolution, tiffSettings);
tiffDevice.Process(pdfDocument, outputTiffName);


Please reply.

Hi Anish,


As soon as we have some definite updates, we will surely let you know.

Hi Anish,



Thanks for your patience. The issue reported earlier is still pending for review and is not yet resolved. As soon as we have some further updates, we will let you know.

Hi Anish,


anishvj:
OK Nayyer, thanks for verifying my issue.

One more doubt, Can we change the font of the TIF after converting pdf to TIF.
Below are the code am using,


Aspose.Pdf.Document pdfDocument = new Aspose.Pdf.Document(pdf1);
Resolution resolution = new Resolution(150);
TiffSettings tiffSettings = new TiffSettings();
tiffSettings.Compression = CompressionType.CCITT4;
tiffSettings.Depth = Aspose.Pdf.Devices.ColorDepth.Default;
tiffSettings.SkipBlankPages = false;
TiffDevice tiffDevice = new TiffDevice(resolution, tiffSettings);
tiffDevice.Process(pdfDocument, outputTiffName);


Please reply.

Thanks for your inquiry. I am afraid you can not change fonts after conversion of PDF to TIFF. However you can replace font in PDF document before the PDF to TIFF conversion as following. Please check following documentation link for details, it will help you to accomplish the task.


Best Regards,

Thanks Tilal. its worked.



Also one more doubt i have is regarding alignment of text in TIF, can i move entire content to left ? or can i increase margin at the right side ?

Pls help me.

Hi Anish,


You may consider decreasing left margin because when changing left alignment for individual page object, there can be formatting issues. In case you have some different requirement, please share some further details.