question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot import image into the report

See original GitHub issue

Hi,

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:closed
  • Created 3 years ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
andrewchilescommented, Jan 27, 2021

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:

  • Add a new line of text
  • Highlight the line
  • Apply the default “Caption” Style to the line
  • Save the template
  • Close Word
  • Re-open the template
  • Delete this line
  • Save the template
  • Re-upload the template to Ghostwriter
  • Generate your report

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

0reactions
chrismaddalenacommented, Mar 2, 2021

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 like Caption once, save the document (for good measure), and then undo the style, the styles.xml will contain the Caption style.

I also added some notes about this to the wiki. The linter warnings direct you there for this information.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found