mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-14 15:39:20 +02:00
fpvectorial: Add new pdf writer to package. Modify fpvTextWriteTest demo to support pdfwriter.
This commit is contained in:
parent
4a653549e1
commit
24e996ddef
@ -1,15 +1,15 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<CONFIG>
|
<CONFIG>
|
||||||
<ProjectOptions>
|
<ProjectOptions>
|
||||||
<Version Value="9"/>
|
<Version Value="12"/>
|
||||||
<PathDelim Value="\"/>
|
<PathDelim Value="\"/>
|
||||||
<General>
|
<General>
|
||||||
<Flags>
|
<Flags>
|
||||||
<MainUnitHasCreateFormStatements Value="False"/>
|
<MainUnitHasCreateFormStatements Value="False"/>
|
||||||
<MainUnitHasTitleStatement Value="False"/>
|
<MainUnitHasTitleStatement Value="False"/>
|
||||||
|
<CompatibilityMode Value="True"/>
|
||||||
</Flags>
|
</Flags>
|
||||||
<SessionStorage Value="InProjectDir"/>
|
<SessionStorage Value="InProjectDir"/>
|
||||||
<MainUnit Value="0"/>
|
|
||||||
<Title Value="fpvtextwritetest"/>
|
<Title Value="fpvtextwritetest"/>
|
||||||
<ResourceType Value="res"/>
|
<ResourceType Value="res"/>
|
||||||
<UseXPManifest Value="True"/>
|
<UseXPManifest Value="True"/>
|
||||||
@ -17,21 +17,17 @@
|
|||||||
<i18n>
|
<i18n>
|
||||||
<EnableI18N LFM="False"/>
|
<EnableI18N LFM="False"/>
|
||||||
</i18n>
|
</i18n>
|
||||||
<VersionInfo>
|
|
||||||
<StringTable ProductVersion=""/>
|
|
||||||
</VersionInfo>
|
|
||||||
<BuildModes Count="1">
|
<BuildModes Count="1">
|
||||||
<Item1 Name="default" Default="True"/>
|
<Item1 Name="default" Default="True"/>
|
||||||
</BuildModes>
|
</BuildModes>
|
||||||
<PublishOptions>
|
<PublishOptions>
|
||||||
<Version Value="2"/>
|
<Version Value="2"/>
|
||||||
<IncludeFileFilter Value="*.(pas|pp|inc|lfm|lpr|lrs|lpi|lpk|sh|xml)"/>
|
|
||||||
<ExcludeFileFilter Value="*.(bak|ppu|ppw|o|so);*~;backup"/>
|
|
||||||
</PublishOptions>
|
</PublishOptions>
|
||||||
<RunParams>
|
<RunParams>
|
||||||
<local>
|
<FormatVersion Value="2"/>
|
||||||
<FormatVersion Value="1"/>
|
<Modes Count="1">
|
||||||
</local>
|
<Mode0 Name="default"/>
|
||||||
|
</Modes>
|
||||||
</RunParams>
|
</RunParams>
|
||||||
<RequiredPackages Count="1">
|
<RequiredPackages Count="1">
|
||||||
<Item1>
|
<Item1>
|
||||||
@ -43,7 +39,6 @@
|
|||||||
<Unit0>
|
<Unit0>
|
||||||
<Filename Value="fpvtextwritetest.pas"/>
|
<Filename Value="fpvtextwritetest.pas"/>
|
||||||
<IsPartOfProject Value="True"/>
|
<IsPartOfProject Value="True"/>
|
||||||
<UnitName Value="fpvtextwritetest"/>
|
|
||||||
</Unit0>
|
</Unit0>
|
||||||
</Units>
|
</Units>
|
||||||
</ProjectOptions>
|
</ProjectOptions>
|
||||||
@ -57,12 +52,11 @@
|
|||||||
<IncludeFiles Value="$(ProjOutDir)"/>
|
<IncludeFiles Value="$(ProjOutDir)"/>
|
||||||
<UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/>
|
<UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/>
|
||||||
</SearchPaths>
|
</SearchPaths>
|
||||||
<Other>
|
<Linking>
|
||||||
<CompilerMessages>
|
<Debugging>
|
||||||
<UseMsgFile Value="True"/>
|
<DebugInfoType Value="dsDwarf3"/>
|
||||||
</CompilerMessages>
|
</Debugging>
|
||||||
<CompilerPath Value="$(CompPath)"/>
|
</Linking>
|
||||||
</Other>
|
|
||||||
</CompilerOptions>
|
</CompilerOptions>
|
||||||
<Debugging>
|
<Debugging>
|
||||||
<Exceptions Count="3">
|
<Exceptions Count="3">
|
||||||
|
@ -9,8 +9,13 @@ program fpvtextwritetest;
|
|||||||
|
|
||||||
{$mode objfpc}{$H+}
|
{$mode objfpc}{$H+}
|
||||||
|
|
||||||
|
{$define pdf_test}
|
||||||
|
|
||||||
uses
|
uses
|
||||||
fpvectorial, odtvectorialwriter, docxvectorialwriter, fpvutils;
|
fpvectorial,
|
||||||
|
odtvectorialwriter, docxvectorialwriter,
|
||||||
|
{$ifdef pdf_test} pdfvectorialwriter, {$endif}
|
||||||
|
fpvutils;
|
||||||
|
|
||||||
{$R *.res}
|
{$R *.res}
|
||||||
|
|
||||||
@ -58,6 +63,7 @@ begin
|
|||||||
CurParagraph.Style := Vec.StyleTextBody;
|
CurParagraph.Style := Vec.StyleTextBody;
|
||||||
// Lazarus provides a highly visual development environment for the creation of rich user interfaces, application logic, and other supporting code artifacts. Along with the customary project management features, the Lazarus IDE also provides features that includes but are not limited to:
|
// Lazarus provides a highly visual development environment for the creation of rich user interfaces, application logic, and other supporting code artifacts. Along with the customary project management features, the Lazarus IDE also provides features that includes but are not limited to:
|
||||||
|
|
||||||
|
{$ifndef pdf_test}
|
||||||
CurList := Page.AddList();
|
CurList := Page.AddList();
|
||||||
CurList.ListStyle := Vec.StyleBulletList;
|
CurList.ListStyle := Vec.StyleBulletList;
|
||||||
CurList.Style := Vec.StyleTextBody;
|
CurList.Style := Vec.StyleTextBody;
|
||||||
@ -74,9 +80,13 @@ begin
|
|||||||
CurList.AddParagraph('Text resource manager for internationalization');
|
CurList.AddParagraph('Text resource manager for internationalization');
|
||||||
CurList.AddParagraph('Automatic code formatting');
|
CurList.AddParagraph('Automatic code formatting');
|
||||||
CurList.AddParagraph('The ability to create custom components');
|
CurList.AddParagraph('The ability to create custom components');
|
||||||
|
{$endif}
|
||||||
|
|
||||||
Vec.WriteToFile('text_output.odt', vfODT);
|
Vec.WriteToFile('text_output.odt', vfODT);
|
||||||
Vec.WriteToFile('text_output.docx', vfDOCX);
|
Vec.WriteToFile('text_output.docx', vfDOCX);
|
||||||
|
{$ifdef pdf_test}
|
||||||
|
Vec.WriteToFile('text_output.pdf', vfPDF);
|
||||||
|
{$endif}
|
||||||
finally
|
finally
|
||||||
Vec.Free;
|
Vec.Free;
|
||||||
end;
|
end;
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<CONFIG>
|
<CONFIG>
|
||||||
<Package Version="4">
|
<Package Version="5">
|
||||||
<Name Value="fpvectorialpkg"/>
|
<Name Value="fpvectorialpkg"/>
|
||||||
<AddToProjectUsesSection Value="True"/>
|
<AddToProjectUsesSection Value="True"/>
|
||||||
<CompilerOptions>
|
<CompilerOptions>
|
||||||
@ -8,8 +8,13 @@
|
|||||||
<SearchPaths>
|
<SearchPaths>
|
||||||
<UnitOutputDirectory Value="lib/$(TargetCPU)-$(TargetOS)"/>
|
<UnitOutputDirectory Value="lib/$(TargetCPU)-$(TargetOS)"/>
|
||||||
</SearchPaths>
|
</SearchPaths>
|
||||||
|
<Other>
|
||||||
|
<ConfigFile>
|
||||||
|
<WriteConfigFilePath Value="$(PkgOutDir)/fpclaz.cfg"/>
|
||||||
|
</ConfigFile>
|
||||||
|
</Other>
|
||||||
</CompilerOptions>
|
</CompilerOptions>
|
||||||
<Files Count="26">
|
<Files Count="27">
|
||||||
<Item1>
|
<Item1>
|
||||||
<Filename Value="fpvectorial.pas"/>
|
<Filename Value="fpvectorial.pas"/>
|
||||||
<UnitName Value="fpvectorial"/>
|
<UnitName Value="fpvectorial"/>
|
||||||
@ -114,7 +119,12 @@
|
|||||||
<Filename Value="fpvectorial2canvas.pas"/>
|
<Filename Value="fpvectorial2canvas.pas"/>
|
||||||
<UnitName Value="fpvectorial2canvas"/>
|
<UnitName Value="fpvectorial2canvas"/>
|
||||||
</Item26>
|
</Item26>
|
||||||
|
<Item27>
|
||||||
|
<Filename Value="pdfvectorialwriter.pas"/>
|
||||||
|
<UnitName Value="pdfvectorialwriter"/>
|
||||||
|
</Item27>
|
||||||
</Files>
|
</Files>
|
||||||
|
<CompatibilityMode Value="True"/>
|
||||||
<RequiredPkgs Count="2">
|
<RequiredPkgs Count="2">
|
||||||
<Item1>
|
<Item1>
|
||||||
<PackageName Value="LCL"/>
|
<PackageName Value="LCL"/>
|
||||||
|
@ -15,7 +15,7 @@ uses
|
|||||||
rawvectorialreadwrite, svgvectorialreader_rsvg, svgvectorialwriter,
|
rawvectorialreadwrite, svgvectorialreader_rsvg, svgvectorialwriter,
|
||||||
svgzvectorialreader, odtvectorialwriter, docxvectorialwriter,
|
svgzvectorialreader, odtvectorialwriter, docxvectorialwriter,
|
||||||
htmlvectorialreader, svgvectorialreader, fpvWMF, wmfvectorialreader,
|
htmlvectorialreader, svgvectorialreader, fpvWMF, wmfvectorialreader,
|
||||||
wmfvectorialwriter, fpvectorial2canvas;
|
wmfvectorialwriter, fpvectorial2canvas, pdfvectorialwriter;
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user