Is it possible to justify (full) a label based upon the text (font & font size) and width provided? It appears that left, center, and right are the only available options to the label's align property.
Text Justification
Re: Text Justification
Support · Feb 15, 2011Yes, you can justify the text which you are adding without any problem using our DynamicPDF Generator product. You will have to use DPDF_TextAlign_FullJustify enumerator using which you can make the text to align to Justify, FullJustify,Center, Left and Right. Below is the sample code for it.
<!-- METADATA TYPE="typelib" UUID="{DF9225FE-94A4-490D-8CAD-E8366CE621D3}"-->
<%
Dim MyDocument
Set MyDocument = Server.CreateObject( "DynamicPDF.Document" )
Dim MyPage
Set MyPage = MyDocument.AddPage()
Dim MyLabel
Set MyLabel = MyPage.AddLabel( "Hello World!", 0, 0, 100, 12 )
MyLabel.Font = DPDF_Font_Helvetica
MyLabel.Align = DPDF_TextAlign_FullJustify
MyLabel.FontSize = 12
MyDocument.DrawToWeb True
Set MyPage = Nothing
Set MyDocument = Nothing
%>
Thanks,
ceTe Software Support Team.
Re: Text Justification
Forum member · Feb 15, 2011Thank you, this worked great.
As a follow-up with the COM v6.0 product, can you change the X Y coordinates once a label has been added to the page (using AddLabel method for the page object)? Everything else seems configurable after the addition but these two properties. Thanks again.
Re: Text Justification
Support · Feb 15, 2011Hello,
Referring to the above example AddLabel() method is the only place where you can set the co-ordinates of the label. It is not possible to change the X & Y co-ordinates once the label is added to the page.
Thanks,
ceTe Software Support Team.