opened
talhaham
username_0
Hello,
I'm trying to generate the CEP GE (of FIWARE) pdf out of the markdown files.
The process seems to run fine, but then it stuck, and the generated pdf file has 0 bytes.

Here is the command line and the console print:
tali-mac:fiware-markdown-to-pdf tali$ md2pdf -i /Users/tali/Proton/mkdocsInstallationGuide.yml -o /Users/tali/Documents/Projects/CEP-10/FiWare/md2pdf/out/out.pdf -c /Users/tali/Proton/cover_metatada.yml
Processing file [/Users/tali/Proton/documentation/markdown/index.md] ...
Processing file [/Users/tali/Proton/documentation/markdown/index.md] ...OK
Processing file [/Users/tali/Proton/documentation/markdown/Proton-InstallationAndAdminGuide.md] ...
Processing file [/Users/tali/Proton/documentation/markdown/Proton-InstallationAndAdminGuide.md] ...OK
Generating PDF...
Generating PDF...OK

The process does not terminate and the generated pdf file has 0 bytes.
When I kill it I see the following:
^CTraceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/2.7/bin/md2pdf", line 9, in <module>
    load_entry_point('markdown-to-pdf==0.1', 'console_scripts', 'md2pdf')()
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/markdown_to_pdf-0.1-py2.7.egg/markdown_to_pdf/markdown_to_pdf.py", line 487, in main
    merge_cover_with_content([temp_cover_pdf_path, temp_pdf_path], output_pdf_file)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/markdown_to_pdf-0.1-py2.7.egg/markdown_to_pdf/markdown_to_pdf.py", line 379, in merge_cover_with_content
    call(["pdftk", pdf_files_list[0], pdf_files_list[1], "output", output_pdf])
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 522, in call
    return Popen(*popenargs, **kwargs).wait()
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 1384, in wait
    pid, sts = _eintr_retry_call(os.waitpid, self.pid, 0)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 476, in _eintr_retry_call
    return func(*args)
KeyboardInterrupt

The git repository with all the md files (and the nkdown.yml) is at:
https://github.com/ishkin/Proton

Since I wanted to see how it deals with the simple md, I created a subset yml file - mkdocsInstallationGuide.yml:

site_name: Proactive-Technology-Online
site_url: https://proactive-technology-online.readthedocs.org
repo_url: https://github.com/ishkin/Proton.git
site_description: Proactive Technology Online Documentation
docs_dir: documentation/markdown
site_dir: html
markdown_extensions: [toc,fenced_code]
use_directory_urls: false
theme: readthedocs
extra_css: ["http://fiware.org/style/ogilvy.css"]

pages:
  -  Home: index.md  
  - 'Installation and Administration Manual': 'Proton-InstallationAndAdminGuide.md'

And a simple cover file:
cover_metadata:
    title: 'Proactive Technology Online Guide'

Any idea what is the problem? 
Thanks!
Tali
The process seems to be stuck
issue
created
FiwareULPGC
username_1
Hello!
We have tried to reproduce your issue and we were unable to reproduce it.

We have run md2pdf using the mkdocs.yml file located at the top level of your repository running the following command:

```
md2pdf -i mkdocs.yml -o output_with_mkdocsyml.pdf
```
It generates a PDF file with an autogenerated cover as expected.

We also tried the generation using the configurations that you described here (but previously we have fixed the tabulation of the title line in the cover file)

```
 md2pdf -i mkdocsInstallationGuide.yml  -c cover_metadata.yml -o output_using_cover_and_subset.pdf
```

We provided as attachments the PDF files generated during our tests.
[output_using_cover_and_subset.pdf](https://github.com/username_1/fiware-markdown-to-pdf/files/81066/output_using_cover_and_subset.pdf)
[output_with_mkdocsyml.pdf](https://github.com/username_1/fiware-markdown-to-pdf/files/81067/output_with_mkdocsyml.pdf)

In order to perform more test we need some extra information:
 * Which platform are you using to generate the PDF file?
 * Are you using the last version of md2pdf? (Currently 0.2)
 * Have you tried to use the provided Docker container? (<https://github.com/username_1/fiware-markdown-to-pdf#quick-start-guide-with-docker>)
comment
created
talhaham
username_0
Thank you for your help, and for the generated output.

Some information:
1. I run on a mac (OS X El Capitan)
2. I took the md2pdf from git on January 5, 2015, it seems to be v0.2
3, No, I failed to install Docker on my mac, so I installed the md2pdf
according to your OSX instructions. The installation seems to work fine,
except for updating the pip (I have Python 2.7.9). Beside that the
installation of the md2pdf seems to be fine, even without the updated pip.

Thank you,
Tali
comment
created
FiwareULPGC
username_1
It seems that there is a problem using PDFtk-server on OS X 10.11 El Capitan.

PDF Labs is providing a specific installer to solve this issue:
<https://www.pdflabs.com/tools/pdftk-the-pdf-toolkit/pdftk_server-2.02-mac_osx-10.11-setup.pkg>

Please, install this version of PDFtk-server and try md2pdf again.

Regards.
comment
closed
talhaham
username_0
issue
created
talhaham
username_0
Thank you! 
It solve my issue
comment