1. Craig Meinen
  2. PowerBuilder
  3. Wednesday, 27 July 2022 21:46 PM UTC

Hi All.

I am using PB 2019 R3 with Native PDF enabled.  Until recently I had been generating PDF files from PB using GhostScript 9.19 with no issues.

Has any here had issues with creating PDFs from datawindows, but the resulting PDF changes some of the resulting text?  The datawindow text can be in two languages (Vietnamese and English), but in almost all cases the font is Tahoma.

Another oddity is that when I generate the reports they can look fine on my PC, but when I deploy them to other PCs they can look wrong.

I'm unsure about what to look at to correct this.  I don't know if this could be a settings issue on some of the PCs, or a font issue, or something else, but I didn't have these issues generating PDF files when I used GS.

Any ideas would be appreciated.

Thank you.

Tracy Lamb Accepted Answer Pending Moderation
  1. Friday, 29 July 2022 16:18 PM UTC
  2. PowerBuilder
  3. # 1

I ran into a similar problem... a few fonts we not right and the degree symbol for temperature wasn't right.

All I had to do is step one suggested by Olan above,

1.  Application object, Additional Properties, PDF EXPORT tabpage:  ensure the two checkboxes are checked.

Hope this is helpful.

 

Comment
There are no comments made yet.
Tobias Roth Accepted Answer Pending Moderation
  1. Thursday, 28 July 2022 22:54 PM UTC
  2. PowerBuilder
  3. # 2

Hi Craig,

this sounds like the same problem in my support ticket: https://www.appeon.com/standardsupport/track/view?id=5094

Regards Tobi

Comment
There are no comments made yet.
John Fauss Accepted Answer Pending Moderation
  1. Thursday, 28 July 2022 01:19 AM UTC
  2. PowerBuilder
  3. # 3

Hi, Craig - 

As you have probably already surmised, NativePDF is quite a bit different than using the GhostScript distiller. The features and implementation has evolved since NativePDF debuted in PB 2017.

I echo Olan's suggestion that you investigate the application settings in the Application object, and if appropriate for your situation, enable these options. Here is a link to some information you may find helpful:

   https://docs.appeon.com/pb2019r3/pbug/Enhancing_DataWindow_Objects.html#Saving_as_PDF_using_PDFlib

Like Olan describes, we also made changes to our ancestor DW to properly support NativePDF throughout our commercial application without having to make changes to each and every DataWindow control.

I also recommend you read up on ALL of the NativePDF settings, so that you learn what is or is not possible. Here is a link to the online documentation for the first of a dozen or so NativePDF settings (they are listed sequentially):

   https://docs.appeon.com/pb2019r3/datawindow_reference/ch03s03.html#XREF_27318_Export_PDF_Method

Of course, you are always welcome to ask additional questions on the Community Q&A forum.

Best regards, John

Comment
There are no comments made yet.
Olan Knight Accepted Answer Pending Moderation
  1. Wednesday, 27 July 2022 22:47 PM UTC
  2. PowerBuilder
  3. # 4

I recently moved from GS to NativePDF and have not had any difficulty. Here's what I did.

1.
Application object, Additional Properties, PDF EXPORT tabpage:  ensure the two checkboxes are checked.

2.
inherit your DWS from uo_datawindow (attached), or copy the NativePDF! functions into your base DW.
(The attached file is a 7zip compressed file that was renamed to ".zip" so I could upload it.)

3.
cb_save.Clicked event:
  
// OKnight, 07-MAR-2022, #3145069:  Use Native PDF! printing.

ll_rc = MessageBox ("Save or Print", "Do you want Print the Payments Text File " + &
                          "from customer (YES) or Save it as Excel (NO)?", Question!, Yesno!)

IF ll_rc = 1 THEN
    
    // OKnight, 06-DEC-2021, #3145069:  Replace PrintOpen with the new NativePDF.
    //    dw_2.Print()
    ls_job_name = "Payments_Text_File_dw_2"
    
    ll_rc = dw_2.EVENT ue_print_as_pdf (ls_job_name, cbx_use_prefs.Checked)
    IF ll_rc = 1 THEN
                        
        // Display the file just saved
        st_saved_file.Text = ls_job_name
        
        gs_master_log_file_line = 'Payments Text File saved as '+ls_job_name
        IF not icupd.wf_write_master_log_file() THEN
            RETURN -1
        END IF
        
    ELSE
        // Display the file just saved
        st_saved_file.Text = ''        
    END IF
    
ELSE
    ll_rc = dw_2.SaveAs()
END IF


Hope this helps!

Attachments (1)
Comment
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.
We use cookies which are necessary for the proper functioning of our websites. We also use cookies to analyze our traffic, improve your experience and provide social media features. If you continue to use this site, you consent to our use of cookies.