J
Jean-Christophe Cardot
Guest
Following up... With pdfInclude 5.1, as I have more published events, I can fix this, doing this: ------------------- SUBSCRIBE TO "finishPdfPage" IN h_PDFInc. SUBSCRIBE TO "generatePdfPage" IN h_PDFInc. /* Now produce the table */ RUN pdf_tool_create ("Spdf","CustList"). DEFINE VARIABLE deY AS DECIMAL NO-UNDO. DEFINE VARIABLE ddd AS DECIMAL NO-UNDO. DEFINE VARIABLE iPage AS INTEGER NO-UNDO. deY = pdf_textY("Spdf"). iPage = pdf_page("Spdf"). RUN pdf_skipn ("Spdf", 3). RUN pdf_wrap_text("spdf", FILL("jice was here ", 40), 5,80, "LEFT", OUTPUT ddd). RUN pdf_close("Spdf"). IF RETURN-VALUE > '' THEN MESSAGE RETURN-VALUE VIEW-AS ALERT-BOX ERROR BUTTONS OK. PROCEDURE finishPdfPage: DEFINE INPUT PARAMETER pdfStream AS CHARACTER NO-UNDO. DEFINE INPUT PARAMETER pdfPage AS INTEGER NO-UNDO. RUN pdf_set_textY("Spdf", IF pdfPage = iPage THEN deY ELSE pdf_pageheight(pdfStream) - pdf_topmargin(pdfStream)). END PROCEDURE. PROCEDURE generatePdfPage: DEFINE INPUT PARAMETER pdfStream AS CHARACTER NO-UNDO. DEFINE INPUT PARAMETER pdfPage AS INTEGER NO-UNDO. IF pdfPage > iPage THEN RUN pdf_skip(pdfStream). END PROCEDURE. ------------------- but I think you will miss the finishPdfPage event in your version. what it does here is to ensure the outline won't go past the last line of the table; in case the added text triggers the creation of a new page, there won't be any outline either on the new page. The table header is still printed on the new page though.
Continue reading...
Continue reading...