cancel
Showing results for 
Search instead for 
Did you mean: 

Issues with spaces before commas when exporting to PDF.

psicosoftsap
Explorer
0 Kudos

Hello!

We are experiencing issues in Crystal Report when using a font from a client. In the program, it looks correct, but when we export the report to PDF, spaces are generated where they shouldn't be. We are using SAP Crystal Report 2020.

We have tried adding the Windows registry entries that we found in the support area, and some spaces have been fixed, but in smaller font sizes, the issue occurs again.

This is an image of the report in the program:

This is another image, but of the report once exported to PDF:

As you can see, spaces appear before the commas.

Any ideas on how to solve this?

Thank you.

Accepted Solutions (1)

Accepted Solutions (1)

DonWilliams
Active Contributor
0 Kudos

Hi Miguel,

Ah, good to know it is the font. I suggest contacting the makers of that font and ask them to look into it, seems to be a bug in that font since it doesn't work in CR or that other app you used to test.

SAP won't "fix" bugs in third party dependencies, We did that for years and it was a nightmare to maintain, we released a patch and then they fixed the issue and then we had to release another patch. As of CR 9 when all of those work arounds were removed and CRPE.dll was rewritten we no longer "fix"their bugs.

So at this point I don't think there is anything SAP is going to do for you, you'll have to get the makers of that font to fix their bug.

Ido has been using CR SDK's for years and if his products won't work there is definitely a bug in that font.

That's the problem when these third party products cause problems, they hosting Applications to fix their issues, it's just not practical to do that. If they are not wiling to fix it then your customer needs to find someone who can or find a different font. It's the makers issue to fix their product.

Good luck

Don

psicosoftsap
Explorer
0 Kudos

Hello Dom, I appreciate your help immensely so far. In the end, we spoke with the client to review their source for future tasks, and for now, we kept the source by replacing the character "/" with "|" which didn't cause the extra space error. So, in the end, it's in the client's hands since their custom source was causing the issue.

Thank you very much for your support, and Merry Christmas!

Answers (6)

Answers (6)

DonWilliams
Active Contributor
0 Kudos

Hi Miguel,

Fonts must be true type so pass this info onto the makers:

TrueType fonts

Designing your report with printer-specific fonts can lead to problems when using different printers. The fonts may not be supported by the other printers, or if they are supported, the fonts may not be installed on the printers.

During the printing process, if you encounter printer-specific fonts that are unrecognizable to the printer driver, Crystal Reports substitutes the fonts, creating inconsistent results. To avoid this situation, only common TrueType fonts should be used when designing reports.

Thanks for the follow up and potential solution.

Merry Christmas to you as well

Don

ido_millet
Active Contributor
0 Kudos

Don, I don't think Miguel testes the solution using my software. He probably used another tool.

I asked him (on this thread above) to test an export to MS Word instead of to PDF using whatever software he is using now. That would tell us is the issue is specific to pdf (the typical situation) or global. Unless he responds, it is difficult to diagnose the situation.

psicosoftsap
Explorer
0 Kudos

Hello Ido Millet,

I tried using the Crystal Delivery Free tool to export the report, but the error persisted. As I was telling Dom, we talked to the client to have them review their source for future tasks, and for now, we kept the source by replacing the character "/" with "|" which didn't cause the extra space error.

Thank you very much for your support, and Merry Christmas!

ido_millet
Active Contributor
0 Kudos

Miguel, not all 3rd-party tools have the option to automate the export of a Crystal report to pdf via an intermediate MS Word export.
If the report exports correctly to MS Word, then the suggested approach should solve the problem (provided you use the right tool).

Given that the user accepts the character replacement as solution, that's good enough... 🐵

ido_millet
Active Contributor
0 Kudos

If you export to MS Word, do you get the same problem?

DonWilliams
Active Contributor
0 Kudos

One of the guys at SAP suggested it may be font related.

What font are you using and if you change it does it change?

psicosoftsap
Explorer
0 Kudos

Hello! That's correct. The issue is with the custom font provided by the client. We've tested with others, and a couple of the client's fonts are causing this problem. Still, the client insists on using their corporate font. Is there a way to resolve it? We tried the solution suggested by Ido Millet, but the issue persists even when using third-party applications.

Thank you for your time.

ido_millet
Active Contributor
0 Kudos

I get around this type of issues by automating the process of exporting the Crystal report to PDF via MS Word.

If your report requires exporting rarely, you could instruct the user to do this manually.
Otherwise, you can automate the process using your own code or get a 3rd-party tool that does this type of automation. Ken Hamady maintains a listing of 3rd-party Crystal Reports automation tools here.

psicosoftsap
Explorer
0 Kudos

Hi!
We tried the solution suggested by Ido Millet (Thank you very much for the information), but the issue persists even when using third-party applications.

DonWilliams
Active Contributor
0 Kudos

Hi Miguel,

There's been a few issue with exporting to PDF reported to R&D, this could be one of them.

I pinged the Developer and Support Tech to see if it's been reported and possibly fixed in some patch.

Don

psicosoftsap
Explorer
0 Kudos

Hi Don,

Thank you for bringing this to your attention. We appreciate your support in looking into the reported issues with exporting to PDF. We're eagerly awaiting your updates, as we need to resolve this for some reports intended for clients.

We'll stay tuned for your updates on whether it has been reported and if there's a potential fix in a recent patch.

Best regards,

Miguel