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

Free Support Forum - aspose.com

Failing to convert tif files using ASPOSE Java

Hi Good day,
we are currently, having serious production issues with certain files, are failing to convert to pdf using ASPOSE java.

Pls find the attached .tif files.
we are currently,using ‘aspose.pdf-9.1.0.jar’ .
Pls assist us with this issue ASAP.
Your response,will be kindly appreciated.


Kind Regards,
Prasad Dasari

Hi Prasad,


Thanks for your inquiry. I have tested the scenario with new DOM approach for image to PDF conversion using Aspose.Pdf for Java 10.4.0 and unable to notice any issue. Please download and try latest version of Aspose.Pdf for Java, it will resolve the issue.

Document doc = new Document();<o:p></o:p>

doc.getPages().add();

com.aspose.pdf.Image image= new com.aspose.pdf.Image();

image.setFile(myDir+"226041433.tif");

doc.getPages().get_Item(1).getParagraphs().add(image);

doc.save(myDir+"226041433.pdf");


Please feel free to contact us for any further assistance.


Best Regards,

Hi Good day,

We are experiencing serious production issues with converting tiff file to PDF.
I am still waiting for some good news from Support Team .
<span style=“font-size:10.0pt;font-family:“Arial”,“sans-serif”;
mso-fareast-font-family:“Times New Roman”;color:#333333;mso-ansi-language:EN-ZA;
mso-fareast-language:EN-ZA;mso-bidi-language:AR-SA”>PDFNEWJAVA-34838 is the one logged earlier regarding TIFF file issue.
<span style=“font-size:10.0pt;font-family:“Arial”,“sans-serif”;
mso-fareast-font-family:“Times New Roman”;color:#333333;mso-ansi-language:EN-ZA;
mso-fareast-language:EN-ZA;mso-bidi-language:AR-SA”>Pls respond to us whenever the fix is ready,as it is causing serious issues in PRODUCTION environment.
<span style=“font-size:10.0pt;font-family:“Arial”,“sans-serif”;
mso-fareast-font-family:“Times New Roman”;color:#333333;mso-ansi-language:EN-ZA;
mso-fareast-language:EN-ZA;mso-bidi-language:AR-SA”>
<span style=“font-size:10.0pt;font-family:“Arial”,“sans-serif”;
mso-fareast-font-family:“Times New Roman”;color:#333333;mso-ansi-language:EN-ZA;
mso-fareast-language:EN-ZA;mso-bidi-language:AR-SA”>Pls find the attached production TIFF file that failed last week.
<span style=“font-size:10.0pt;font-family:“Arial”,“sans-serif”;
mso-fareast-font-family:“Times New Roman”;color:#333333;mso-ansi-language:EN-ZA;
mso-fareast-language:EN-ZA;mso-bidi-language:AR-SA”>
<span style=“font-size:10.0pt;font-family:“Arial”,“sans-serif”;
mso-fareast-font-family:“Times New Roman”;color:#333333;mso-ansi-language:EN-ZA;
mso-fareast-language:EN-ZA;mso-bidi-language:AR-SA”>Thank you once again for the support,
<span style=“font-size:10.0pt;font-family:“Arial”,“sans-serif”;
mso-fareast-font-family:“Times New Roman”;color:#333333;mso-ansi-language:EN-ZA;
mso-fareast-language:EN-ZA;mso-bidi-language:AR-SA”>
<span style=“font-size:10.0pt;font-family:“Arial”,“sans-serif”;
mso-fareast-font-family:“Times New Roman”;color:#333333;mso-ansi-language:EN-ZA;
mso-fareast-language:EN-ZA;mso-bidi-language:AR-SA”>Kind Regards,
<span style=“font-size:10.0pt;font-family:“Arial”,“sans-serif”;
mso-fareast-font-family:“Times New Roman”;color:#333333;mso-ansi-language:EN-ZA;
mso-fareast-language:EN-ZA;mso-bidi-language:AR-SA”>Prasad Dasari…

Hi Prasad,


Thanks for your patience.

The product team has started investigating the issue PDFNEWJAVA-34838 reported earlier but I am afraid due to some technical limitations in our API, the problem is not yet resolved. However as soon as we have some definite updates regarding its resolution, we will let you know.

Besides this, I have also tried converting recently shared 0865079624-06072015-104117-0117894507.tif file to PDF format and have observed that an exception is being generated. For
the sake of correction, I have separately logged it in our issue tracking system as
PDFNEWJAVA-35042. We
will investigate this issue in details and will keep you updated on the status
of a correction.

We apologize for your inconvenience.

Hi good day,
Is there any feedback with regarding to PDFNEWJAVA-34838 reported earlier PDFNEWJAVA-35042.

Pls provide some feedback for resolving TIF conversion failures as per discussed earlier.

Your response will be appreciated

Kind Regards,
Prasad

Hi Prasad Dasari,


Thanks for your patience.

As we have recently noticed the issues, so they are pending for review and I am afraid they are not yet resolved. As soon as we have some further updates regarding their resolution, we will let you know.

