How is your experience with the OutSystems Community?
27
Views
3
Comments
[Ultimate PDF] UltimatePDF - Issues with generating PDF
ultimate-pdf
Reactive icon
Forge asset by Leonardo Fernandes
Application Type
Reactive

Context 

We currently use WKHTMLTOPDF as our HTML-to-PDF conversion service across a large number of applications. 

We are planning to replace it and standardize PDF generation using Ultimate PDF.

During this transition, we identified two issues that are currently blocking some of our use cases.

Issue #1: PDF generation is reported as successful even when the target URL returns an error 

Context 

When the target URL returns an error,  Ultimate PDF still generates a PDF containing the resulting error page. 

From the caller's perspective, the operation appears to have completed successfully. 

This prevents our service from: 

  • Identifying failed page executions. 
  • Implementing alternative flows, such as retries. 
  • Distinguishing between a successful conversion and a PDF containing an error page. 

Possible approach 

Ideally, the conversion result should provide information about whether the target page was successfully retrieved. 

For example: 

  • An additional output attribute indicating whether the page was successfully retrieved. 
  • The HTTP response status code could also be exposed (e.g., 200 OK, 404 Not Found, 500 Internal Server Error).
  • The PDF could still be generated in error scenarios, since it may be useful for troubleshooting, testing, or evidence purposes. 


Issue #2: Absolute URLs are sometimes converted into relative URLs 

Context 

In some cases, an absolute URL provided to Ultimate PDF is converted into a relative URL. 

As a result, the conversion request uses the module zone URL as its base URL. 

This creates two problems: 

  • Our wrapper/service already manages load distribution for the printing service. 
  • Some use cases require the HTML to be retrieved from a specific server due to technical constraints. Otherwise, errors may occur, such as the scenario described in Issue #1. 

Possible approach 

We need the URL provided to Ultimate PDF to be respected, allowing the calling service to retain full control over the target endpoint. 

The expected behavior would be: 

  • If an absolute URL is provided: 
    • The URL should be used exactly as provided. 
    • No automatic URL conversion or base URL replacement should occur. 
  • If a relative URL is provided: 
    • Using the module zone URL as the base URL is acceptable. 
    • In this scenario, the current automatic resolution logic makes sense. 

This would allow the printing service to respect the conditions provided by the caller while preserving the existing behavior for relative URLs.


Thanks for your attencion

UserImage.jpg
Niteesh yadav

Hi,

Both points are valid and are not supported by Ultimate PDF today as far as I know, so I’d raise them as feature requests.

Issue #1 (success reported on error pages)

  • Requested: Return a “page retrieved” flag and the HTTP status code, while still generating the PDF for troubleshooting.
  • Workaround: Fetch the URL in your wrapper first and check the status. If it isn’t 2xx, trigger your retry flow.
  • Or try to raise a exception if any error occurs since there is no need of generating a pdf of error page

Issue #2 (absolute URL converted to relative)

  • Requested: Use absolute URLs exactly as given, and apply the module zone base URL only to relative URLs.
2021-05-05 15-09-18
Diogo Sousa

Hello 

Thanks for the clarification. How can I track the status of these feature requests? Is there a public issue, roadmap, or other place where I can follow their progress? These developments are important for us, as they would address limitations that are currently impacting our use of Ultimate PDF.


2021-05-05 15-09-18
Diogo Sousa

Hi,

I’d like to follow up on this request, as we haven’t received any feedback yet.

Could you please provide an update on how we can track these feature requests and their current status?

Both improvements are important for us and have a direct impact on our use of Ultimate PDF, so having visibility into whether they are planned and their progress would be very helpful.

Thank you.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.