Hello,
We tried to transform a PCL file into a PDF document.
During transformation, Aspose didn’t take the specified font’s directory but the default font’s directory.
We tried to specify the font’s directory with this code but it does works :
Pdf pdf = <span lang=“EN-US” style=“font-size:10.0pt;font-family:
“Courier New”;color:#7F0055;mso-ansi-language:EN-US”>new Pdf();
//pdf.setTruetypeFontMapPath(“C:/temp/test/ConverToPcl/transforme_to_PDF/fonts/”);
//pdf.setIsTruetypeFontMapCached(true);
//You can start your app with java -Daspose.pdf.fontpath=c:/windows/fonts instead
//pdf.setTruetypeFontDirectoryPath("C:/temp/test/ConverToPcl/transforme_to_PDF/fonts/");
pdf.SetUnicode();
pdf.bindPCL(pclPath);
// save the resultant PDF document
String pathPDF = pclPath.substring(0, pclPath.length() - 4) + ".pdf";
pdf.save(pathPDF);
We tried to add our fonts to the windows’s default font’s directory, and it doesn’t work too.
Do you have any idea to help us ?
We have also another problem with the “€” caratcter which wasn’t transform correctly.
Do you know this problem ?
Best Reagards,
Julien
Hi Julien,
Thanks for using our products.
Can you please share the source PCL as well as the resultant PDF document being generated over your end so that we can test the scenario at our end. We are sorry for your inconvenience.
Hello,
You can find in attachement the ZIP file containing the PCL file and the PDF file we’d like to obtain.
Another point, can you tell us how to set the documente size to A4 ?
Thank you very much.
Best regards,
Julien
Hello,
We work on the PCL to correct some errors.
You can find in attachement a ZIP file containing the new PCL file.
julienfrance:
Another point, can you tell us how to set the documente size to A4 ?
Hi Julien,
In order to set PDF page size, please try using the following code snippet.
[Java]
Pdf pdf = new Pdf();<o:p></o:p>
pdf.bindPCL("C:\\pdftest\\PCL\\CONVERT5443987446517607590.PCL");
pdf.getSections().getSection(0).getPageInfo().setPageHeight(aspose.pdf.PageSize.A4Height);
pdf.getSections().getSection(0).getPageInfo().setPageWidth(aspose.pdf.PageSize.A4Width);
pdf.save("C:\\pdftest\\PCL\\CONVERT5443987446517607590_A4.pdf");
Hello,
Firstly, you can find all our font's files in the zip file in attachement.
Secondly, do you have any idea for the problem of not having the caracter "€" in the PDF ?
For example, we have in your PDF :
"La pratique du ball-trap est assurée par ce contrat pour 10"
But we want :
"La pratique du ball-trap est assurée par ce contrat pour 10€"
Thanks for your help.
Best Regards,
Julien
julienfrance:
Firstly, you can find all our font’s files in the zip file in attachement.
Hi Julien,
Thanks for sharing the fonts files and sorry for the delayed response.
I have installed ArtLinePrinter.ttf file from attached fonts.zip file but I am still getting
Font: Lineprinter is not installed. error message. I have also provided the path of folder containing all these fonts but still the message is appearing. Can you please share which exact font file can be used for Lineprinter font.
julienfrance:
Secondly, do you have any idea for the problem of not having the caracter “€” in the PDF ?
For example, we have in your PDF :
"La pratique du ball-trap est assurée par ce contrat pour 10"
But we want :
"La pratique du ball-trap est assurée par ce contrat pour 10€"
I am able to notice the same issue. For the
sake of correction, I have logged it in our issue tracking system as PDFJAVA-33178. We
will investigate this issue in details and will keep you updated on the status
of a correction.
We
apologize for your inconvenience.