× Components and Libraries for Documents Development, discussions, problems and suggestions

Important Some additions to the package fpvectorial

  • Roman
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
2 weeks 2 days ago - 2 weeks 2 days ago #16274 by Roman
I made small changes to the package for generating documents in the DOCX format:
  • Added Images partially support (only from file, only from PNG, only to Paragraph, no positioning, no effects and scale, cannot add two or more identical image files)
  • Added support Images in Header/Footer
  • Fixed the text of the first tag of the document <w:document xmlns:r= ....
  • Minor additions to paragraph styles, etc.
Summary: The main code uses a terrible implementation of the document format :(
My code is messy too...

The changes affected only two files:
fpvectorial.pas
docxvectorialwriter.pas

 

File Attachment:

File Name: fpvectoria...nges.zip
File Size:81 KB


Simple example:
  with TvVectorialDocument.Create do begin
    with AddTextPageSequence do begin
      with Header.AddParagraph do begin
        AddPngImage.FileName := 'test1.png';
        AddText('Header text');
      end;
      with Footer.AddParagraph do begin
        AddPngImage.FileName := 'test2.png';
        AddText('Footer text');
      end;
      AddParagraph.AddText('Body text.');
    end;
    WriteToFile('demo.docx', vfDOCX);
    Free;
  end;  
Attachments:
Last edit: 2 weeks 2 days ago by Roman.

Please Log in or Create an account to join the conversation.

  • Sternas Stefanos
  • Sternas Stefanos's Avatar
  • Away
  • Moderator
  • Moderator
  • Ex Pilot, M.Sc, Ph.D
More
2 weeks 1 day ago #16275 by Sternas Stefanos
Replied by Sternas Stefanos on topic Some additions to the package fpvectorial
Thanks Sir
We will test and add to LAB CT your code

PilotLogic Architect and Core Programmer

Please Log in or Create an account to join the conversation.