Free Support Forum - aspose.com

PCL to PDF conversion throws a SystemException

I am trying to open a pcl file using the following code:
LoadOptions loadopt = new Aspose.Pdf.PclLoadOptions();
Document doc = new Document(file, loadopt);

I am getting the following exception
Font Line Printer is absent.

Please can you let me know how to resolve this?

@vjennings

Would you kindly share the sample input PCL file with us. We will test the scenario in our environment and address it accordingly.

Hi, I have two pcl files in this zip file, 16197.pcl gives me the error I mentioned above, 28.pcl gives me a Method or operation is not implemented exception.

I am using Aspose PDF 19.10.

In fact about a year ago I raised an issue which you named as PDFNET-45640 but I am unable to find this issue on your board any more and I have not heard anything about its resolution. Would you be able to find out if this issue was addressed please.

PCLFiles.zip (13.5 KB)

@vjennings

We were able to replicate the issues in our environment and logged them as following:

PDFNET-47196

PDFNET-47197

We have also recorded your concerns against above ticket and will definitely consider them during investigation. We will let you know as soon as we have some definite updates in this regard. Please spare us little time.

We are sorry for the inconvenience.

The issues you have found earlier (filed as PDFNET-45640,PDFNET-47196,PDFNET-47197) have been fixed in Aspose.PDF for .NET 19.12.

I have just tried to use version 20.1.0 and I still get the following exception when I try to load the pcl file.
System.NotImplementedException
HResult=0x80004001
Message=The method or operation is not implemented.
Source=Aspose.PDF
StackTrace:
at #=zKNFTGYUaW40BRBR8VWLCa8SlYmRcRwuyZue2RasMwujgRBuLqg==.#=zLGJ5lFY=(#=zyWYw9WODcH0YOXuc4yYrBPA1DQgQ #=zRDlAEUH6g36A)
at #=zKNFTGYUaW40BRBR8VWLCa8SlYmRcRwuyZue2RasMwujgRBuLqg==.#=zmG4nDFc=()
at System.Threading.Thread.ThreadMain_ThreadStart()
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()

This exception was originally thrown at this call stack:
#=zKNFTGYUaW40BRBR8VWLCa8SlYmRcRwuyZue2RasMwujgRBuLqg==.#=zLGJ5lFY=(#=zyWYw9WODcH0YOXuc4yYrBPA1DQgQ)
#=zKNFTGYUaW40BRBR8VWLCa8SlYmRcRwuyZue2RasMwujgRBuLqg==.#=zmG4nDFc=()
System.Threading.Thread.ThreadMain_ThreadStart()
System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, object)
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()

My code is:
LoadOptions loadopt = new PclLoadOptions() { ConversionEngine = PclLoadOptions.ConversionEngines.NewEngine };
Document doc = new Document(file, loadopt);

@vjennings

Would you please confirm if it is same PCL file for which the issue was logged earlier?

Actually, just tried it again with both the files and get two different errors
16197.pcl gives:
System.SystemException
HResult=0x80131501
Message=Font Line Printer is absent.
Source=Aspose.PDF
StackTrace:
at #=zKNFTGYUaW40BRBR8VWLCa8SlYmRcRwuyZue2RasMwujgRBuLqg==.#=zLGJ5lFY=(#=zyWYw9WODcH0YOXuc4yYrBPA1DQgQ #=zRDlAEUH6g36A)
at #=zKNFTGYUaW40BRBR8VWLCa8SlYmRcRwuyZue2RasMwujgRBuLqg==.#=zmG4nDFc=()
at System.Threading.Thread.ThreadMain_ThreadStart()
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()

This exception was originally thrown at this call stack:
#=zKNFTGYUaW40BRBR8VWLCa8SlYmRcRwuyZue2RasMwujgRBuLqg==.#=zLGJ5lFY=(#=zyWYw9WODcH0YOXuc4yYrBPA1DQgQ)
#=zKNFTGYUaW40BRBR8VWLCa8SlYmRcRwuyZue2RasMwujgRBuLqg==.#=zmG4nDFc=()
System.Threading.Thread.ThreadMain_ThreadStart()
System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, object)
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()

And 28.pcl gives:
System.NotImplementedException
HResult=0x80004001
Message=The method or operation is not implemented.
Source=Aspose.PDF
StackTrace:
at #=zKNFTGYUaW40BRBR8VWLCa8SlYmRcRwuyZue2RasMwujgRBuLqg==.#=zLGJ5lFY=(#=zyWYw9WODcH0YOXuc4yYrBPA1DQgQ #=zRDlAEUH6g36A)
at #=zKNFTGYUaW40BRBR8VWLCa8SlYmRcRwuyZue2RasMwujgRBuLqg==.#=zmG4nDFc=()
at System.Threading.Thread.ThreadMain_ThreadStart()
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()

This exception was originally thrown at this call stack:
#=zKNFTGYUaW40BRBR8VWLCa8SlYmRcRwuyZue2RasMwujgRBuLqg==.#=zLGJ5lFY=(#=zyWYw9WODcH0YOXuc4yYrBPA1DQgQ)
#=zKNFTGYUaW40BRBR8VWLCa8SlYmRcRwuyZue2RasMwujgRBuLqg==.#=zmG4nDFc=()
System.Threading.Thread.ThreadMain_ThreadStart()
System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, object)
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()

