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

Free Support Forum - aspose.com

Facades Stamp problem with font

Hi,

We are using Aspose.Pdf.dll version 2012.07.27 for .NET

While stamping a PDF on another PDF the stamp gets corrupted. We have had this problem in the past with Aspose.Pdf.Kit.dll but you have fixed that problem. Now we migrated from Aspose.Pdf.Kit to Aspose.Pdf.Facades we have this problem again.

I have attached the PDF's and the code we use. (tried to put the code in this post but cant get the format right)

We use the Aspose.Pdf.Facades.Stamp and the Aspose.Pdf.Facades.PdfFlieStamp classes.

Kind regards,

Jan Stolk.

Ps. Its a crime to past some c# code into this message and get it displayed right.

janstolk:
While stamping a PDF on another PDF the stamp gets corrupted. We have had this problem in the past with Aspose.Pdf.Kit.dll but you have fixed that problem. Now we migrated from Aspose.Pdf.Kit to Aspose.Pdf.Facades we have this problem again.

I have attached the PDF’s and the code we use. (tried to put the code in this post but cant get the format right)

We use the Aspose.Pdf.Facades.Stamp and the Aspose.Pdf.Facades.PdfFlieStamp classes.

Hi Jan,

Thanks for using our products.

I
have tested the scenario and I am able to reproduce the same problem. For the
sake of correction, I have logged it in our issue tracking system as PDFNEWNET-34339. We
will investigate this issue in details and will keep you updated on the status
of a correction.

We apologize for your inconvenience

janstolk:
Ps. Its a crime to past some c# code into this message and get it displayed right.

Please note that you can share the code snippet within forum threads but we discourage the sharing of license files within forums. In case of any further query, please feel free to contact.

Hi Jan,


Thanks for your patience. We have further investigated the issue reported earlier and as per our observations, the problem occurred because the input document (inFile) seems to have incorrect version PDF (1.2). It’s behavior is different from PDF v.1.2 (according specification).

In order to resolve this issue and stamp PDF files correctly, you should convert the document to other version (e.g. 1.3). Please try using the following code snippet to resolve this issue.

[C#]

String stampFile = @“c:\pdftest\briefpapier
zonder achtergrond.digitaal.pdf”
;<o:p></o:p>

String inFile = @"c:\pdftest\20120001_20681.pdf";

String outFile = @"c:\pdftest\attachment-output.pdf";

//convert input document into v. 1.3

Document doc = new Document(inFile);

doc.Convert(new MemoryStream(), PdfFormat.v_1_3, ConvertErrorAction.None);

doc.Save(inFile);

Aspose.Pdf.Facades.Stamp stamp = new Aspose.Pdf.Facades.Stamp();

stamp.BindPdf(stampFile, 1);

stamp.IsBackground = true;

stamp.Pages = new int[] { 1 };

Aspose.Pdf.Facades.PdfFileStamp pdfFileStamp = new Aspose.Pdf.Facades.PdfFileStamp();

pdfFileStamp.BindPdf(inFile);

pdfFileStamp.AddStamp(stamp);

pdfFileStamp.Save(outFile);

The issues you have found earlier (filed as PDFNEWNET-34339) have been fixed in Aspose.Pdf for .NET 7.8.0update.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.

Hi, i’m sorry for the late reply!! Your workaround solved our problem, so thanks for that!! Kind regards, Jan.