Cannot import image into the report
See original GitHub issueHi,
I am not able to import the image into the report.
I created a client, added a project, added findings, and everything else is fine with the report. I can export the report successfully without the evidence.
But when I attach the evidence and try to export the report in docx. I’m getting the below error message:-
Great Failure
Encountered an error generating the document: no style with name Caption
I am using jpg & png format report only.
Issue Analytics
- State:
- Created 3 years ago
- Comments:5
Top Results From Across the Web
Rep -0820 Cannot import specified image - Oracle Communities
Hi, I have a report on which I have to replace the existing logo with a new one. I open the report in...
Read more >Oracle Reports REP-0820: Cannot import specified image
Try to crop the image - open it, select its inner part (leave e.g. 1mm margin) and crop it. Save, try to import....
Read more >Reports & Discoverer » REP-0820 cannot import image
Hi, I am getting 'REP-0820 Cannot import specified image' error, while trying to import an image.It is not corrupted, as i can open...
Read more >[bug] Cannot import images. #1194 - alicevision/Meshroom
Describe the bug. Images cannot be imported. To Reproduce Steps to reproduce the behavior: Drag and drop image files into meshroom or use ......
Read more >Cannot import images into word online: "Sorry, your image is
The image I am trying to import is the following: 1408x1242 px, 334 kb, jpg format. The file in not corrupted.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This is not something we’ve run into before, but think we have an answer. “Caption” should be a built-in style with Word. This style is applied whenever you insert an evidence file or use the
{{.caption}}
keyword.However, if that style has never been used in your template document then it may not actually exist in the file (thanks Microsoft). This is an oversight in the linting process, but we will add a check in a future release.
In your template, try this:
Please let us know if this fixes your issue and we’ll get the linting changes pushed into the project!
Side Note: Also verify that the provided template in the project works for you with your evidence: https://github.com/GhostManager/Ghostwriter/blob/master/DOCS/sample_reports/so-con_template.docx
Thanks for bringing this up!
For the record, we added some additional template linting checks to look for the caption style and a few others. If they are missing from the template, Ghostwriter’s linter will display a warning. If you use the template anyway, the reporting engine will make its own version of the style, which you can then edit to make adjustments.
Word’s built-in styles are only added to your template’s
styles.xml
when you use them. Once you have applied the style at least once, it will be part of the XML. All other unused “latent” and built-in styles only exist in the Word application. So, if you apply a style likeCaption
once, save the document (for good measure), and then undo the style, thestyles.xml
will contain theCaption
style.I also added some notes about this to the wiki. The linter warnings direct you there for this information.