# Graphviz cannot convert dot file to PDF

**URL:** <https://forum.graphviz.org/t/graphviz-cannot-convert-dot-file-to-pdf/944>\
**Category:** Help\
**Created:** [December 10, 2021, 2:53am UTC](https://forum.graphviz.org/t/graphviz-cannot-convert-dot-file-to-pdf/944 "2021-12-10T02:53:24Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Terry](https://avatars.discourse-cdn.com/v4/letter/t/b9e5f3/32.png) [@Terry](https://forum.graphviz.org/u/Terry)\
**Post date:** [December 10, 2021, 2:53am UTC](https://forum.graphviz.org/t/graphviz-cannot-convert-dot-file-to-pdf/944/1 "2021-12-10T02:53:24Z")

</div>

[icfg\_final.dot](https://forum.graphviz.org/uploads/short-url/ak7HeDRd1EVY9LeR6FEn2GzBk1X.dot) (792.3 KB)  
Hi all, I can not convert this file to PDF or any other format, Graphviz won’t stop when convert this file.  
My Graphviz version is 2.40.1. May someone give me some advice, thanks…

---

<div class="post-metadata">

**Author:** ![steveroush](https://avatars.discourse-cdn.com/v4/letter/s/a9adbd/32.png) [@steveroush](https://forum.graphviz.org/u/steveroush)\
**Post date:** [December 10, 2021, 4:10am UTC](https://forum.graphviz.org/t/graphviz-cannot-convert-dot-file-to-pdf/944/2 "2021-12-10T04:10:35Z")

</div>

- What OS are you using?
- What command line are you using?
- What does happen when you run the command?

---

<div class="post-metadata">

**Author:** ![Terry](https://avatars.discourse-cdn.com/v4/letter/t/b9e5f3/32.png) [@Terry](https://forum.graphviz.org/u/Terry)\
**Post date:** [December 10, 2021, 4:37am UTC](https://forum.graphviz.org/t/graphviz-cannot-convert-dot-file-to-pdf/944/3 "2021-12-10T04:37:01Z")

</div>

Thanks for replay.

1. the OS I am using is Ubuntu 18.04.5 LTS
2. command line I am using is `dot -Tpdf -O icfg_final.dot`
3. when I run the command, the program just won’t stop, no error. Then I press CTRL+C to stop it and check the output PDF file, it contains nothing.

---

<div class="post-metadata">

**Author:** ![steveroush](https://avatars.discourse-cdn.com/v4/letter/s/a9adbd/32.png) [@steveroush](https://forum.graphviz.org/u/steveroush)\
**Post date:** [December 10, 2021, 5:37am UTC](https://forum.graphviz.org/t/graphviz-cannot-convert-dot-file-to-pdf/944/4 "2021-12-10T05:37:36Z")

</div>

**Dot** was getting stuck in the second “network simplex” invocation. Here is a command line that should give you output in 3 to 5 minutes (+/-):  
`dot -Tpdf -Gnslimit=2 -Gnslimit1=2 -Gmaxiter=5000 `  
(see [Where does generating the graph take most of the time? - #4 by ethuo](https://forum.graphviz.org/t/where-does-generating-the-graph-take-most-of-the-time/668/4) for more on this)  
I think SVG will work better than PDF.  
You may want to consider reworking your nodes to get them narrower (by eliminating text or adding newlines).

---

<div class="post-metadata">

**Author:** ![Terry](https://avatars.discourse-cdn.com/v4/letter/t/b9e5f3/32.png) [@Terry](https://forum.graphviz.org/u/Terry)\
**Post date:** [December 10, 2021, 5:50am UTC](https://forum.graphviz.org/t/graphviz-cannot-convert-dot-file-to-pdf/944/5 "2021-12-10T05:50:38Z")

</div>

Appreciate! I will have a try!
