Font is become ??? Saveas Pdf on 2009R2

yukonyukon Member Posts: 361
edited 2014-04-26 in NAV Three Tier
Dear Team,

I have face with font changed after saveas pdf from RTC report. Everything is correct if i do the preview mode and print to pdf. The only thing is saveas pdf. I tested with standard report.
Is it bug or any hotfix for that?

Language is Thai and OS is installed Thai Language.
Navision Version : 2009 R2 (B32843 and B33137)

Preview Mode.


Print to PDF Creator


Saveas Pdf


Best Regards,
Yukon
Make Simple & Easy

Comments

  • clauslclausl Member Posts: 455
    RDLC version 2005 supported in NAV 2009 unfortunately does not support embedded fonts in PDF.

    This was first introduced in RDLC version 2008 supported in NAV 2013.

    So your only options are to upgrade to NAV 2013 or NAV 2013 R2 or to use a 3rd party PDF generator in NAV 2009, if fonts need to be embedded in the PDF files.

    /Claus Lundstrøm
    Claus Lundstrøm | MVP | Senior Product Manager | Continia.com
    I'm blogging here:http://mibuso.com/blogs/clausl and used to blog here: http://blogs.msdn.com/nav
    I'm also offering RDLC Report Training, ping me if you are interested. Thanks to the 700 NAV developers that have now already been at my training. You know you can always call if you have any RDLC report issues :-)
  • yukonyukon Member Posts: 361
    Hi clausl,

    Thanks for your reply.
    clausl wrote:
    So your only options are to upgrade to NAV 2013 or NAV 2013 R2 or to use a 3rd party PDF generator in NAV 2009, if fonts need to be embedded in the PDF files.
    .

    I don't think they won't upgrade to 2013 or 2013R2. They need to upgrade whole office PC include their server. Currently they are using CC not RTC. And I know to use the third party PDF generator. The problem is we need to use SaveasPdf function for WS. I have tested to print the pdf printer (using the pdfcreator). But i have fail on "Printing progress dialog box" before print to pdf. WS not allow to call the dialog box and I didn't see how can be disable that dialog box from navisoin or somewhere else.

    If you have any idea on that please share to us.

    Best Regards,
    Yukon
    Make Simple & Easy
  • stevedivimaststevedivimast Member Posts: 39
    I had the same problem two years ago and i used ghostscript (http://www.ghostscript.com) to post process SAVEASPDF output.
    It worked fine.


    Name DataType Subtype Length
    L_AUWshShell Automation 'Windows Script Host Object Model'.WshShell
    L_CommandLine Text 1024
    L_WindowStyle Integer
    L_WaitOnReturn Boolean

    Report1.SAVEASPDF('C:\Temp\NoFonts.pdf');
    L_CommandLine :=
    '"C:\Program Files (x86)\gs\gs9.04\bin\gswin32" -sFONTPATH="C:\Windows\Fonts" -o '+
    '"' + 'C:\Temp\WithFonts.pdf' + '" ' +
    '-sDEVICE=pdfwrite -dPDFSETTINGS=/prepress -dCompatibilityLevel=1.4 ' +
    '-f "' + 'C:\Temp\NoFonts.pdf' + '"';


    L_WindowStyle := 0; L_WaitOnReturn := TRUE;

    IF ISCLEAR(L_AUWshShell) THEN
    CREATE(L_AUWshShell,FALSE,FALSE);

    L_AUWshShell.Run(L_CommandLine, L_WindowStyle,L_WaitOnReturn);
  • mdPartnerNLmdPartnerNL Member Posts: 802
    I had the same problem two years ago and i used ghostscript (http://www.ghostscript.com) to post process SAVEASPDF output.
    It worked fine.


    Name DataType Subtype Length
    L_AUWshShell Automation 'Windows Script Host Object Model'.WshShell
    L_CommandLine Text 1024
    L_WindowStyle Integer
    L_WaitOnReturn Boolean

    Report1.SAVEASPDF('C:\Temp\NoFonts.pdf');
    L_CommandLine :=
    '"C:\Program Files (x86)\gs\gs9.04\bin\gswin32" -sFONTPATH="C:\Windows\Fonts" -o '+
    '"' + 'C:\Temp\WithFonts.pdf' + '" ' +
    '-sDEVICE=pdfwrite -dPDFSETTINGS=/prepress -dCompatibilityLevel=1.4 ' +
    '-f "' + 'C:\Temp\NoFonts.pdf' + '"';


    L_WindowStyle := 0; L_WaitOnReturn := TRUE;

    IF ISCLEAR(L_AUWshShell) THEN
    CREATE(L_AUWshShell,FALSE,FALSE);

    L_AUWshShell.Run(L_CommandLine, L_WindowStyle,L_WaitOnReturn);

    Thanks for this info. I tried to find some documentation what gswin32 is doing in your example. Do you have a link or doc in where this all is explained?
  • stevedivimaststevedivimast Member Posts: 39
    http://www.ghostscript.com
    You can find everything you need.
  • mdPartnerNLmdPartnerNL Member Posts: 802
    After unzipping the install found some better documentation but also the statement you can't use it commercially. Do you have any info what the price is?
  • yukonyukon Member Posts: 361
    Hi stevedivimast,

    Thanks for your information. Sorry for too late reply. I'm busy with other. I have test on my dev. environment. My Navision is freez and pdf is blank after i run your sample. And i changed folder path only. Because I used latest version. Currently i not able test it again. Do you face that kind of error.
    After unzipping the install found some better documentation but also the statement you can't use it commercially. Do you have any info what the price is?

    I haven't read documentation. I thought it is free. :mrgreen:

    Best Regards,
    Yukon
    Make Simple & Easy
  • stevedivimaststevedivimast Member Posts: 39
    Try to use gs program direcly from command prompt.
    The command I posted contain some extra option.
    It worked fine in my installation. My customer process more than 200,000 pdf file each year in this way.
  • jensthomsenjensthomsen Member Posts: 173
    We're facing the same problem in Nav 2016...Anyone has a better solution than the one mentioned?
  • Wisa123Wisa123 Member Posts: 308
    In 2016 reports have the property PDFFontEmbedding. Did you try using that?
    Austrian NAV/BC Dev
Sign In or Register to comment.