Download and Show a PDF from the Internet
This section covers how to load a PDF from the internet an display it inside of UMG in a UImage
widget.
1. Create the Widget
Start by creating a widget blueprints. Right click in the content browser and select User Interface
> Widget Blueprint
.
Give a name to the newly created widget.
Double click on the widget to open the Widget Editor, and add an image inside the widget. This image will render the PDF page.
In the details panel, rename the image and mark is as Is Variable
.
2. Render the PDF
Open the blueprint graph of the widget and add the following code. This code loads the document, gets its first page and renders it to a texture. The texture is then passed to the image created previously to be rendered.
This code loads the PDF and renders the first page at resolution 1080x1920
(portrait of 16:9). If the rendered document is too blurry, this value can be increased.

3. Add the Widget to Screen
Now that the widget is ready, we can add it to the screen. Start by opening the Level Blueprint.
And add the following code to add our widget to the screen when the level starts.
