Hi, im trying to convert the attached TIFF to PDF using the following code:
Dim pdf1 As Pdf = New Pdf()
Dim sec As Section = pdf1.Sections.Add()
Dim ms As MemoryStream = New MemoryStream()
Dim myimage As New Bitmap(ms)
Dim imageht As Aspose.Pdf.Generator.Image = New Aspose.Pdf.Generator.Image(sec)
imageht.ImageInfo.ImageFileType = ImageFileType.Tiff
imageht.ImageInfo.ImageStream = ms
imageht.ImageInfo.IsBlackWhite = false
sec.Paragraphs.Add(imageht)
Dim tifstream = New MemoryStream()
pdf1.Save(tifstream)
—
The tif size is 285 kb
The converted PDF file is 954kb
When I set the “IsBlackWhite” to “true”, the PDF filesize drops to 300kb.
But im not intererested in converting the tiff to BlackWhite.
How can I convert the TIFF to PDF without the filesize getting much bigger?
Hi Thomas,
Thanks for your inquiry. While testing the scenario with your shared document, we have managed to reproduce the issue with latest version of Aspose.Pdf for .NET 9.6.0. We have logged a ticket PDFNEWNET-37588 in our issue tracking system for further investigation and resolution. We will notify you as soon as it is resolved.
We are sorry for the inconvenience caused.
Best Regards,
Hi again,
How soon can I expect an answer/possible solution to this problem? Its important for our customers that the filesize does not get 3 times as big when they convert all of their TIFFs into PDFs.
Hi Thomas,
Thanks for your inquiry. I am afraid your issue is not resolved as we have noticed it recently. It is pending for investigation in the queue with other priority task. As soon as its investigation is completed then we will share our findings or ETA with you.<o:p></o:p>
We are sorry for the inconvenience caused.<o:p></o:p>
Best Regards,
Hi again,
I know I have been asked about this before, but our customers are asking me for a deadline to solve this problem - therefore I have to ask you guys to provide me with a deadline or some more information about when this will be resolved. Are we talking about weeks, months, years?
Hope you can provide me with more information
Hi Thomas,
Hi Thomas,
The issues you have found earlier (filed as PDFNEWNET-37588) have been fixed in Aspose.Pdf for .NET 10.0.0.
This message was posted using Notification2Forum from Downloads module by Aspose Notifier.
Hello again,
I have just tested the new version (10.0.0.0) of the Aspose.PDF DLL.
But there is not difference - using my previous example the resulting PDF is still 954kb (TIF size was 285kb)
We have just renewed our license and one of the reason for this was due to this fix (which does not work?)
Please provide me with an example howto convert TIF to PDF as my example apparently isnt doing the job.
Hi Thomas,
string outFile = myDir + “ImagetoPDFDOM1.pdf”;<o:p></o:p>
string inFile = myDir + "TestTif.tif";
Document doc = new Document();
Page page = doc.Pages.Add();
// Set margins so image will fit, etc.
page.PageInfo.Margin.Bottom = 0;
page.PageInfo.Margin.Top = 0;
page.PageInfo.Margin.Left = 0;
page.PageInfo.Margin.Right = 0;
page.PageInfo.Height = Aspose.Pdf.PageSize.A4.Height;
page.PageInfo.Width = Aspose.Pdf.PageSize.A4.Width;
//Create an image object
Aspose.Pdf.Image image = new Aspose.Pdf.Image();
image.IsBlackWhite = true;
//Add the image into paragraphs collection of the section
page.Paragraphs.Add(image);
image.File = inFile;
doc.Save(outFile);
Best Regards,
Hi again,
Im not sure whether or not you have read my original post:
When I set the “IsBlackWhite” to “true”, the PDF filesize drops to 300kb.
But im not intererested in converting the tiff to BlackWhite.
Therefore it is not an acceptable solution to tell me to set “IsBlackWhite” to true.
I was assuming the “fix” being released in version 10.0.0.0 would be something else, otherwise nothing has changed.
Can you provide me with another solution to the problem?
Regards,
Thomas
Hi Thomas,THTHO:
Im not sure whether or not you have read my original post:
When I set the “IsBlackWhite” to “true”, the PDF filesize drops to 300kb.
But im not intererested in converting the tiff to BlackWhite.
Therefore it is not an acceptable solution to tell me to set “IsBlackWhite” to true.
I was assuming the “fix” being released in version 10.0.0.0 would be something else, otherwise nothing has changed.
Can you provide me with another solution to the problem?
Hi again,
I have not recieved any info about a new update.
As stated earlier we renewed our license purely because of the 10.0.0.0 update where the problem would be fixed and we have promised our customers that this would be implemented this january.
Is there anything I can do to help or how soon can I expect a fix?
Hi Thomas,