RAFMerge and renumber
I have RBuilder 22.01, it seems renumbering archive report with RafMerge doesn't work well.
In TppRAFMerge, the property FRenumberPages is forced to True. It is not possible to deactivate the renumbering.
Even with this code, renumbering of page number from archive files is not happening.
Process to reproduce :
1) Generate 2 archive files with system variable with varType := vtPageNoDesc;
2) Merge the 2 archive files, the page numbers are unchanged.
Code Example:
lTempFileName := 'MergeFile.raf';
lArchiveReader:= TppArchiveReader.Create(nil);
try
lArchiveReader.MergeUtility.DeleteSourceFiles := False;
lArchiveReader.MergeUtility.RenumberPages := True;
lArchiveReader.MergeUtility.SourceFiles.Add('ReportArchive.raf');
lArchiveReader.MergeUtility.SourceFiles.Add('ReportArchive.raf');
lArchiveReader.MergeUtility.DestinationFile := lTempFileName;
lArchiveReader.MergeUtility.Execute;
lArchiveReader.Device := dvFile;
lArchiveReader.DeviceType := dtPDF;
lArchiveReader.ArchiveFileName := lTempFileName;
lArchiveReader.TextFileName := 'MergeFile.pdf';
lArchiveReader.ShowCancelDialog := False;
lArchiveReader.ShowPrintDialog := False;
lArchiveReader.Print;
//pages are not renumbered in MergeFile.pdf
finally
lArchiveReader.Free;
end;
How can we make it work ?
Is it possible to start renumbering from any number ? I would like my page numbers to look like page 3 (on first page), page 4 on 2nd page, and so on.
thanks.
In TppRAFMerge, the property FRenumberPages is forced to True. It is not possible to deactivate the renumbering.
Even with this code, renumbering of page number from archive files is not happening.
Process to reproduce :
1) Generate 2 archive files with system variable with varType := vtPageNoDesc;
2) Merge the 2 archive files, the page numbers are unchanged.
Code Example:
lTempFileName := 'MergeFile.raf';
lArchiveReader:= TppArchiveReader.Create(nil);
try
lArchiveReader.MergeUtility.DeleteSourceFiles := False;
lArchiveReader.MergeUtility.RenumberPages := True;
lArchiveReader.MergeUtility.SourceFiles.Add('ReportArchive.raf');
lArchiveReader.MergeUtility.SourceFiles.Add('ReportArchive.raf');
lArchiveReader.MergeUtility.DestinationFile := lTempFileName;
lArchiveReader.MergeUtility.Execute;
lArchiveReader.Device := dvFile;
lArchiveReader.DeviceType := dtPDF;
lArchiveReader.ArchiveFileName := lTempFileName;
lArchiveReader.TextFileName := 'MergeFile.pdf';
lArchiveReader.ShowCancelDialog := False;
lArchiveReader.ShowPrintDialog := False;
lArchiveReader.Print;
//pages are not renumbered in MergeFile.pdf
finally
lArchiveReader.Free;
end;
How can we make it work ?
Is it possible to start renumbering from any number ? I would like my page numbers to look like page 3 (on first page), page 4 on 2nd page, and so on.
thanks.
Comments
I created a patch for RB 22.01 to resolve these issues. Developers with an active RB 22.01 license can email support@ and request the patch.
There is currently no way to specify a starting page number. I’ll add this to the requested feature list. Thanks for the feedback.
Best regards,
Nard Moseley
Digital Metaphors
www.digital-metaphors.com