Hello,
we are evaluating PCL to PDF transformation in z/OS UNIX environment before purchase.
We are created a Java program for execution in this environment using aspose-pdf-20.2 pdf
The code is
String input = args[0];
String output = args[1];
String fontPath = args[2];
List fontPaths = FontRepository.getLocalFontPaths();
fontPaths.add(fontPath);
FontRepository.setLocalFontPaths(fontPaths);
PclLoadOptions loadoptions = new PclLoadOptions();
Document doc = new Document(input, loadoptions);
doc.save(output);
The values are
input: /u/sa80903/PCLtoPDF/pcl5cv1.pcl
output: /u/sa80903/PCLtoPDF/pcl5cv1.pdf
fontPath: /usr/local/share/fonts/
Truetype Windows fonts have been copied before execution
The program in Windows runs correctly.
Can you tell us how to solve the problem? Is a library bug for z/OS UNIX enviroment?
Thanks.
@oguillen,
Can you please share source files along with complete environment details to further investigate this issue in details.
Hello Adnan,
the SO information is
Welcome to z/OS 2.3 Unix System Services
Wed Mar 18 14:18:54 MEZ 2020
$ java -version
java version “1.8.0_191”
Java™ SE Runtime Environment (build 8.0.5.27 - pmz3180sr5fp27-20190104_01(SR5
FP27))
IBM J9 VM (build 2.9, JRE 1.8.0 z/OS s390-31-Bit 20181219_405297 (JIT enabled, AOT enabled)
OpenJ9 - 3f2d574
OMR - 109ba5b
IBM - e2996d1)
JCL - 20190104_01 based on Oracle jdk8u191-b26
We hace only a file with this content is:
##################################
import java.util.List;
import com.aspose.pdf.Document;
import com.aspose.pdf.FontRepository;
import com.aspose.pdf.PclLoadOptions;
public class ConvertPCLToPDFFormat {
public static void main(String[] args) {
System.out.println("Starting...");
if(args.length<3) {
System.out.println("Parámetros obligatorios no informados");
System.exit(1);
}
else
{
String input = args[0];
String output = args[1];
String fontPath = args[2];
// Carga 1 (v20.2)
List<String> fontPaths = FontRepository.getLocalFontPaths();
fontPaths.add(fontPath);
FontRepository.setLocalFontPaths(fontPaths);
System.out.println("input: " + input);
System.out.println("output: " + output);
System.out.println("fontPath: " + fontPath);
// Instantiate LoadOption object using PCL load option
System.out.println("Loading options...");
PclLoadOptions loadoptions = new PclLoadOptions();
System.out.println("Loaded");
// Create Document object
System.out.println("Creating document...");
Document doc = new Document(input, loadoptions);
System.out.println("Created document");
// Save the resultant PDF document
System.out.println("Saving document...");
doc.save(output);
System.out.println("Saved");
System.out.println("End!");
System.exit(0);
}
}
}
###############################
Thanks.
@oguillen,
Can you please share source file as well to further investigate this issue.
[file](https://easya.t-systems.es/box/index.php/s/SetZqkOEHpHjHtJ)
@oguillen,
I am very thankful for your cooperation. But here I am asking for source PCL file which you are converting to PDF.
@oguillen,
Thanks for sharing further details.
We have logged an investigation ticket as PDFJAVA-39267 in our issue tracking system. We will further look into details of it and keep you posted with the status of its resolution. Please be patient and spare us some time.
We are sorry for the inconvenience.