yan74 / afplib

JAVA Library for reading & writing AFP (Advanced Function Presentation) Files.
Apache License 2.0
37 stars 22 forks source link

No an Issue : Looking for a snippet draws lines in AFP files? #11

Closed harimurra closed 7 years ago

harimurra commented 7 years ago

Hi Yan, Is there a reference to create a sample AFP file with Lines or table?

yan74 commented 7 years ago

I think you provided one at #6, @harimurra ?

harimurra commented 7 years ago

Yes Yan, Thank you.

yan74 commented 7 years ago

Thank you for providing the sample 👍

harimurra commented 7 years ago

Hi Yan,

is there any reference code to change font size ?

yan74 commented 7 years ago

This depends on font technology being used:

  1. If this is a raster font the font specifies the size - you would have to choose a different font in the same family having the desired size.
  2. If this is a ttf font the MDR mapping the font to a local identifier has a DataObjectFontIdentifier triplet. The parameter VFS determines the size of the font in that case.
  3. If the font is a type 1 font the MCF mapping the font to a local identifier has a FontDescriptorSpecification triplet. The parameter FtHeight specifies the size of the font.

But no I don't have a code sample for this - but changing the font size would be finding the appropriate triplet and change the parameter mentioned above.

harimurra commented 7 years ago

Thanks Yan, FontDescriptorSpecification is working fine. .withMember(new AfpBuilder() .with(AfplibPackage.FONT_DESCRIPTOR_SPECIFICATION__FT_HEIGHT, 250) .create(FontDescriptorSpecification.class))