We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

PCL to PDF conversion problem

Hello,


I used your own example test.pcl with Aspose.Pdf 10.6.2, but the result looks bad (not in place, wrong font, etc.).

The code is your own:

public class PCLToPDF
{
public static void main(String[] args) throws Exception
{
// The path to the documents directory.
String dataDir = Utils.getDataDir(PCLToPDF.class);

// Instantiate PDF object
Pdf pdf1 = new Pdf();

// bind the source PCL file with Pdf object
pdf1.bindPCL(dataDir + “test.pcl”);

// save the resultant PDF document
pdf1.save(dataDir + “test-converted.pdf”);

System.out.println(“PCL to PDF conversion performed successfully!”);
}
}

I unsuccessfully tried to force the directory of fonts (Windows 8):
pdf1.setTruetypeFontMapPath(“c:/Windows/Fonts”);

What’s missing?

Thanks

I also tried with version 10.3.0 (that we own a licence) and version 9.5.0 with no luck. The generated PDF looks all mixed up for all versions.

Hi François,


Thanks for using our API’s.

Can you please share the source/input PCL files, so that we can test the conversion in our environment. We are sorry for your inconvenience.

Hi,


Source is here.
PCL is here.

I just used your own example :slight_smile:
Maybe my system lacks some fonts? But I didn’t get any exception nor warning messages.

Thanks

Hi François,


Thanks for sharing the resource files.

I have tested the scenario using Aspose.Pdf for Java 10.6.1 and as per my observations, the PCL file is not properly being converted to PDF format. For the sake of correction, I have logged this problem
as PDFNEWJAVA-35158 in our issue tracking system. We will
further look into the details of this problem and will keep you updated on the
status of correction. Please be patient and spare us little time. We are sorry
for this inconvenience.

For your reference, I have also attached the PDF file generated over my end.

Hi,


by looking at the PDF you generated, I realized you used HTML code instead of the PCL file. Try getting the PCL file here

Regards

Hi,


Thanks for sharing the resource PCL file.

In my earlier attempt, I used the files which you have shared in earlier post. However when using the resource/PCL file in your last post, I am able to reproduce the incorrect PDF rendering issue. For the sake of correction, I have separately logged this problem
as PDFNEWJAVA-35163 in our issue tracking system. We will
further look into the details of this problem and will keep you updated on the
status of correction. Please be patient and spare us little time. We are sorry
for this inconvenience.