-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ftn2pdf outputs HTML #1
Comments
Probably the PoDoFo version detection is broken. Would you mind building an older commit and letting me know if it works? |
Suspecting the So Here is the working export: Thank you for this! Your solution is the best fit for my workflow. I am noticing some differences between the formatting output from your tool and the output from afterwriting. If I were to dive into the CSS and work on adding these, would that be of any help to you? Just trying to give back. Thanks again! |
Wow, I just put one of my full scripts through My questions are:
Odds are you have already done a few of these and I just missed them. Hoping I can be of some help on this project, even if it is mostly testing and tweaking CSS. |
I am modifying vim-fountain to handle all of the tags that you document. |
I just pushed an update to modify the build flags. Would you please build 4a93e3b and let me know if it works? I'm also curious about what OS/distro you're using. Recently, the PoDoFo library was updated (0.10.x) and is now completely incompatible with the version I used (0.9.x). So PDF export will be in a precarious position as distros move to the new library. I haven't used afterwriting before. From what I can tell, it uses html/javascript. This program/library is pure C++. I just found magicfountain, which might be worth looking into. Modifying the CSS files won't have any effect on PDF output. They're used only for presentation of the other formats in a web browser. It could help with printing from a web browser or using an HTML to PDF converter. If you know or find a good command-line converter, I'd be interested to know what it is. PDF output was hand coded/tweaked. That makes the code "messy". I originally tried to duplicate the output from other screenplay programs, but gave up on it because they were all different and I couldn't figure out the exact pagebreak rules they were using. It's been a while since I looked at the code, but I will try to answer your questions:
|
$ make
g++ -O3 -DENABLE_EXPORT_PDF -I . -c -o ftn2xml.o ftn2xml.cc
ftn2xml.cc: In function ‘int main(int, char**)’:
ftn2xml.cc:54:15: error: ‘ftn2pdf’ is not a member of ‘Fountain’; did you mean ‘ftn2fdx’?
54 | Fountain::ftn2pdf(argv[2], input);
| ^~~~~~~
| ftn2fdx
make: *** [<builtin>: ftn2xml.o] Error 1 Commenting out CPPFLAGS = -O3 -DENABLE_EXPORT_PDF -I . I am using Debian 12 Stable. So, it is likely 2 years before I will get PoDoFo v0.10.x :) I'll check "eXport Fountain (PDF)
map <silent><leader>xf <esc>:!ftn2pdf % %:r.pdf<cr>:!open %:r.pdf<cr> I had wrongly guessed that the CSS affected the output because I deal with html-based PDF generation so often. Before your code, To be clear, yours is better. Honestly, the more advanced page break handling is really impressive. I had put a Your CONT/MORE position makes sense. Like I said, your page breaks make it less needed. If there were a LibreOffice (ODT) output, I'd love to have the Sections and Synopses there. that would let me make some formatting tweaks and then use its PDF exporter. I wonder if it is possible to use the XML output that way? Implementing a PDF flag to include comments would be a nice enhancement. I am including a sample file here that I fed to |
Could you try building c1bf18e ? (Will have to use My distro (Arch) switched to PoDoFo 0.10.x, and I hadn't been able to build this with PDF support. I figured it out a moment ago, but it breaks building on Debian.
The pro and con of Debian.
I appreciate the compliment. How did you find this program, and what prompted your search? Did you try
The programs' functionality are really bare because they were written as tests/demos. I mainly wrote this to generate real-time previews for a Geany plugin. I don't mind fixing bugs and possibly making minor adjustments, but would prefer to avoid major overhauls. A lot of things are difficult to change. It's basically processing XML without a proper XML parser.
You can convert with
It doesn't seem to work with LibreOffice, but does with Firefox. You'll have to fix the font size in the css file. It's set to 8pt instead of 12pt because that's what my Geany plugin uses for previews. The html output of section headers and synopses is incorrect. I'll take a look at it after this issue is resolved. |
It looks like c1bf18e fixes it! 🥳 | I figured it out a moment ago Fantastic! Good to hear! | The pro and con of Debian. Indeed 🙂 | How did you find this program, and what prompted your search? I had been searching a lot. I am pretty sure that searching | Did you try I did. The | Wondering about what you tried and what you thought. My goal was to continue to write in Vim, using Other things I tried incude (in no particular order):
For sake of completeness, I also found this for Google Docs: For dedicated apps, I like:
I was also planning on asking the | LibreOffice ... XML ... I am going to mess around with it and see what I can do, maybe pipe your output to |
Keeping you in the loop: kblin/vim-fountain#2 |
So, I spoke too soon. When converting 6 scripts, 1 converts perfectly, 1 loses the title page, and the rest show up as empty PDFs. I have tried both HEAD and the commit before the compile note. |
Sorry I somehow missed your last message. Do you have copies of the problem scripts stored somewhere so I can look at them? I would also like to revise the title page according to "The Hollywood Standard". Don't know when I'll get around to it though. |
I find the current title page it generates looks exactly the same as any other hollywood script. What more standard could it be? Unless I'm mistaken. |
"The Hollywood Standard" is a book I learned about after I had already written this program. The difference is probably a missing or extra space here or there. Title pages probably have some variation anyway, but if I get around to it, would be nice to follow some well-known reference. |
Closing this issue because it was resolved by updating compiler flags. If there are problems buried in comments or new ones, feel free to open a new issue. For pdf export with podofo 0.10.x, use the main branch (versions numbered 0.1.x). For podofo 0.9.x, use the v0.0.x branch. |
The command I ran
ftn2pdf sample.fountain sample.pdf
The sample script
When trying to open the resulting file, I get this error
Here is the file
sample.pdf
Changing the filetype to .html does give proper HTML
The text was updated successfully, but these errors were encountered: