1. Luc Railhac
  2. PowerBuilder
  3. Wednesday, 11 September 2024 06:30 AM UTC

Hi,

We are trying to create a PDF document using the PDFDocument object and multiple ImportDatawindow() calls, but page breaks are inserted between each datawindow.

Is there a way to delete these page breaks in the PDFDocument or do we have to use a composite datawindow?

Note: there are a lot of conditional paragraphs/tables in our document, so if we use a composite datawindow is there a way to dynamically insert datawindows in the report?

Thanks,
Luc

René Ullrich Accepted Answer Pending Moderation
  1. Wednesday, 11 September 2024 07:01 AM UTC
  2. PowerBuilder
  3. # 1

Hi Luc,

I guess you have to use a composite dw.

Yes, I think you can add reports to a composite dw at runtime. Use the tool "Datawindow Syntax" (you can find it in File->New dialog under "Tool") and use Syntax->Modify->Create menu to get a syntax template for a modify expression to create a report object (or other dw objects).

This can be very complicated because it may be you have to change the position of other reports too.

Another way: Create a composite dw that contains all reports you need. Make the height of reports you want to hide by condition as small as possible to not waste to much space if it is not visible. So you can hide the reports at runtime what should be easier.

HTH,

René

Comment
  1. René Ullrich
  2. Thursday, 12 September 2024 06:08 AM UTC
Maybe import at current position is not implemented yet because it may be much more complicated. Import as new pages can use the current dw print layout with its page brakes headers and footers. If the import should be at current position it would be more complicated because all pages brakes must be recalculated.
  1. Helpful 2
  1. Luc Railhac
  2. Thursday, 12 September 2024 06:14 AM UTC
This makes sense, thanks again!
  1. Helpful
  1. David Peace (Powersoft)
  2. Thursday, 12 September 2024 11:22 AM UTC
We have done this for document production in our Travel system a long time ago. The customer has custom documents that are made up of multiple DWs. We inject these DWs into a single composite DW. You ca then print the multi page document or save as PDF, its very messy and complicated code though and probably not quite what you are looking for.



Creating a single composite might be the easier way to go.
  1. Helpful 1
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.