Coder Social home page Coder Social logo

Can't generate PDF files about rdm HOT 11 CLOSED

innolitics avatar innolitics commented on September 16, 2024
Can't generate PDF files

from rdm.

Comments (11)

johndgiese avatar johndgiese commented on September 16, 2024

Thank you for your interest in RDM. We would be happy to help sort out this problem you are running into. What version of rdm did you install (e.g., when I run pip freeze | grep rdm I see that I am running rdm==0.7.0? Also, could you copy the console output (i.e., stdout and stderr) when you run make clean && make pdfs?


I just ran rdm init && cd regulatory && make pdfs, and I run into this error:

FileNotFoundError: [Errno 2] No such file or directory: 'images/uimockups/example-ui-mockup-001.png'

It seems that our default template setup is missing one of the example images. If, by any chance, you are running into the same error (and I suspect you are not given your comments) then a temporary fix to this problem would be to delete the contents of the ui_mockups block inside software_design_specification.md and run make pdfs again.

from rdm.

QM-OSchwab avatar QM-OSchwab commented on September 16, 2024

OK. I'm ashamed now. I did not realized that you must explicitely make pdfs. I thought that make alone would make all the targets..... Now pdf are building, and I reach your expected error about the missing image.

Sorry for that.

from rdm.

johndgiese avatar johndgiese commented on September 16, 2024

Great I'm glad it was something simple! I will update the README to mention this, since it is not obvious.

I hope RDM is useful for you; please let us know if there are features we could implement which would make it even more useful. It is still a very young project and we are looking for feedback regarding which directions to grow it in.

from rdm.

QM-OSchwab avatar QM-OSchwab commented on September 16, 2024

I'm evaluating RDM at the moment. I work in a small company, and we want to ship our future software in Europe and USA. I find the principe really great. My problem will be interfacing (private github project, handle nUnit reports, ...).

from rdm.

johndgiese avatar johndgiese commented on September 16, 2024

Let me know if you have any questions while you evaluate RDM; I am one of the co-founders of Innoliitcs---the company that sponsors development of RDM---and I would be happy to answer any questions you have.

from rdm.

QM-OSchwab avatar QM-OSchwab commented on September 16, 2024

Hello John,

I can't generate software_plan.md , it ends with
! Undefined control sequence. \grffile@filename ->./tmp/images\lifecycle -processes.pdf l.269 ...th]{./tmp/images\lifecycle-processes.pdf}

(see log ).

Am I doing something wrong again ?

from rdm.

johndgiese avatar johndgiese commented on September 16, 2024

@QM-OSchwab based on your uploaded log file (thank you!) it seems like there is an issue with the SVG -> PDF conversion.

One of the goals of RDM is to support a text format (markdown) as well as a nice looking professional format (PDF for now, DOCX at some point down the road). SVGs are very nice for diagrams, and SVGs work well in markdown. But latex files don't support embedding SVGs, we have a separate step that converts the SVGs to PDFs before rendering the PDF (you may have read about this in the README).

When you installed rdm, did you use pip install rdm[svg] or just pip install rdm? If the latter, then I believe your installation of rdm will not include the libraries necessary to convert the SVG to a PDF. In that case, I would try uninstalling rdm and then reinstalling it with svg support. (Perhaps we should include SVG support by default, since our default templates require it and it is reasonable to expect the default templates will work out of the box?)

If you already have installed rdm with SVG support, then can you confirm that regulatory/tmp/images/lifecycle-processes.pdf exists?

from rdm.

QM-OSchwab avatar QM-OSchwab commented on September 16, 2024

Not sure if I used rdm or rdm[svg] for install so I've uninstalled and reinstalled with svg support.
Now regulatory/tmp/images/lifecycle-processes.pdf exists (and is valid) .
During generation of software_plan , there 's a question mark prompt:

("C:\Program Files\MiKTeX 2.9\tex/latex/lm\t1lmtt.fd")

LaTeX Warning: Reference `LastPage' on page 2 undefined on input line 167.

[2]

LaTeX Warning: Reference `LastPage' on page 3 undefined on input line 249.

[3]
! Undefined control sequence.
\grffile@filename ->./tmp/images\lifecycle
                                           -processes.pdf
l.269 ...th]{./tmp/images\lifecycle-processes.pdf}

?

If I press enter , generation continues then prompt again:

LaTeX Warning: File `./tmp/images-processes.pdf' not found on input line 269.


! Package pdftex.def Error: File `./tmp/images-processes.pdf' not found: using
draft setting.

See the pdftex.def package documentation for explanation.
Type  H <return>  for immediate help.
 ...

l.269 ...th]{./tmp/images\lifecycle-processes.pdf}

?

./tmp/images-processes.pdf' effectively doesn't exist, and I don't have any images-processes.* file on my system.

If I press enter again, it finished the process with this at the end :

Latexmk: Summary of warnings from last run of (pdf)latex:
  Latex failed to resolve 12 reference(s)
Latexmk: Errors, so I did not complete making targets
Collected error summary (may duplicate other messages):
  pdflatex: Command for 'pdflatex' gave return code 1
      Refer to './tmp/software_plan.log' for details
Latexmk: Use the -f option to force complete processing,
 unless error was exceeding maximum runs, or warnings treated as errors.
make: *** [tmp/software_plan.pdf] Error 12

Then make stops, SRS is not generated.

Side question : is it feasible to add new documents ? I would like to roughly follow this , and some docs (like project management plan) are missing.

Thanks by advance for your help

from rdm.

johndgiese avatar johndgiese commented on September 16, 2024

@QM-OSchwab I believe the issue is that our path handling seems to use UNIX-style endings. I will try to push up a fix at some point soon. When I do so, I will let you know!

In the mean time, to get the files to compile, you can add this code to your documents/software_plan.md file:

{% block activity_diagram %} ACTIVITY DIAGRAM GOES HERE {% endblock %}

This will replace the default activity diagram with the text "ACTIVITY DIAGRAM GOES HERE". I suspect the pdfs should compile once this is added.

It is certainly possible to add new documents. Any markdown files added to the documents folder will be automatically compiled. They need to have the appropriate YAML front matter to work, however. We are planning on writing out more thorough documentation about all of this sometime soon; so far we have been using the tool internally, and hadn't expected as much external interest as we have seen so far.

Internally, we use the Jinja templating language:

http://jinja.pocoo.org/docs/2.10/templates/

from rdm.

QM-OSchwab avatar QM-OSchwab commented on September 16, 2024

Hello David,

It works great now , thank you !

I would like to customize header (add project name, and logo) ; I have some python knowledge so I forked the project to try to do this by myself. So maybe I'll propose a pull request soon.

Rgds,

from rdm.

johndgiese avatar johndgiese commented on September 16, 2024

@QM-OSchwab great! Let me know if you have any questions.

FYI We are planning on creating a plugin system for the MD → TEX conversion, similarly to how we have plugins for the JINJA MD → MD conversion. I can imagine that this would be helpful, e.g., for customizing the latex headers that get produced. If this sounds like something you would be interested in, we can push to include it in the next release, along with the windows filepath bugfix.

from rdm.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.