|
Rank: Newbie Groups: Member
Joined: 6/12/2014 Posts: 3
|
Hi EO Team!
I am creating a PDF document with some interactive text boxes (AcmTextBox). I am trying to set the foreground color of the ActTextBoxes to Blue. It works, if set the Value of the textbox, before I render it, then the text will be blue. But if I edit/change the text, it becomes black. When I leave the textbox, the text becomes more gray. If I print the PDF the text becomes black.
Is it possible to change the color of the text to become blue when I print the PDF document?
Here is my code:
EO.Pdf.Acm.AcmTextBox textbox = new EO.Pdf.Acm.AcmTextBox(); textbox.Style.Width = 2.0f; textbox.Style.Height = 0.16f; textbox.Name = classname; textbox.Style.FontName = "Source Sans Pro"; textbox.Style.FontSize = 8f; textbox.Style.FontStyle = FontStyle.Regular; textbox.Style.ForegroundColor = Color.Blue; if (!string.IsNullOrEmpty(text)) textbox.Value = text; block.Children.Add(textbox);
Best Regards, Ola
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,217
|
Hi,
This is not supported in the current build. However it will be automatically supported in our next build. There will be no code changes required on your end.
We will reply here again as soon as the new build is available.
Thanks!
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,217
|
Hi,
This is just to let you know that we have posted a new build that should resolve this issue. You can download the new build from our download page. Please take a look and let us know how it goes.
Thanks!
|
|
Rank: Newbie Groups: Member
Joined: 6/12/2014 Posts: 3
|
Hello!
I have tried the new build, but I am getting some weird result. I have three AcmTextBoxes in my PDF. If I don't set the Value property of any of them, I can't see the text that I am trying to input, it seems to be transparent. If I set the Value property of one of the AcmTextBoxes, to "Test". Then the Test shows in Blue. If I input Test in any of the other two textboxes, it also works. But if I input something else, for example "Hello", then it shows some other characters together with spaces. Although, if I copy these characters with ctrl-c, and paste them to notepad, it show "Hello". I get a similar behavior when I try the interactiv sample that yoy provide.
Best Regards, Ola
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,217
|
Hi, Can you send a small test project to us along with the font you use? Please see here for more information about how to send test project to us: https://www.essentialobjects.com/forum/test_project.aspxOnce we have the test project we will debug into it here and see what we can find. Thanks!
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,217
|
Hi,
We have received your test project. We are able to reproduce the issue you described in Google Chrome. However we were not able to reproduce it in Adobe Reader. Can you check if it works with Adobe Reader on your side?
In the mean time we are looking into the Google Chrome case and hopefully we can get that to work.
Thanks!
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,217
|
Hi, Please try to set your textbox's Style.FontName to one of the following values:
Code:
Courier Helvetica Times-Roman
For example:
Code: C#
textbox.Style.FontName = "Helvetica";
A few additional variations of the above fonts (for example, "Courier-Bold") can also be used but are not encouraged. This should resolve the issue for you. These are special fonts that all PDF Readers are required to know how to render without the corresponding font data being embedded inside the PDF file. The issue you are seeing is caused by font data for new character (for example, when user enters "d" into a textbox that initially only had "abc") was not already embedded in the PDF file. To support allowing any character for another font, it would require the entire font data to be embedded. This can significiantly increase the PDF file size as modern font (such as Arial) contains thousands of characters. Thanks!
|
|
Rank: Newbie Groups: Member
Joined: 6/12/2014 Posts: 3
|
Hi,
Now it works, using the fonts you suggested. Thanks a lot!
Best Regards, Ola
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,217
|
Great. Glad to hear that it works for you!
|
|