09-15-2020 05:36 AM
Hello again
This time i'm trying to create a PDF report. On my computer i have full office licence and it works without a problem, however the application is meant for computers which don't always have licences installed.
In both cases i used the examples provided (LabVIEW PDF Reports), but on a computer without a licence it gets stuck, because word opens with "Install licence" warning. Manually i can bypass this warning and save as PDF, but VI itself can't do that so it fails.
Since word licence seemed to be a problem i then tried to create an HTML report and save it as PDF using print to pdf function, but it also failed. This time no error was given, but a "Pick an account to sign in with" screen showed up.
Is there any way to create a report and save it to PDF without word licence or is Microsoft just so stuck up with their licences that it's impossible?
Solved! Go to Solution.
09-15-2020 05:40 AM
https://www.carya.nl/products/pfd-toolkit-labview/
But you'll have to start over with the report generation code.
09-17-2020 04:40 AM
Not exactly what i had in mind but upon further googling i found out you can't use RGT without word licence, so it's the next best thing.
I also found this thread, where there are some other possible solutions.
Thank you for your help, it's a very nice tool from what i tried it 🙂
09-17-2020 06:17 AM
Thanks!
At some point I might make a RGT Child, so the RGT can be used to make PDF Toolkit PDF's.
09-17-2020 06:30 AM
I guess one solution would be to create a HTML-report and use Print to PDF. You should have some Virtual printer per default, or you'll have to install some PDF-writer.
09-17-2020 08:09 AM
@Yamaeda i tried that and got the second error "sign in your microsoft account" thing.
09-17-2020 08:14 AM
All the examples seem to work for me, however i can't get it to work with my picture.
I used example code and just modified to take front panel picture of a VI i'm using.
The picture is drawn in labview so i know that works ok, but for some reason the PDF just comes out blank (teal rectangle from example is still drawn). When opening pdf i also sometimes get an error that "something is wrong".
Any advice on what i'm doing wrong?
Block diagram:
Front panel:
09-17-2020 08:41 AM
PDF Insert Picture Control.vi is very tricky. There's not really a way to get all the information from LabVIEW or the control to replicate it. This is a very indirect way to embed an image. Not sure why it wouldn't work though.
Can you try PDF Insert Pixmap.vi or PDF Insert Pixmap As JPG.vi instead?
Also, PDF Get Toolkit Info returns a version. Can you check it? It should be at least V2.1.
09-18-2020 02:02 AM
The version is v2.1b10.
I could not get the insert picture to work, but insert pixmap and insert pixmap as jpg did work. You need to specify the size of image or it doesn't work tho.
Scaling images to shrink to A4 page returns kind of crappy results, but that's on Labview.
Thanks for your help again 🙂
Ps.: attaching the VI from which i tried to capture front panel, to capture it i just used default example for insert picture with dimensions changed a bit.
09-18-2020 02:30 AM
Insert functions need a size, or it will add the images, but not make them visible.
This is useful if you want to add an image more then once. The image is added, and you can get it's name, and then add the name more then once. This prevents adding the binary data of the image each time.
The attach functions might work better for. It's probably more like the RGT. Each attach function simply adds to the page, and (optionally) proceeds to the next page if it doesn't fit. Less control, so that's why the insert functions are there. You can insert stuff, and attached text will wrap around it.
You can scale up the LabVIEW image (or a copy of it) before getting an image to get a higher resolution.
There's an example on adding a graph as vector graph. It's not too hard to adapt to specific graphs. It's near impossible to provide all functionality as a sub VI. That's why it's in examples. Depending on the data, this might shrink or grow your PDF size dramatically. The image will always be X*Y, the data can be anything from 0 to Inf samples...