how to fill a page with tex


I have a variable with text. There is a book. how to fill a page with text. I need to insert only that part of the text from the variable that will fit on the page. how to do it?

First you want to watch this:

This is what you need.
Then you need method for getting preformatted text in bulk (that is not reading it all from some variables in blueprints). Because in bigger, complicated or with C++ code parts, blueprints sometimes happily reset variables. So you need something solid that stores all that text.

Clarification, for now (development) it is perfectly fine to store some text like:

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.
Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

However for real game text you need something like JSON, CSV, or just plain text loaded from file. Look in fab.com or maybe default plugins that can do this.

ps.
There is something you may want:

Or make tiny C++ code that uses: *FFileHelper::LoadFileToString(OutString, FilePath);

#pragma once

#include "Kismet/BlueprintFunctionLibrary.h"
#include "BlueprintFileLibrary.generated.h"

UCLASS()
class YOURPROJECT_API UBlueprintFileLibrary : public UBlueprintFunctionLibrary
{
    GENERATED_BODY()

public:
    UFUNCTION(BlueprintCallable, Category = "File IO")
    static bool LoadTextFileToString(const FString& FilePath, FString& OutString);
};
#include "BlueprintFileLibrary.h"
#include "Misc/FileHelper.h"
#include "HAL/PlatformFilemanager.h"

bool UBlueprintFileLibrary::LoadTextFileToString(const FString& FilePath, FString& OutString)
{
    return FFileHelper::LoadFileToString(OutString, *FilePath);
}