0

I m using FOP for generating pdfs, it works fine and has been generating pdf file. However From time to time, when I Add url links to be displayed within the pdf. The pdf generation fails especially when the URL contains any keywords such as type...for example

URL: https://www.w3schools.com/jsref/prop_url_type.asp

At it contains type in the url - it fails to generate throwing errors

My FOP Version is 2.2 I am working on docker using kali linux

PRETTY_NAME="Kali GNU/Linux Rolling"
NAME="Kali GNU/Linux"
ID=kali
VERSION="2018.1"
VERSION_ID="2018.1"

Everytime I generate the pdf without any urls in it. It works fine, fails only when certain urls contain type

My Shell script contains the following code to generate the pdf

#!/bin/bash
# MYPDF GENERATOR
# GENERATE PDF REPORT
# fop -r RELAXED MODE PDF GENERATION

/opt/fop-2.2/fop/fop -r -v -xml $HOME/$MYHOST-$MYTIMESTAMP/$MYHOST-$MYTIMESTAMP-master-template.xml -xsl $HOME/$MYHOST-$MYTIMESTAMP/$MYHOST-$MYTIMESTAMP-master-template.xsl -pdf $HOME/$MYHOST-$MYTIMESTAMP/$MYHOST-$MYTIMESTAMP-master-report.pdf &

The above Code works fine most of the time, except the occasional issue with any urls containing the keyword type in it, when such url is inserted into it .

Would be highly appreciated, if someone could guide me on how to resolve this.

The Master-template.xml contains data as given below :-

116. http://bu.ac.in/list-of-files/
 117. http://bu.ac.in/contact-us/
 118. http://bu.ac.in/mba-admission/
 119. http://bu.ac.in/pg-dip-admission/type=q
 120. http://bu.ac.in/pg-admissions/
 121. http://bu.ac.in/ admission-for-integrated-courses/
 122. http://bu.ac.in/wp-content/uploads/2014/07/PG-Courses-100715.pdf
 123. http://bu.ac.in/wp-content/uploads/2014/10/ug_courses.pdf
 124. http://bu.ac.in/?p=5790
 125. http://bu.ac.in/wp-content/uploads/2014/12/PG-dip-dip-cert-Courses-090715.pdf
 126. http://bu.ac.in/exam-notifications/
 127. http://bu.ac.in/fee-structure/
Magnus Melwin
  • 1,509
  • 1
  • 21
  • 32
  • Where is the URL in the above shell script? I don't see it at all. Could you quote the entire variable list? Also `-` is a valid variable name in shell, it could intervene with the actual file names, enclose the variable names strictly within `{}`, for e.g. `${MYHOST}-${MYTIMESTAMP}` – Inian Mar 26 '18 at 06:13
  • Added the content of the master template xml file, I have no issues with the file name. It generates fine, when the link doesnt contain some reserve keywords. Thanks for letting me know on - – Magnus Melwin Mar 26 '18 at 06:46
  • This is an issue with the apache fop tool, probably a bug. I need a workaround it. – Magnus Melwin Mar 26 '18 at 06:47
  • 1
    Can you produce a [mcve], please? – user unknown Mar 26 '18 at 08:27
  • Think this issue shows up with tables in use. I am gonna try and use lists for the URLS. – Magnus Melwin Mar 28 '18 at 11:22

0 Answers0