Can we generate PDF/A document in RPE
2 answers
Currently, you cannot generate PDF/A output with RPE. You can expect RPE to support this in future release.
However, you should be able to use a Word macro to save output as PDF/A. Here is the macro that saves the .doc file (RPE Word output) as PDF/A file.
Sub Silent_save_to_PDFA()
ActiveDocument.ExportAsFixedFormat OutputFileName:= _
Replace(ActiveDocument.FullName, ".doc", ".pdf") , _
ExportFormat:=wdExportFormatPDF, OpenAfterExport:=False, OptimizeFor:= _
wdExportOptimizeForPrint, Range:=wdExportAllDocument, Item:= _
wdExportDocumentContent, IncludeDocProps:=False, KeepIRM:=True, _
CreateBookmarks:=wdExportCreateNoBookmarks, DocStructureTags:=True, _
BitmapMissingFonts:=True, UseISO19005_1:=True
End Sub
Sub Silent_save_to_PDFA()
ActiveDocument.ExportAsFixedFormat OutputFileName:= _
Replace(ActiveDocument.FullName, ".doc", ".pdf") , _
ExportFormat:=wdExportFormatPDF, OpenAfterExport:=False, OptimizeFor:= _
wdExportOptimizeForPrint, Range:=wdExportAllDocument, Item:= _
wdExportDocumentContent, IncludeDocProps:=False, KeepIRM:=True, _
CreateBookmarks:=wdExportCreateNoBookmarks, DocStructureTags:=True, _
BitmapMissingFonts:=True, UseISO19005_1:=True
End Sub
Comments
Hi Prasad,
I have saved the macro as .vbs file in RPE_HOME/utils/word folder and provided the macro name while generating the report ( publishing modules from IBM RDNG ) how ever the getting "CRRPE1064I Error running macro. Error: -2147352573 - Can't run the specified macro" error. Let me know if this is the correct way run the macro?
Thanks
You should enable command execution by setting the com.ibm.rational.rpe.enable_commands property to true in %rpe_home%\studio\rpe-studio.ini and %rpe_home%\launcher\rpe-launcher.ini.
Also note that docx is a macro free document and hence you need to save the Word output as .doc or .docm.
http://office.microsoft.com/en-in/word-help/office-open-xml-i-exploring-the-office-open-xml-formats-RZ010243529.aspx?section=4
For your reference, I am attaching a zip containing 3 files - sample RPE template, Word stylesheet containing macro and document specification file. Save, unzip and run document generation by opening the .dsx. You will find PDF/A output.