Menu

Me too -- Blank .sxw

Help
2005-06-24
2013-04-17
  • Nobody/Anonymous

    I read the earlier post and your possible resolution: download the latest ActiveLink.

    Could you provide detailed instructions on how to do this?

    I tried just replacing the files that are in phpdocwriter/lib/active-link-xml/ but that didn't fix it.  I also tried replacing phpdocwriter/lib/include.php to no avail.

    RH9
    Apache 2 something
    PHP 5 something

    Also, I read your feature list and looked at the examples, but what I need, specificially, is not there.

    I need to write a paragraph (when I say paragraph, I mean in the traditional book sense -- the first line is indented).  And I need to be able to mix the font within the paragraph.

    For example, the first 3 words of the paragraph are bold and the rest are normal, and the paragraph must be justified and the first line must be indented.  There may be italics, underline, etc used within the paragraph as well.

    It is not enough to just set the font, then write the text.

    You system is an ideal solution for my needs, provided the above functionality is present.

    Thanks!

     
    • Nobody/Anonymous

      Hi there,

      I installed OOo, extracted docwriter to the localhost, and modified the setup.xcu to get OOo to listen. I also modified the export.bat file and the config.php file. When I use phpdocwriter from a browser, I choose "OpenOffice" as the file extension, example 1 as the file to generate, and I click generate. What I get is a blank index.php file, and no generated file in my temp directory (c:/TEMP/). I can't work out why its not working. Can anybody offer me any assistance? I'm really confused.

      I just want something to work....

      Thanks.

       
    • Jose Manuel Sanchez Rivero

      Hi,

      Here are the detailed instructions to make it work under PHP5:

      1. Download latest version (0.4.0) of Active-Link XML from: http://www.active-link.com/software/ and unpack it.

      2. Go to the uncompresed directory and copy 'org' directory (classes/org).

      3. Go to phpdocwriter/lib directory and paste the copied directory.

      4. Open the file phpdocwriter/lib/phpdocwriter/pdw_base.php and replace the line 26:

      import('active-link-xml.XML');
      with this one:
      import('org.active-link.xml.XML');

      5. You can delete the old verison of ActiveLink (lib/active-link-xml) if you want.

      On the paragraph matter, I'm not sure to understand the problem. Maybe you want to try something like this:

      <?php
      require_once('../lib/include.php');
      import('phpdocwriter.pdw_document');

      $sxw = new pdw_document;
      $sxw->SetLanguage('en','EN');
      $sxw->SetStdFont ('Times New Roman',10);
      $sxw->AddParaDef(array(
                          'name' => 'para1',
                          'indent' => 1.5,
                          'align' => 'justify',
                          'font' => array(
                                          'family' => 'Arial',
                                          'size' => 16
                                          )
                      ));

      $sxw->SetParagraph('para1');
      $sxw->SetFont(array('size' => 20, 'style' => 'B'));
      $sxw->Write('First three words ');
      $sxw->SetStdFont();
      $sxw->Write('of a justified paragraph with a normal font...');

      $sxw->Output();
      ?>

      When you set a font, you always do it inside a paragraph (by default on a paragraph called 'Standard').

      One problem not solved yet is that you can't override the paragraph font properties, if you define a paragraph with italic fonts, you can change some properties of the paragraph's font when you call SetFont(), but italics can't be disabled.
      Maybe in the future.

      Regards.

       
    • Nobody/Anonymous

      That did the trick!  Thanks.  I also played around with the mixed fonts in a justified paragraph and it appears to work exactly as I need it.  I'll stop bugging you, now that I have enough working for me to explore and learn.

      If you're currious, I have developed a web-based Case Management System for Prosecuting Attorneys.  One feature is the ability to generate legal documents (Complaints, Summons, Subpoenas, etc).  They like to bold the first few words of some paragraphs.

      I have been using the fpdf class to generate pdf files on the fly, which works very well.  However, fpdf does allow mixed fonts (bold, normal) if you want the paragraph justified.  The other downside to pdf is that the client can't edit the document.  Thats good in some cases, but I want the flexibility.

      themis.highcorral.com

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.