<span style=“font-size:10.0pt;font-family:“Arial”,“sans-serif”;
mso-fareast-font-family:“Times New Roman”;color:#333333;mso-ansi-language:EN-ZA;
mso-fareast-language:EN-ZA;mso-bidi-language:AR-SA”>Hi Good day,

with regarding .TIFF file conversion issues -PDFNEWJAVA-34838.
Is there any feedback?as it is a prod issue so doing a followup on this.
Your response will be appreciated.

Kind Regards,
prasad

Hi Parasad,


Thanks for your inquiry. I am afraid your issue is still not resolved. However our product team has completed the investigation of PDFNEWJAVA-34838 and now they will plan its fix. We requested the team to share an ETA at their earliest. We will notify you as soon as we made some significant progress towards issue resolution.

We are sorry for the inconvenience caused.

Best Regards,
Hi Good day,
With regarding PDFNEWJAVA-34838 ,we are still waiting for some feedback.
We have recently noticed some TIFF files which are sucessfully converted to PDF with the version
aspose.pdf-10.6.2.jar, but it took more than 30 minutes during the process of conversion..i suspect this is actually causing more CPU usage issue..
Normally we get emails as a part of Service Functionality and that will have different attachments an we extract those attachments and send it to Aspose for PDF conversion.
Pls find the attachments for samples.
we got one email with one attachment and taken 30 min for pdf conversions.
and one more email with 10 tiff attachments and it took 32 minutes for pdf conversion..


Pls find the code snippet below:
------------------------------------------------
private static void convertTiffToPdf(String inFilepath, String pdfFilepath,FileType fileType)
throws XPdfConvert {
LOG.info(" Converting .TIFF To Pdf by ASPOSE ");
try {
//long start = System.currentTimeMillis();
Pdf pdf1 = new Pdf();
// add a section
Section sec1 = pdf1.getSections().add();
// create an image object
aspose.pdf.Image img1 = new aspose.pdf.Image(sec1);
// set image
img1.getImageInfo().setFile(inFilepath);
// specify the image file type
img1.getImageInfo().setImageFileType(ImageFileType.Tiff);
// add image to paragraphs collection of Section object
sec1.getParagraphs().add(img1);
// specify the image height information equal to Section height
// minus Top and Bottom margin of page
img1.getImageInfo().setFixHeight(
sec1.getPageInfo().getPageHeight()
- sec1.getPageInfo().getMargin().getTop()
- sec1.getPageInfo().getMargin().getBottom());
// specify the image Width information equal to Section Width minus
// Left and Right margin of page
img1.getImageInfo().setFixWidth(
sec1.getPageInfo().getPageWidth()
- sec1.getPageInfo().getMargin().getLeft()
- sec1.getPageInfo().getMargin().getRight());
// save the pdf file
pdf1.save(pdfFilepath);
LOG.info(" Converted .TIFF File To Pdf by ASPOSE Successfully ");
//LOG.info(" Tiff conversion of File : " + fileType + "completed by Aspose Successfully ");
//long timeTaken = System.currentTimeMillis() - start;
//LOG.info(" -- writeContent() end in " + timeTaken + " milliseconds");
} catch (Exception e) {
LOG.error("Failed to convert TIFF File to PDF... Error message: "+e.getMessage()+". Error cause: "+e.getCause());
throw new XPdfConvert(String.format(
"message=\"Could not convert Tiff file to PDF \" filename=\"%s\"",inFilepath), e);
}
}

pls provide your feedback,as it causing issues in PROD..

your response,will be appreciated,
Kind Regards,
prasad dasari..

Hi Prasad,


Thanks for your inquiry. In reference to PDFNEWJAVA-34838, our product team has completed initial investigation and now working over the fix. We have again requested for an ETA, we will update you as soon as we get a feedback.

Moreover, I have converted your shared TIFF files to PDF using new DOM approach and only Document.tif is taking around 10 seconds, but all other files are being converted between 3-5 seconds. As stated above, it is recommended to use new DOM (com.aspose.pdf) instead old generator (aspose.pdf), it is more efficient and improved.

long startTime = System.currentTimeMillis();<o:p></o:p>

// Instantiate Document Object

Document doc = new Document();

// Add a page to pages collection of document

Page page = doc.getPages().add();

// Set margins so image will fit, etc.

page.getPageInfo().getMargin().setBottom(0);

page.getPageInfo().getMargin().setTop(0);

page.getPageInfo().getMargin().setLeft(0);

page.getPageInfo().getMargin().setRight(0);

// Create an image object

com.aspose.pdf.Image image1 = new com.aspose.pdf.Image();

// Add the image into paragraphs collection of the section

page.getParagraphs().add(image1);

// Set the image file stream

image1.setFile("C:/Users/Home/Downloads/MultipeTIFFFiles/Page0013.tif");

image1.setFixHeight(PageSize.A4_HEIGHT);

image1.setFixWidth(PageSize.A4_WIDTH);

// Save resultant PDF file

doc.save("E:/data/Page0013.pdf");

long finalz = System.currentTimeMillis();

