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

Free Support Forum - aspose.com

Convert RTF to PDF using Aspose.PDF - Watermark is being added

We are using Aspose.PDF with a full license, we are converting .rtf files to .pdf and we notice on some documents a watermark is being inserted in the background.

Our code is pretty simple

using (var fileStream = File.Open(reportPath, FileMode.Open, FileAccess.Read, FileShare.ReadWrite))
var binaryReader = new BinaryReader(fileStream);
content = binaryReader.ReadBytes((int)fileStream.Length);

                if (isRtf && convertToPdf)
                    filename = Path.GetFileNameWithoutExtension(reportPath) + ".pdf";

                    Document doc = new Document(fileStream);

                    using (MemoryStream streamText = new MemoryStream())
                        doc.Save(streamText, new PdfSaveOptions { SaveFormat = SaveFormat.Pdf });
                        content = streamText.ToArray();

aspose1.PNG.jpg (69.0 KB)
aspose2.PNG (255.8 KB)

Sometimes we will have a 20 page PDF and watermarks like on the attached images will appear at random pages.

Any ideas?


Would you kindly share your source RTF file along with output PDF with us. We will test the scenario in our environment and address it accordingly.

Thanks, we got to the bottom of the issue.