0 votes
I help operate ScriptureEarth.org. We are dreaming about the possibility of setting up an option for people to request a PDF on their choice of page size, their choice of font and leading, maybe their choice of font, double or single column. Our server is Linux based. It seems like if we could copy the USFM to a standard folder, and set up the parameters for a command line to be launched, we could generate a PDF with PTXprint ready to offer up for download. We are sending someone to a conference with the Close the BIble Gap group in October, and this seems like a service we might be able to offer. The assumption is that the output would not be fine tuned, but you get what comes out, which should be adequate for a situation where people are badly in need of printable Scripture. We now offer PDF in a lot of languages, often made with PTXprint and fine tuned, but we would like to be able to let people choose the parameters they need, rather than posting a dozen different formats.

Does this sound at all reasonable?

--Loren Hawthorne
PTXprint by (173 points)

2 Answers

+1 vote

Hi Loren,

Yes, PTXprint runs on Linux and has command-line options that should make your idea relatively easy to pull off. Just run PTXprint in a terminal with the -h to show all the options. If you look in the C:\Program Files\PTXprint\ptxprint\AboutPTXprint.txt file you will see that there are a whole bunch of examples of how to run PTXprint directly from the command-line (i.e. headless).

So for example,

"C:\Program Files\PTXprint\PTXprint.exe" -b ROM -P XYZ
will directly create a PDF of ROMANS from the XYZ project using the Default configuration (and no GUI will appear, as -P was used to directly hit "Print" for you).

Note that you probably need to first open PTXprint for that project and set up a font and layout etc. Although for Latin/Roman texts it might just work, I don't know.

If you're trying to run it without the normal Paratext file structure, all you need to do is give it the -p (lowercase) to point to a folder which is equivalent to "C:\My Paratext N Projects". It looks in each subfolder for USFM files and adds that folder to the list of "Projects". So I have an icon on my desktop which runs this command:

"C:\Program Files\PTXprint\PTXprint.exe" -p C:\Users\mark\Downloads  which fires up PTXprint looking only for projects in my Downloads folder.

We have already toyed with the idea of providing a slightly limited online version of PTXprint (fewer options to choose from) and MH might chip in with specifics about how to go about that.

There are others who have already done something similar, but with a limited number of texts available.
Check out: paper.bible which has an easy-to-use web interface. I love their promo video, and the UI simplicity.

by (2.6k points)
Not relevant if you're starting off with a DBL bundle, but if all you have is the USFM, then PTXprint  probably still requires a minimal settings.xml in the 'project' directory (where the USFM files are). E.g. one of the test cases uses:
<ScriptureText>
  <StyleSheet>usfm.sty</StyleSheet>
 <BooksPresent>111111111111010010110011001000000000001101111001000000000100011101000000000000000000000000000000000001000000100000000000000</BooksPresent>
  <Versification>4</Versification>
  <LanguageIsoCode>en</LanguageIsoCode>
  <FileNameBookNameForm>41MAT</FileNameBookNameForm>
  <FileNamePrePart />
  <FileNamePostPart>test.usfm</FileNamePostPart>
</ScriptureText>

I don't actually remember if all of those settings are used, but the FileName... definitions were certainly important the last time I tried.
Thanks. This is great!
0 votes

I have been playing around with https://paper.bible/ and am amazed at how easy it is to use and create custom scripture layouts in booklet form that can be easily printed.

This is a tremendous idea and really encourage you @LorenHawthorne to pursue this for scriptureearth.org 

@Mark P If there are any other sites utilizing PTX print via the command line for website delivery would love to see examples. This is extremely powerful and more people need to use this technology.

by (121 points)
Welcome to Support Bible, where you can ask questions and receive answers from other members of the community.
And over all these virtues put on love, which binds them all together in perfect unity.
Colossians 3:14
2,607 questions
5,344 answers
5,034 comments
1,417 users