New Blog Post: PDF/A and Metadata
Adding Pages to subreports in code
I have a situation where I need to be able to add pages to subreports
That is, I'm loading a PDF file page-by-page, converting to emf, and
loading the emf to a full-page ppImage.
Because the PDF may have 1-?? pages, I need to be able to add a page on
I guess the alternative would be to do something like:
1) have a "subreport" cds with fields:
filename- the PDF filename
pgNo - counter for page0-n in filename
2) In main ppReport, OnGroupHeader1BeforePrint
- get PDF file name from current record
- clear cds
- get pagecount from actual pdf file
- for pNo=0 to pagecount
insert rec in CDS ( filename, pNo)
(that is, create a record for each page in the PDF, so I can use the
pNo to load and render the appropriate page).
3) use the cds for the subreport, break on pNo
4) in subreport before print,
- load the pdf,
- render the appropriate pdf pageno to emf
- copy the emf to ppImage1
Hmm, if the subreport is in a GroupFooter, probably better to load PDF
once in GroupFooterBeforePRint then release in AfterPrint.
Anyway... Is there a simpler solution?
This discussion has been closed.