Understanding PDFBox jar files - pdfbox

I am attempting to install PDFBox on my system in order to create PDF files, but am unsure which jar files I need. If I go to https://pdfbox.apache.org/download.cgi
I see command line tools as follows:
pdfbox-app (9.1MB)
preflight-app (9.2MB)
debugger-app (9.0MB)
I also see "Libraries of each subproject" as follows:
pdfbox (2.6MB)
fontbox (1.6MB)
preflight (248KB)
xmpbox (132KB)
pdfbox-tools (77KB)
pdfbox-debugger (245KB)
What is meant by "each subproject"? Is it talking about the command line tools or something different?
I am planning to use java from the command line rather than in an IDE. Does this mean that I just need the Command line tools or do I need the "Libraries of each Subproject" as well? What does the "-app" indicated in the command line tools vs the related libraries?
Is there a page on apache.org that mentions the differences between all of these?
To create PDF files should I be using the preflight and debugger files as well or are those optional?

Summarizing the comments: you want to create a PDF from scratch and access your development over ssh so you can't use an IDE and have to use javac. For that you could use pdfbox-app jar file, but this would be huge. Instead, use the pdfbox, fontbox and commons-log jar files. See also here for additional dependencies if you want to do more advanced stuff (read / render (= convert to image) / decrypt / sign).

Related

Change options of already used latex package with doxygen

I'm using cmake with doxygen to generate documentation based on some markdown files. There are some special characters in those markdown files that I can't control (add by users and I just run my script). I found a solution by using the option utf8x instead of just utf8 with the inputenc package and use ucs package as well.
So, I added the following line into CMakeLists.txt file:
set(DOXYGEN_EXTRA_PACKAGES ucs "[utf8x]{inputenc}")
Which lead to having the following lines in refman.tex file:
% Packages requested by user
\usepackage{ucs}
\usepackage[utf8x]{inputenc}
The problem is, there is already \usepackage[utf8]{inputenc} in the file which lead to an error on generating the pdf file using make pdf.
I can solve that by have a special bash/python script that replaces \usepackage[utf8]{inputenc} with whatever I want, but it seems strange to me that there is no way to make doxygen replaces/removes aready used packages as there is already EXTRA_PACKAGES which can be used to add extra packages.

How to format markdown and all code in it?

I have a bunch of markdown files in my github repo. As there are many members in the team, the syntax of markdown and code in markdown files are hard to be standardised.
What I want is:
Create a github action that modify those files automatically when there is a push.
I can't find a markdown prettifier that format the code as well. (e.g. putting spaces around '=')
The solutions that I can think out of are:
Use a CLI tool that can do all the stuff
Use a tool for markdown, use a script to filter all code in it and parse it to anther tool
Send http requests to those online prettifier if such CLI tools do not exist
Note: I have Java, Cpp, Swift and more in my markdown.
Any solution for this? I will be appreciated if the script could be provided (if needed).
Thanks.
If those markdown files are located in a java project, you may try spotless.
For example, if you have a maven project, with spotless, just run mvn spotless:apply, it could fix all the styles / formatting issues of your markdown files automatically.

Where I can find Batch... jsx file (Photoshop standard script)

I need to find Batch... jsx file script that is standard script in photoshop. I know, all script are in Scripts folder, I see Image Processor there. But cannot find Batch... .jsx file.
I believe what you're looking for are two scripts, "CSX-1_3.jsx" and the library it uses, "stdlib.js" - but it depends on which version of PS you're using. The old location used to be in the /Presets/Scripts/ directory.

Tool to generate CHM and PDF documentation from Markdown on Windows

Is there a tool that generates both PDF and CHM documentation from Markdown (or similar, such as RST) on Windows.
We are currently using Sphinx, but have been unable to get the PDF generation working on Windows (this guy has the same issue). It's a pain to have to generate the CHM on Windows and the PDF version on Linux (and I do need to generate both versions).
Is there an alternative tool (free or inexpensive commercial) that could do this task?
The source format must be in a plain-text-like format for version control, of which Markdown and RST are examples.
The Free Pascal distribution holds a CHM compiler called chmcmd. Some people with documentation tools report success with it (like the Preshrunk-cotton python package)
Some Linux distros also pack the chm compiler independently from the main FPC distribution. (since it only is a 700k binary without dependencies).
On Windows you can use the same (the windows version of chmcmd), or Microsoft Help Workshop, the default CHM generator from MS.
That's the CHM compiler part, now the input:
A CHM project before compilation is basically just html with a couple of XML indexes (TOC and master keyword based index) and a project file that is an INI file.
Usually the HTML generator backend of a documentation tool is tweaked to generate it as a special case. From what I read in your "this guy" link, sphinx can do that.
I was able to fulfil this need using Sphinx after all. I used MiKTeX to generate the PDF on Windows.
Install MiKTeX (< 200mb)
wget -nv -N http://mirrors.ctan.org/systems/win32/miktex/setup/miktex-portable-2.9.4757.exe
7z.exe x -y miktex-portable-2.9.4757.exe -o"miktex"
Add the bin directory to your path
SET Path=%Path%;%CD%\miktex\miktex\bin
Run Sphinx's "make.bat" to generate the .tex file.
SET SPHINXOPTS=-W -E
make.bat latex
Invoke MiKTeX's pdflatex:
cd build/latex
pdflatex.exe YOUR_PROJECT_NAME.tex
The resultant PDF will be in your build/latex directory

How to add new programming language to jEdit?

I've recently been learning the Processing programming language. Processing includes an IDE called the Processing Development Environment (PDE), but the editor is quite basic.
The IDE has an option to use an external editor. One of my preferred editors is jEdit due to it's cross-platform support. Jedit has built-in support for over 170 languages, but not processing which I guess is still a little bit too niche at the moment.
How do I add Processing with all the color highlights to jEdit?
The whole process for adding processing has been detailed here: http://wiki.processing.org/w/JEdit_as_External_IDE.
Basically, jEdit is using XML files to define syntax coloring rules (incl. simple checking) for its various editing modes. Each syntax definition file has a file extension mapping to tell jEdit which language mode to use for individual files. For Processing files we will use the standard .pde extension.
There are two things you need to do: (Before installing any of the files below, please make sure jEdit is not running.)
Syntax Highlighting
Download File:Processing.xml into the "modes" folder inside your jEdit installation.
On Linux/MAC this is usually /usr/share/jedit/modes
On Windows this is C:\Program Files\jEdit\modes
Then copy and paste the following XML node into the file "catalog" inside the same folder and syntax coloring/checking for PDE files should be ready: <MODE NAME="processing" FILE="Processing.xml" FILE_NAME_GLOB="*.pde" />
Abbreviations
Download Media:abbrevs_v0.1.zip and extract it into the right folder for your system:
Windows
C:\Documents and Settings\{USERNAME}\.jedit
Mac
/Users/{USERNAME}/.jedit
Note: This folder is not visible in the Finder. Unzip the file in your home folder, open a terminal window and type: mv ~/abbrevs ~/.jedit/abbrevs</source>
Linux
Find the location of the jEdit settings directory via the menu: Utilities > Troubleshooting > Activity log, then extract/copy the file in that folder.
For all systems, you'll need to restart jEdit in order for the abbreviations to come in effect.