Hi,
I upgraded Aspose.Pdf from 9.7 to 10.3, and after the upgrade, my imported tiff images in pdf show with a watermark:
Evaluation only
Created with Aspose.Imaging
Our Aspose.Pdf license is up to date (extended for another year of updates a month ago). All other Pdf features we use work just fine.
Is imaging a separate license in 10.3?
Hi Matt,
Update:
It appears that only when Image.IsBlackAndWhite property is set to true (available only in v10), then the output images get the watermark. On the other hand, without it, the pdf would bloat the TIFF images in uncompressed mode.
TIFF to PDF convert - PDF filesize getting over 3 times as big - #13 by THTHO - Free Support Forum - aspose.com
Demo code:
public void ImageWatermarks( string pdfFile, int resolution )
{
new License().SetLicense( “Aspose.Pdf.lic” );
// extract page images to streams
var doc = new Aspose.Pdf.Document( pdfFile );
var res = new Aspose.Pdf.Devices.Resolution( 300 );
var pageImageStreams = doc.Pages.Cast<Aspose.Pdf.Page>()
.Select((p, i) =>
{
var tiffSettings = new TiffSettings { Compression = CompressionType.CCITT4, Depth = ColorDepth.Format1bpp };
var tiffDevice = new Aspose.Pdf.Devices.TiffDevice(PageSize.PageLetter, res, tiffSettings);
var stream = new MemoryStream();
tiffDevice.Process( doc, i + 1, i + 1, stream );
stream.Position = 0;
return stream;
});
// insert image streams into new document, one image stream per page
var imagePagesDoc = new Aspose.Pdf.Document();
foreach (var imgStream in pageImageStreams)
{
var page = imagePagesDoc.Pages.Add();
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.PageLetter.Height;
page.PageInfo.Width = Aspose.Pdf.PageSize.PageLetter.Width;
var image = new Aspose.Pdf.Image
{
ImageStream = imgStream,
// the only way to ensure/force compression… ; only in v10.3
// TIFF to PDF convert - PDF filesize getting over 3 times as big - #13 by THTHO - Free Support Forum - aspose.com
// When set to true, image in the document appears with ‘evaluation’ watermark
IsBlackWhite = true
};
page.Paragraphs.Add(image);
}
imagePagesDoc.Save( pdfFile + “.images.pdf” );
}
Hi Matt,
Thanks for sharing the details.
I have tested the scenario and I am able to reproduce the same problem that an evaluation watermark appears in the resultant PDF when converting Image to PDF and we have set the value of IsBlackWhite to true. For the sake of correction, I have logged it in our issue tracking system as PDFNET-38522. We will investigate this issue in detail and will keep you updated on the status of a correction.
We apologize for your inconvenience.
The issues you have found earlier (filed as PDFNEWNET-38522) have been fixed in Aspose.Pdf for .NET 10.8.0.
This message was posted using Notification2Forum from Downloads module by Aspose Notifier.
(1)
This has not been fixed or has been re-broken in 10.9.0. Please fix asap!
Actually,
I downgraded to 10.8.0 and this problem is still present.
Hi Matt,
Any word on this?
Hi,Pugglewuggle:
Any word on this?