@vjennings

Would you kindly try using SupressErrors Property while setting it as true for PclLoadOptions. During our tests, the file was converted successfully when this property was set:

loadopt.SuppressErrors = true;

To avoid exceptions when some fonts are absent on target system set above code snippet should be used and absent font will be substituted with similar one. Furthermore, please change the code snippet as following to compile it correctly:

PclLoadOptions loadopt = new Aspose.Pdf.PclLoadOptions();
(instead of LoadOptions loadopt = new Aspose.Pdf.PclLoadOptions…)

Thanks for that information, I can now get both pcl files converted. Is there a way of finding out what fonts it thinks are missing? I assume it uses Windows fonts?
The third party software we currently use (GhostScript) to do this gets to convert fonts correctly, and that uses Windows fonts, so I am surprised that Aspose PDF is not finding them.

@vjennings

Yes, the API uses Windows Font. However, we will try to provide further clarification on the issue soon. Please spare us some time.

@vjennings

If you add this lines after code that runs conversion:

if (parseOptions.Exceptions.Count > 0)
            {
                foreach (Exception ex in parseOptions.Exceptions)
                {
                    Console.WriteLine(ex.Message);
                    Console.WriteLine(ex.StackTrace);
                }
            }

you can see in console:

Font Univers is absent. Substituted with Times New Roman

Font Univers is absent. Substituted with Times New Roman

Font Univers is absent. Substituted with Times New Roman

AH ok, then I still have problems. With 16197 I get this:
Font Line Printer is absent. Substituted with Courier New

With 28 is get loads:
The method or operation is not implemented.
at #=zHlaPlZocmfTeKcL63fHr5rx09cmOZT6_gw==.#=zBtzahXaUU_GHjwEp_MvSXTs=(#=zD32YhgnuXL_hItSNw18ECDAeK1ChlpeuawmIsiFBxgOw #=zqieMw6hmTeWeg8aVQA==)
at #=zKNFTGYUaW40BRBR8VWLCa8SlYmRcRwuyZue2RasMwujgRBuLqg==.#=zLGJ5lFY=(#=zyWYw9WODcH0YOXuc4yYrBPA1DQgQ #=zRDlAEUH6g36A)
Font Univers is absent. Substituted with Times New Roman

Font Univers is absent. Substituted with Times New Roman

Font Univers is absent. Substituted with Times New Roman

Font CG Times is absent. Substituted with Times New Roman

Font Univers is absent. Substituted with Times New Roman

Font Univers is absent. Substituted with Times New Roman

Font Univers is absent. Substituted with Times New Roman

Font Univers is absent. Substituted with Times New Roman

Font Univers is absent. Substituted with Times New Roman

Font Univers is absent. Substituted with Times New Roman

The method or operation is not implemented.
at #=zHlaPlZocmfTeKcL63fHr5rx09cmOZT6_gw==.#=zBtzahXaUU_GHjwEp_MvSXTs=(#=zD32YhgnuXL_hItSNw18ECDAeK1ChlpeuawmIsiFBxgOw #=zqieMw6hmTeWeg8aVQA==)
at #=zKNFTGYUaW40BRBR8VWLCa8SlYmRcRwuyZue2RasMwujgRBuLqg==.#=zLGJ5lFY=(#=zyWYw9WODcH0YOXuc4yYrBPA1DQgQ #=zRDlAEUH6g36A)
Font Univers is absent. Substituted with Times New Roman

Font Univers is absent. Substituted with Times New Roman

Font Univers is absent. Substituted with Times New Roman

Font Univers is absent. Substituted with Times New Roman

Font Univers is absent. Substituted with Times New Roman

Font Univers is absent. Substituted with Times New Roman

The method or operation is not implemented.
at #=zHlaPlZocmfTeKcL63fHr5rx09cmOZT6_gw==.#=zBtzahXaUU_GHjwEp_MvSXTs=(#=zD32YhgnuXL_hItSNw18ECDAeK1ChlpeuawmIsiFBxgOw #=zqieMw6hmTeWeg8aVQA==)
at #=zKNFTGYUaW40BRBR8VWLCa8SlYmRcRwuyZue2RasMwujgRBuLqg==.#=zLGJ5lFY=(#=zyWYw9WODcH0YOXuc4yYrBPA1DQgQ #=zRDlAEUH6g36A)
Font Univers is absent. Substituted with Times New Roman

Font Univers is absent. Substituted with Times New Roman

Font Univers is absent. Substituted with Times New Roman

Font Univers is absent. Substituted with Times New Roman

Font Univers is absent. Substituted with Times New Roman

Font Univers is absent. Substituted with Times New Roman

Font Univers is absent. Substituted with Times New Roman

Font Univers is absent. Substituted with Times New Roman

Font Univers is absent. Substituted with Times New Roman

Font Univers is absent. Substituted with Times New Roman

