We are using the aspose pdf.kit to stamp information on existing PDF files. We are running version 3.3.0.0 .NET 2.0<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />
I am using the PdfFileStamp class to stamp a formattedtext object on the file.
Here is a sample of how my formatted text object looks.
New FormattedText("text goes here.:", New FontColor(0, 0, 0), Aspose.Pdf.Kit.FontStyle.HelveticaBold, EncodingType.Winansi, True, "8")
Intermittently we have end users that are getting PDF documents with a strange font being used for the text that is stamped on the PDF’s. Almost a hieroglyphics type of font with symbols rather than words. Can you help resolve this? So that they will get the PDF with the Helvetica font being used?
The end users with the problem are running OS is XP, Internet Explorer 7 Version 7.0.5730.13. Adobe version is 7.
We have tested this issue and found no inconsistency. We used following for testing:
Aspose.Pdf.Kit 3.3.0.0
Windows XP
Adobe Reader 7, Acrobat Reader 9
We're not quite sure why this is happening at your end. Could you please share some more information about the target machines having this problem? This will help us to resolve your issue.
I’ve also tested the issue using Aspose.Pdf.Kit 3.3.0.0 and I am unable to reproduce the problem. I’ve tested the issue using the following code snippet. The resource input file and the resultant Pdf document containing Text stamp are in attachment, please take a look.
[C#]<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />
I’ve tried opening the Pdf file over Windows XP Professional SP3, using Adobe Reader 5.0.0, 7.0.8 & 9.0.0 and Couldn’t notice the problem on either of them. Can you please share the resource Pdf files that you are using, so that we can test the issue at our end.
Sure. I can share the file with you and a sample PDF that was scanned that has the problem. How can I get this files to you and make it so only you get a copy of them?
You can attach files with this thread. As you reply you can add attachments, and in order to make it private, so it'll be accessible by Aspose staff only, mark the post as private on the post reply page.
You may send the confidential files directly to Shahzad by emailing him using forums. In the above post made by Shahzad, you can see Contact button. Click it and select Send shahzad.latif an email. It will allow you to send him email right from forums and you can attach files to it too. This way, only Shahzad will receive your files.
I got those files. We're working on the issue; I have also forwarded the request along with the files to our development team for further investigation. We'll let you know as we find the resolution.
We have investigated the issue for some time but could not figure out what was happened at the end users' side. Please have a try of the following line of code instead, and make sure the font file had been installed to your machine.
@"C:\WINDOWS\Fonts\Helvetica Bold.ttf", //make sure the font file is installed, or you need to change Helvetica Bold.ttf to an existing one in C:\WINDOWS\Fonts\ .
EncodingType.Winansi,
true,
8);
Hope it helps.(And you may need to copy the TrueType File(xxxx.ttf) to the end users' C:\WINDOWS\Fonts\ directory)
I will give it a try. The font file needs to be on the web server. Does the font file need be on the end users computer that will access the web site? Or does it get embedded in the PDF file?
You can embed the font in the pdf file. For that matter, you can set IsFontEmbedded property to true. Please find the details in the following technical article:
The font file needs to be installed over the system where the Watermark is being added to the Pdf file, and make sure you have set the Boolean value to true in FormattedText constructor so that the font gets embedded.
Let me correct the post made by Shahzad. Aspose.Pdf is a component which is used to generate the Pdf file from scratch, and the article link shared, explains the steps that you need to perform in order to embed the font information during the Pdf generation process.
Please don’t worry about it, and the font will be embedded to the pdf when the parameter 'boolembedded’ is set to be ‘true’ (as we did) in the FommatedText Constructor.