Free Support Forum - aspose.com

After adding text stamp error on opening PDF(C#)

Hi,

I’ve got a PDF file. In C# .net, I add a text stamp on it according to https://docs.aspose.com/display/pdfnet/Add+Text+and+Image+Stamp#AddTextandImageStamp-AddTextStamponAllPagesinaPDFFile.

The file is successfully converted but when I try to open it with Adobe Acrobat Reader DC (v 2019.021.20061), I get the following error:

image.png (5.0 KB)

In the stamp, the text is displayed with bullets:

image.png (43.5 KB)

Could you please tell me what might be causing this issue?

I used the following code:
using Aspose.Pdf.Facades;
using Aspose.Pdf.Text;
using System;
using System.IO;
using System.Text;

public static void ToPdf(string sourcePath, string targetPath)
{
  var fileStamp = new PdfFileStamp();
  fileStamp.BindPdf(sourcePath);

  // Create stamp.
  var stamp = new Aspose.Pdf.Facades.Stamp();
  stamp.BindLogo(new FormattedText("Hello world!", System.Drawing.Color.Blue, System.Drawing.Color.Gray, "Arial", EncodingType.Winansi, true, 28));
  stamp.SetOrigin(200, 200);
  stamp.Rotation = 90.0F;
  stamp.IsBackground = false;

  // Add stamp to PDF file.
  fileStamp.AddStamp(stamp);
  fileStamp.Save(targetPath);
}

AdobeError1.png (5.4 KB)
image.png (5.0 KB)
Input.pdf (160.1 KB)
Output.pdf (186.0 KB)

@directum,

Thanks for contacting support.

I have observed your issue and like to inform that I have created investigation ticket with ID PDFNET-47559 in our issue tracking system to investigate and resolve this issue as soon possible.