I tried to use the PDF Extension as this functionality is exactly what my key user is asking for. Unfortunately it is not working well for me, please refer to the attached files:
- TimeReport_20210127_4.pdf is the output of the CreatePDF function
- TimeReport_20210127.png is an actual screenshot
As you can see the box is printing well but the chart and the grid are missing. Perhaps important is that both elements are Extensions, the Grid is the Grid-Advanced and the Time Series Chart is a fork of myself from the Time Series Chart of originally Thingworx 8.3.
What I have tried so far:
I am very certain my URL is correct because I can just copy+paste it to the browser and it shows up for me in all its incomplete ugliness.
Our Thingworx version is 8.4.4 and I am using Chrome 87.0.4280.88 if that makes any difference.
I am aware this Extension is not officially supported and perhaps even deprecated but I have not found any replacement and as said above, it would suite very well to our use case.
I have seen several topics in the community but non of the suggested solutions helped me. Perhaps @vrosu sees this and is able to help me out here.
After looking at what you tried, I don't have other suggestions. The delay would be the first thing I would try to modify. I haven't seen until now incomplete renderings.
I suggest the following:
-trying to recompile the extension with the latest jBrowserDriver & selenium libraries.
-trying to setup your screen resolution exactly to the default of the extension (1366x768) and then trying to access the page manually to check if it's rendering correctly (even if I see you tried to set it manually to FHD in the extension, maybe it's something wrong with that option in my code)
Hi @VladimirRosu and thank you very much for your reply.
Concerning your suggestions:
- Unfortunately I don't have the setup to compile the Extension myself. I took the zip file that came along with the github download in the build folder. But I will try to find a way to achieve this.
- I tested a lot with different resolutions, including using the default resolution and accessing the page with all kind of different resolutions. I will keep testing here but have little hope to find something here.
Thanks again, I will keep you posted.
If you download that github repository where you downloaded the importable extension, you will have your source code. I added it there especially for cases like this, when the users require small modifications.
However, that requires also some small Java knowledge, in the sense of using Eclipse - not sure if that's something in your arsenal.
I think I have found something.
For my mashup I used the "new" responsive design (named Responsive Advanced in Thingworx 8.4) which is built on flex containers as far as I can see. This seems to cause the issue. I built a small test mashup with the "old" responsive design (and Layout widget) and the chart shows up without any issues.
While this is good to know it does not solve my issue. I don't have a working dev environment like Eclipse to recompile the Extension as you suggested. I contacted a co-worker to support me but this may take days - if he can help me at all.
Assuming I am right, is there something else I can try besides recompiling or changing the mashup design?
Not that much, unfortunately
The jBrowserDriver library I use completely encapsulates (for our purposes) the rendering in the in-memory browser, so, nothing comes in my mind regarding possible things to do.
Just that recompilation with the latest libraries.
I got one step forward.
The new responsive design by default uses Flex Height/Width 0 but takes all remaining space if available. At least this is my understanding so far, I just started using the new design. When setting the size to a static value like 500 it works.
This is in best case a workaround but still not a solution. I will keep trying but perhaps you or someone else has an idea on how to handle the flex containers in the Extension.
Hi @VladimirRosu ,
I am using my workaround (static flex container sizes) and while it's not optimal it might be sufficient, I need to confirm with end users.
Next topic that came up: The output is a little blurry, you can see that in my original post attachment. The text is barely readable.
Is this a known issue? I tested this DebugUsefontconfig but it makes no difference for me.
Hi @VladimirRosu ,
sorry to bother you again.
My first issue is under control (so far) with setting a constant size.
But I am still struggeling with the second issue, the blurry result. As if the page has been photocopied with lost focus or anything. Is this known, am I doing something wrong?
Hi @slangley ,
I will take this into consideration. I also still have the chance to compile the extension myself but I would need a dev environment.
Thanks for the pointer.