long elapsedTime = finalz - startTime;

System.out.println(elapsedTime);


Please feel free to contact us for any further assistance.


Best Regards,

Hi Good day,

How are you?
With reference to PDFNEWJAVA-34838 from TIFF to PDF conversion ,is there any feedback?.
Pls find the attachment for piece of code running in PROD and also TIF file.
We had a latest issue for this specific image,
PLs Download the .tif (attached) and open with ‘WindowsPhotoViewer’,you would be able to see 2 images internally (TifImagesDescription.docx attached),but when we do a test ,only one image is getting converted and the rest is ignored by Aspose and even that file is not properly formatted…
Pls find the PDF attached that came out when i did my test? i 've tested by sending email to my service that will convert email body and attachment and merge into one singled PDF…



Pls note: we currently using ''aspose.pdf-11.2.0.jar"

Your response will be appreciated,


Thank you for the support…


Kind Regards,
Prasad Dasari…


<span style=“font-size:10.0pt;font-family:“Arial”,“sans-serif”;mso-fareast-font-family:
“Times New Roman”;color:#333333;mso-ansi-language:EN-ZA;mso-fareast-language:
EN-ZA;mso-bidi-language:AR-SA”>

HI Good day,

Pls provide me some feedback with reference to Tif issue as per listed above.

Your response will be appreciated,

Kind Regards,
Prasad

metropolitanhealth:
With reference to PDFNEWJAVA-34838 from TIFF to PDF conversion ,is there any feedback?
Hi Prasad,

Thanks for your patience and sorry for the delayed response.

The above stated issue is still under investigation and I am afraid due to some technical difficulties, its not yet resolved. However as soon as we have some definite updates regarding its resolution, we will let you know.

metropolitanhealth:
Pls find the attachment for piece of code running in PROD and also TIF file.
We had a latest issue for this specific image,
PLs Download the .tif (attached) and open with ‘WindowsPhotoViewer’,you would be able to see 2 images internally (TifImagesDescription.docx attached),but when we do a test ,only one image is getting converted and the rest is ignored by Aspose and even that file is not properly formatted…
Pls find the PDF attached that came out when i did my test? i 've tested by sending email to my service that will convert email body and attachment and merge into one singled PDF…
Hi Prasad,

I have tested the scenario and have observed that both TIFF frames are being converted to PDF format but there are some formatting issues with first frame of PDF file. For the sake of correction, I have separately logged this problem as PDFNEWJAVA-35562 in our issue tracking system. We will further look into the details of this problem and will keep you posted on the status of correction. Please be patient and spare us little time. We are sorry for this inconvenience.

Good day,

Thank you for the response…
Pls send me the converted PDF file as i am not sure why i can’t see the second frame? with my code…

Kind Regards,
prasad

Hi Prasad,


Please find attached the requested PDF document.

[Java]

long startTime = System.currentTimeMillis();<o:p></o:p>

// Instantiate Document Object

Document doc = new Document();

// Add a page to pages collection of document

Page page = doc.getPages().add();

// Set margins so image will fit, etc.

page.getPageInfo().getMargin().setBottom(0);

page.getPageInfo().getMargin().setTop(0);

page.getPageInfo().getMargin().setLeft(0);

page.getPageInfo().getMargin().setRight(0);

// Create an image object

com.aspose.pdf.Image image1 = new com.aspose.pdf.Image();

// Add the image into paragraphs collection of the section

page.getParagraphs().add(image1);

// Set the image file stream

image1.setFile("C:/pdftest/000000000000000_013FJMAV3700002_0.000.tif");

image1.setFixHeight(com.aspose.pdf.PageSize.getA4().getHeight());

image1.setFixWidth(com.aspose.pdf.PageSize.getA4().getWidth());

//image1.setFixWidth(PageSize.A4_WIDTH);

// Save resultant PDF file

doc.save("c:/pdftest/000000000000000_013FJMAV3700002_0.000.pdf");

long finalz = System.currentTimeMillis();

long elapsedTime = finalz - startTime;

System.out.println(elapsedTime);

Hi Good day,

Is there any feedback with regarding TIFF issues as per my email earlier…
We are waiting for fix desperately as it is impacting our PROD environment and missing SLA’s for different clients and impacting negative impact…

Kind Regards,
Prasad

Hi Prasad,


Thanks for your patience.

The product team started investigating earlier reported issues but I am afraid due to some technical difficulties and limitations regarding features missing our API’s, they are not yet resolved. However I have shared your concerns with product team and as soon as we have some further updates, we will let you know.

Hi Good day,

Is there any time frame,that i can expect a positive feedback with refers to TIFF issues that i have mentioned.
We got some SLA’S for business and they are in serious state.
Kindly provide us the positive answers ASAP.

Kind Regards,
Prasad

Hi Prasad,


Thanks for your patience.

As shared earlier, the product team has started investigating earlier reported issues but due to some technical limitations, the problems are not yet resolved. However I have shared your concerns with product team and have asked them to share the possible ETA. As soon as we have some further updates, we will let you know.