Welcome, Guest
Username: Password: Remember me
Components and Libraries for Documents Development, discussions, problems and suggestions
  • Page:
  • 1

TOPIC:

Some additions to the package fpvectorial 1 year 3 weeks ago #16274

  • Roman
  • Roman's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 51
  • Thank you received: 0
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:

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

Last edit: by Roman.

Some additions to the package fpvectorial 1 year 3 weeks ago #16275

  • Sternas Stefanos
  • Sternas Stefanos's Avatar
  • Offline
  • Moderator
  • Moderator
  • Ex Pilot, M.Sc, Ph.D
  • Posts: 4426
  • Thank you received: 1072
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.

  • Page:
  • 1