spanish

DynamicPDF CoreSuite for COM/ActiveX (v8) Forum

 May 08 2017 8:10 PM
I appear to be having a problem figuring out how to generate a pdf in Spanish.  I use both 'label' and 'addformattedtextarea' to write to the document. Is there a special font or setting I need to generate Spanish language pdf?  I explored the examples and help files but I just can't get it.

Thanks.

--Jim
 May 09 2017 10:33 AM
Posted by a ceTe Software moderator
Hello Jim,

Yes, you can add Spanish text to the PDF using DynamicPDF Generator for COM/ActiveX product. You will need to use a font which supports the text and characters being added to the PDF. You can refer to the HelloWorldLanguages ASP code sample included with the evaluation download for adding Spanish text to the PDF and online example for the same can be found here.

Thanks,
ceTe Software Support Team.
 May 09 2017 11:45 AM
Thanks.  I have been studying the Hello World sample a lot, and when I try to put it into my own code, I get funny characters.  I change to Times font, same thing.

code:
Dim MyDocument, MyCover
Set MyDocument = Server.CreateObject("DynamicPDF.Document")
MyDocument.DefaultMarginLeft = 45
MyDocument.DefaultMarginRight = 45
MyDocument.DefaultMarginTop = 35
MyDocument.DefaultMarginBottom = 10
Set MyCover = MyDocument.AddPage()
Dim MyLanLabel
Set MyLanLabel = MyCover.AddLabel("Lista de Disposición de Valores", 10, 350, 500, 50)
MyLanLabel.Font = DPDF_Font_Helvetica
MyLanLabel.FontSize = 12
MyLanLabel.Align = DPDF_Align_Left

In the results, the "o'" in "Disposición" turns into "ó" so I get "Disposición" (in case the formatting gets lost, that is an "o'" turns into "A3")

Not sure what to do.  The code above is from your example.  Is there a way to turn on utf-8 in DynamicPDF and specify Spanish like I do in html, such as
  <meta charset="utf-8">
  <html lang="es" xml:lang="es">

I have experimented with myDocument.Language = "es" but that doesn't change anything either.

Do I need a special font that has the extended Spanish alphabet?  If so, do you know of one, OR do you have any Spanish clients who are using DynamicPDF that I can correspond with?

Thanks for your help!

--Jim
 May 09 2017 1:00 PM
Posted by a ceTe Software moderator
Hello Jim,

Can you please send over the following details to support@cete.com so we can look into it further?

1.Code sample which uses static data to recreate the behaviour.
2.Output PDF.
3.Exact version and build number of the DynamicPDF product.

Thanks,
ceTe Software Support Team.
 May 26 2017 9:07 AM
Posted by a ceTe Software moderator
Hello,

Thanks for sending the information. We were able to recreate the behaviour and it is most likely caused due to the incorrect encoding type set for the ASP file. You can open ASP file with Notepad++ tool and set the encoding to ANSI or UTF 8 and that should resolve the issue.

Thanks,
ceTe Software Support Team.

All times are US Eastern Standard time. The time now is 6:45 PM.