get_pdf#
Type: Subscription | Auth Required: Yes
Generates a full load zone PDF report over a WebSocket connection (GraphQL subscriptions via graphql-ws). The server streams progress updates; the final message contains the base64-encoded PDF and a suggested filename.
WebSocket Endpoint:
wss://api-gateway.dlubal.com/geo-zone/pub/graphql
import base64
from dlubal.api.geo_zone_tool import GeoZoneTool, Language
gzt = GeoZoneTool(token="YOUR_TOKEN")
# Stream progress updates
for progress in gzt.get_load_zone_pdf(
address="Munich, Germany",
standard="EN 1991-1-3",
annex="Germany",
layer_id=1,
language=Language.EN,
):
print(f"Step {progress.current_step}/{progress.steps}: {progress.message}")
# Or get the final PDF result directly
result = gzt.get_load_zone_pdf_result(
address="Munich, Germany",
standard="EN 1991-1-3",
annex="Germany",
layer_id=1,
language=Language.EN,
)
if result:
with open(result.name, "wb") as f:
f.write(base64.b64decode(result.pdf))
print(f"Saved: {result.name}")
using Dlubal.API.GeoZoneTool;
var gzt = new GeoZoneToolClient("YOUR_TOKEN");
// Stream progress updates
await foreach (var progress in gzt.GetLoadZonePdfAsync(
address: "Munich, Germany",
standard: "EN 1991-1-3",
annex: "Germany",
layerId: 1,
language: Language.En))
{
Console.WriteLine($"Step {progress.CurrentStep}/{progress.Steps}: {progress.Message}");
if (progress.PdfResult is not null)
{
var bytes = Convert.FromBase64String(progress.PdfResult.Pdf);
await File.WriteAllBytesAsync(progress.PdfResult.Name, bytes);
Console.WriteLine($"Saved: {progress.PdfResult.Name}");
}
}
subscription {
getPdf(
pdfInput: {
address: "Munich, Germany"
standard: "EN 1991-1-3"
annex: "Germany"
layerId: 1
}
language: EN
) {
currentStep
steps
message
pdfResult { pdf name }
}
}
Input#
Parameter |
Type |
Required |
Description |
|---|---|---|---|
|
str |
Yes |
Free-text address or place name |
|
str |
Yes |
Standard name filter |
|
str |
Yes |
Annex filter |
|
int |
Yes |
Layer ID |
|
Language |
No |
Response language (default EN) |
Response#
Streams PdfProgressType messages. The final message includes pdf_result with the base64-encoded PDF and suggested filename.