Forum


Replies: 7   Views: 1950
How do i add a black dot
Topic closed:
Please note this is an old forum thread. Information in this post may be out-to-date and/or erroneous.
Every phpdocx version includes new features and improvements. Previously unsupported features may have been added to newer releases, or past issues may have been corrected.
We encourage you to download the current phpdocx version and check the Documentation available.

Posted by Knutsford  · 16-01-2020 - 12:25

If I add ● to the text will it show up in the final word document as a Black dot or do I need an image? Thanks

Posted by admin  · 16-01-2020 - 12:37

Hello,

What license and version of phpdocx are you using?

We have tested it using the latest release of phpdocx and it's working perfectly; the character is added correctly.

Regards.

Posted by Knutsford  · 16-01-2020 - 13:18

O good. Just the trial version at the moment. I haven't tried it yet - I was just wondering if that would work. If the experiment works which it should do my Client will be buying the full version.

Posted by Knutsford  · 18-01-2020 - 13:35

array(
            'value' => '●',
            'backgroundColor' => 'FFFFFF',
            'width' => 2150,
            'borderColor'=> '0000000',
            'cellMargin' => 100,
        ),

 

 

Is coming out in the Word Doument as ●

 

I thought you said it would come out as a black circle?

 

I am trying to add black circles as a table entry

 

Thanks

 

 

Posted by Knutsford  · 18-01-2020 - 16:31

Am I right in thinking  i need to do

 

$circle = new WordFragment($docx);
$circle->embedHTML("•");    

 

then use $circle as the value?

We need tidy installing if I am correct

Posted by admin  · 20-01-2020 - 09:33

Hello,

You need to install tidy to transform HTML to DOCX. You can also use addText to insert strings:

$html = '<p>Character &#9679; other</p>';
$docx->embedHTML($html);

$text = 'Character ' . html_entity_decode('&#9679;') . ' other';
$docx->addText($text);

The dot character can also be added directly instead of the encoded value.

Regards.

Posted by Knutsford  · 20-01-2020 - 09:51

Thought so. I have emailed my Client telling them that I thought we needed it. I will now tell him we definately do. My demo page should work once that is installed and hopefully if his client is happy which I expect they will be we can go ahead and buy the Pro version. Thanks for all your help.

Posted by Knutsford  · 20-01-2020 - 10:12

So if I use

html_entity_decode('&#9679;')

 

as the value for the table that would work as well instead of fragments as long as I have Tidy installed. Got you. Thanks