1. Clarence Chamorro
  2. PowerBuilder
  3. Friday, 15 January 2021 01:37 AM UTC

I have a datawindow with a couple of button in the footer area. When I print in paper the buttons are suppressed and everything is good. When I save the same datawindow as a PDF with the SaveAs function the buttons are printed in the PDF. How can I suppress them as in the paper print out. Always grateful of your help. Any advice will be greatly appreciated. I am Using Appeon PowerBuilder CloudPro Edition Version 2019 R2 build 2328.

Regards,

Clarence.

Accepted Answer
John Fauss Accepted Answer Pending Moderation
  1. Friday, 15 January 2021 02:13 AM UTC
  2. PowerBuilder
  3. # Permalink

Greetings, Clarence - 

Have you tried to change the Visible property of the buttons (either via dot-notation statements or Modify function) to hide them, print the DataWindow, then change the Visible property back?

If that doesn't work, create a near duplicate copy of the DataWindow (via Edit, then SaveAs) that will be used only for printing. Delete the buttons from the "print" version of the DataWindow. When it is time to print, create a DataStore and assigned the "print" DataWindow as its DataObject. Use ShareData to share the data buffers from the real DW with the print DW, print the DataStore, turn ShareDataOff, then destroy the DataStore.

Regards, John

Comment
  1. Clarence Chamorro
  2. Friday, 15 January 2021 02:58 AM UTC
John thank you very much for the advise. Changing the visible property of the buttons work perfect.



Regards,



Clarence.
  1. Helpful
There are no comments made yet.
mike S Accepted Answer Pending Moderation
  1. Friday, 15 January 2021 02:58 AM UTC
  2. PowerBuilder
  3. # 1

I assume that the print specifications option of "display buttons - print" is NOT checked as having that NOT checked means that it won't print the buttons.

I would try setting   Export.PDF.NativePDF.UsePrintSpecproperty to yes since that is what you want it to do.  No idea if that will work for you or not.  I expect that it will not.

If this does NOT work for you, then you should submit that as a bug.

 

PDF is electronic paper and thus saving to PDF should work the same as printing and use the settings in the print spec, but it was not built that way.

 

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.