Font Univers is absent. Substituted with Times New Roman

Font Univers is absent. Substituted with Times New Roman

Font Univers is absent. Substituted with Times New Roman

Font Univers is absent. Substituted with Times New Roman

Font Univers is absent. Substituted with Times New Roman

Font Univers is absent. Substituted with Times New Roman

Font Univers is absent. Substituted with Times New Roman

Font Univers is absent. Substituted with Times New Roman

Font Univers is absent. Substituted with Times New Roman

Font Univers is absent. Substituted with Times New Roman

The method or operation is not implemented.
at #=zHlaPlZocmfTeKcL63fHr5rx09cmOZT6_gw==.#=zBtzahXaUU_GHjwEp_MvSXTs=(#=zD32YhgnuXL_hItSNw18ECDAeK1ChlpeuawmIsiFBxgOw #=zqieMw6hmTeWeg8aVQA==)
at #=zKNFTGYUaW40BRBR8VWLCa8SlYmRcRwuyZue2RasMwujgRBuLqg==.#=zLGJ5lFY=(#=zyWYw9WODcH0YOXuc4yYrBPA1DQgQ #=zRDlAEUH6g36A)
Font Univers is absent. Substituted with Times New Roman

Font Univers is absent. Substituted with Times New Roman

Font Univers is absent. Substituted with Times New Roman

Font Univers is absent. Substituted with Times New Roman

Font Univers is absent. Substituted with Times New Roman

Font Univers is absent. Substituted with Times New Roman

Font Univers is absent. Substituted with Times New Roman

The method or operation is not implemented.
at #=zHlaPlZocmfTeKcL63fHr5rx09cmOZT6_gw==.#=zBtzahXaUU_GHjwEp_MvSXTs=(#=zD32YhgnuXL_hItSNw18ECDAeK1ChlpeuawmIsiFBxgOw #=zqieMw6hmTeWeg8aVQA==)
at #=zKNFTGYUaW40BRBR8VWLCa8SlYmRcRwuyZue2RasMwujgRBuLqg==.#=zLGJ5lFY=(#=zyWYw9WODcH0YOXuc4yYrBPA1DQgQ #=zRDlAEUH6g36A)
Font Univers is absent. Substituted with Times New Roman

Font Univers is absent. Substituted with Times New Roman

Font Univers is absent. Substituted with Times New Roman

Font Univers is absent. Substituted with Times New Roman

Font Univers is absent. Substituted with Times New Roman

Font Univers is absent. Substituted with Times New Roman

Font Univers is absent. Substituted with Times New Roman

Font Univers is absent. Substituted with Times New Roman

Font Univers is absent. Substituted with Times New Roman

Font Univers is absent. Substituted with Times New Roman

Font Univers is absent. Substituted with Times New Roman

Font Univers is absent. Substituted with Times New Roman

Font Univers is absent. Substituted with Times New Roman

Font Univers is absent. Substituted with Times New Roman

Font Univers is absent. Substituted with Times New Roman

Font Univers is absent. Substituted with Times New Roman

Font Univers is absent. Substituted with Times New Roman

Font Univers is absent. Substituted with Times New Roman

Font Univers is absent. Substituted with Times New Roman

Font Univers is absent. Substituted with Times New Roman

Font Univers is absent. Substituted with Times New Roman

Font Univers is absent. Substituted with Times New Roman

Font Univers is absent. Substituted with Times New Roman

Font Univers is absent. Substituted with Times New Roman

Font Univers is absent. Substituted with Times New Roman

Font Univers is absent. Substituted with Times New Roman

Font Univers is absent. Substituted with Times New Roman

Font Univers is absent. Substituted with Times New Roman

Font Univers is absent. Substituted with Times New Roman

Font Univers is absent. Substituted with Times New Roman

Font Univers is absent. Substituted with Times New Roman

Font CG Times is absent. Substituted with Times New Roman

Font CG Times is absent. Substituted with Times New Roman

Font Univers is absent. Substituted with Times New Roman

The method or operation is not implemented.
at #=zHlaPlZocmfTeKcL63fHr5rx09cmOZT6_gw==.#=zBtzahXaUU_GHjwEp_MvSXTs=(#=zD32YhgnuXL_hItSNw18ECDAeK1ChlpeuawmIsiFBxgOw #=zqieMw6hmTeWeg8aVQA==)
at #=zKNFTGYUaW40BRBR8VWLCa8SlYmRcRwuyZue2RasMwujgRBuLqg==.#=zLGJ5lFY=(#=zyWYw9WODcH0YOXuc4yYrBPA1DQgQ #=zRDlAEUH6g36A)
Font Univers is absent. Substituted with Times New Roman

So I installed some Univers fonts on my pc and now get an exception:
Font embedding is prohibited because of font license restrictions
But then I guess that will happen as we don’t have a licence to it. This situation is not really acceptable to us as we would not be able to dictate to our customers to buy licences.

Do you have any ideas what we can do regarding getting free fonts onto windows? Without these fonts your software conversion process is useless to us.

@vjennings

We have recorded your concerns will surely provide you feedback on it soon.