Expand my Community achievements bar.

SOLVED

PDF File could not be generated - AEM Guides - DITA Implementation

Avatar

Community Advisor

Hi AEM Community,

 

I am new to Guides and currently doing a POC on setting up simple DITA implementation wherein we generate a PDF using DITA Template.

 

I have installed AEM Guides 4.2 from the software distribution and got access to the Guides in Navigation.

I have created a new folder "Test PDF Template" under dita-templates/pdf where we had 3 folders (Basic, Hi-Tech and Prime) already created.
I added 2 DITA Topics and 1 Dita Map as shown below - 

Rohan_Garg_0-1684334194379.png

 

When I try to output this folder/template to PDF Preset, I get the error "PDF Generation Failed" with below logs - 

Rohan_Garg_1-1684334276133.png

 

[fop] [ERROR] Anttask - Error rendering fo file: D:\Project\AEM_Author\crx-quickstart\profiles\ditamaps\ditamap16299010202468616354\temp\temp20230517200714751\topic.fo <org.apache.fop.apps.FOPException: net.sf.saxon.trans.XPathException: org.apache.fop.fo.ValidationException: "fo:flow" is missing child elements. Required content model: marker* (%block;)+ (See position 1:-1)
[fop] net.sf.saxon.trans.XPathException: org.apache.fop.fo.ValidationException: "fo:flow" is missing child elements. Required content model: marker* (%block;)+ (See position 1:-1)>org.apache.fop.apps.FOPException: net.sf.saxon.trans.XPathException: org.apache.fop.fo.ValidationException: "fo:flow" is missing child elements. Required content model: marker* (%block;)+ (See position 1:-1)
[fop] net.sf.saxon.trans.XPathException: org.apache.fop.fo.ValidationException: "fo:flow" is missing child elements. Required content model: marker* (%block;)+ (See position 1:-1)

BUILD FAILED
D:\Project\AEM_Author\crx-quickstart\profiles\ditaot--b1aad0a7-9079-e56c-1ed8-6fcababe8166\DITA-OT\plugins\org.dita.base\build.xml:31: The following error occurred while executing this line:
D:\Project\AEM_Author\crx-quickstart\profiles\ditaot--b1aad0a7-9079-e56c-1ed8-6fcababe8166\DITA-OT\plugins\org.dita.pdf2\build.xml:151: The following error occurred while executing this line:
D:\Project\AEM_Author\crx-quickstart\profiles\ditaot--b1aad0a7-9079-e56c-1ed8-6fcababe8166\DITA-OT\plugins\org.dita.pdf2.fop\build_fop.xml:156: [PDFX013F][FATAL] The PDF file 'build-Dummy-Map/Dummy-Map.pdf' could not be generated.

 

Can someone help what is wrong in the above approach?

@frameexpert@DivrajSingh@VivekKumar@punagpal@kautuk_sahni 

 

Thanks,

Rohan Garg

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi Frank, 

 

Thanks for the prompt reply! Please find the map file in Author mode as requested.

The folder has 2 topic files (Dummy Topic and RG) and 1 map file (Test Dita Map)

 

Rohan_Garg_0-1684371295455.png

 

There is no broken DITA syntax as that is usually highlighted in red with the editor.

Previously, the DITA map file only had title and no reference to the DITA topics which gave error in processing the DITA map file.
Is having reference to DITA topic mandatory for DITA map to process the PDF?

 

Once the DITA map file was updated to have reference to the 2 topic files, the issue got fixed!

 

Thanks,

Rohan

View solution in original post

6 Replies

Avatar

Level 3

Hi Rohan,

That could be a broken DITA file. Can you open the map and topics in Author or Preview view? If so, the files should be ok and the fault lies probably with the PDF generation. If not, check your files for broken DITA syntax.

Hope that helps.

Frank

Avatar

Correct answer by
Community Advisor

Hi Frank, 

 

Thanks for the prompt reply! Please find the map file in Author mode as requested.

The folder has 2 topic files (Dummy Topic and RG) and 1 map file (Test Dita Map)

 

Rohan_Garg_0-1684371295455.png

 

There is no broken DITA syntax as that is usually highlighted in red with the editor.

Previously, the DITA map file only had title and no reference to the DITA topics which gave error in processing the DITA map file.
Is having reference to DITA topic mandatory for DITA map to process the PDF?

 

Once the DITA map file was updated to have reference to the 2 topic files, the issue got fixed!

 

Thanks,

Rohan

Avatar

Level 3

Hi Rohan,

Great that you could fix this. A DITA map provides the structure of a DITA document whereas the DITA topics contain the actual content. A map without any referenced topic is basically an empty document from which you cannot create a PDF output.

Best regards,

Frank

 

 

Avatar

Employee

Can you also share the screenshot of the preset details (screenshot) that you are generating? Also, a suggestion don't create your dita content under dita-templates folder. Create your content folder parallel to dita-templates and keep your dita files there.

Avatar

Community Advisor

Hi @VivekKumar,

Thanks for the response!

I have not configured any preset settings for the PDF or HTML as such. I am using OTB settings.

I have also created a copy of the content folder parallel to dita-templates but still getting the same error.

Is it just a common practice to create the folder parallel to dita template or any other particular reason?

Avatar

Employee

Just a good practice to not create topics and maps inside dita-templates folder, nothing else.