NI Linux Real-Time Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

I want to fill out PDF forms on the target

Solved!
Go to solution

I have need to fill out a PDF form (or equivalent) from the command line. I have found several tools that work well, but it seems they all require x11 based systems or java. The two with the most promise are http://flpsed.org/flpsed.html and https://www.pdflabs.com/tools/pdftk-server/ but the ./configure files error out.

 

PDFtk fails at java_lib.o (Yikes)

 

flpsed requires fltk and when installing fltk it fails at "checking for X... "

 

A little investigation says that it requires X11

FLTK (pronounced "fulltick") is a cross-platform C++ GUI toolkit for UNIX®/Linux® (X11),

Am I going to run into a dead end here because I'm on a armv7 architecture and that is not a X11 based system?

 

Anyone have any suggestions as to how I can fill out a form and save to a pdf in the Linux environment? I have plenty of solutions in Windows, but I am trying to move all these tasks to the linux environment. At this point I'd like to stick with the armv7 because of cost. I have a 64-bit Linux controller for testing. I am going to see if I can get these tools to work in that environment.

 

 

Doug Ferguson

www.southerndaqsolutions.com
0 Kudos
Message 1 of 2
(2,480 Views)
Solution
Accepted by topic author DougFerguson

Hi Doug,

 

From a cursory search, there doesn't appear to be a package that can manipulate PDFs without X, like you pointed out. The initial thought was to use LaTeX, but it is not included in the layers that we pull in. Plus, you cannot edit existing PDFs with it (so it looks like it does not fit your use case). However, it could be a useful tool if you wanted to create a PDF without UI on the target. 

 

 That does not leave many options, but the steps below may work. This has not been tested by NI and is outside of the scope of NI support.

 

  1. Setup OpenEmbedded (OE) following the instructions on github
    • MACHINE=xilinx-zynq and DISTRO=nilrt when running nibb.sh
  2. Do a test build for MACHINE=xilinx-zynq. Perhaps use the niconsole-image to make sure that things work for you (you're using a distro that's not too old, not too new)?
  3. Once you've successfully built, it's time to introduce x11 to the DISTRO_FEATURES variable, which we have for x64
  4. Now, you have two paths, each has pros and cons
    1. Build the xserver-xorg package and either
      1. Setup a local feed (bitbake package-index and setup a local http server to serve that up) OR
      2. Manually copy over the packages needed to the controller
        • Start with, say, libxorg_*-dev.ipk (since they're trying to build a component, they'll need the headers and linking libraries), try to install that, see what it complains about, repeat until you can install
    2. Build the niconsole-image image recipe (per the instructions), making the needed changes to the image to make sure it's bootable
      • As noted in the instructions, the "whole image" approach means you are not running NI software on the target, if you do run NI software it will not be in an NI supported fashion:(e.g. VIs will not run, MAX will not communicate with the target).

 

Andy 

Product Support Engineer

0 Kudos
Message 2 of 2
(2,444 Views)