Is there any open source tool to convert PDF to SWF other than pdf2swf tools?
pdf2swf uses "xpdf" to process PDF files.
You can try ImageMagic, it uses a different library (gscript) to process PDF files. You will have to convert to some intermediate format (like JPG/ SVG) and use a different tool to create SWF.
Have you tried SWFTOOLS? On Debian/Unbuntu:
sudo apt-get install swftools
pdf2swf filename.pdf
http://wiki.swftools.org/index.php/Examples#pdf2swf They have a Windows version, and the source so you can compile it on other Linux flavors
Related
I need to convert 800+pdf files into html webpage, and every pdf file had own page on html webpage.
I tried to make with Adobe Acrobat, but what i get was every pdf merged in one big list.
So is there any way to automatically do this?
You could use pdftohtml on Linux and make it loop through all the files in the directory.
You can also find more information about pdftohtml on this thread: How to convert PDF to HTML?
pdf2htmlEX
Preserves formatting of the PDF file
Only works through docker (On new builds of Linux, this package is not present and deb packages are not installed)
sudo docker pull bwits/pdf2htmlex
sudo docker run -ti --rm -v /home/user/Documents/pdfToHtml:/pdf bwits/pdf2htmlex pdf2htmlEX --zoom 1.3 file.pdf
I am trying to build Sphinx doc output as PDF rather than HTML. I can only use the tools which come with Sphinx, i.e. I cannot download additionl tools like rst2pdf. I have tried using 'make latexpdf', per the Sphinx documentation, which states it will produce pdf in addition to the .tex files. However I am only getting .tex. What am I missing? The Sphinx documentation states that PDF files will be produced.
Sphinx uses Latex to export the documentation as a PDF file.
Thus one needs the basic Latex dependencies used to write a pdf on the system.
For example, on a system running Ubuntu 16.04, they can be downloaded and installed by :
apt-get install texlive-latex-recommended texlive-latex-extra texlive-fonts-recommended
If running Sphinx 1.6 or above on GNU/Linux or OSX, you may also need the latexmk package.
Reference: sphinx.builders.latex.LaTeXBuilder documentation.
After installing the above packages, running make latexpdf in the sphinx project directory generates the documentation output as the PDF file ./_build/latex/<sphinx-project-name>.pdf>
Note: In the current scenario where you do not see a PDF file on your system after running make latexpdf, check the output of the command for any errors regarding missing latex tools/files. Use the system package manager to identify the missing packages and install them.
I have a Markdown file that I wish to convert to PDF so that I can upload it on Speakerdeck. I am using Pandoc to convert from markdown to PDF.
My problem is I can't specify what content should go on what page of the PDF, because Markdown doesn't provide any feature like that.
E.g., Markdown:
###Hello
* abc
* def
###Bye
* ghi
* jkl
Now I want Hello to be one slide and Bye to be on another slide on Speakerdeck. So, I will need them to be on different pages in the PDF that I generate using Pandoc.
But both Hello and Bye gets on the same page in the PDF.
How can I accomplish this?
Via the terminal (tested in 2020)
Download dependencies
sudo apt-get install pandoc texlive-latex-base texlive-fonts-recommended texlive-extra-utils texlive-latex-extra
Try to use
pandoc MANUAL.txt -o example13.pdf
pandoc MANUAL.md -o example13.pdf
Via a Visual Studio Code extension (tested in 2020)
Download the Yzane Markdown PDF extension
Right click inside a Markdown file (md)
The content below will appear
Select the Markdown PDF: Export (pdf) option
Note: Emojis are better in Windows than Linux (I don't know why)
2016 update:
NPM module: https://github.com/alanshaw/markdown-pdf
Has a command line interface: https://github.com/alanshaw/markdown-pdf#usage
npm install -g markdown-pdf
markdown-pdf <markdown-file-path>
Or, an online service: http://markdown2pdf.com
As SpeakerDeck only accepts PDF files, the easiest option is to use the Latex Beamer backend for pandoc:
pandoc -t beamer -o output.pdf yourInput.mkd
Note that you should have LaTeX Beamer installed for that.
In Ubuntu, you can do sudo apt-get install texlive-latex-recommended to install it. If you use Windows, you may try this answer.
You may also want to try the HTML/CSS output from Slidy:
pandoc --self-contained -t slidy -o output-slidy.html yourInput.mkd
It has a decent printing output, as you can check out trying to print the original.
Read more about slideshows with pandoc here.
Easy online solution: dillinger.io.
Just paste your Markdown content into the editor on the left and see the (html) preview on the right. Then click Export as on the top and chose pdf.
It's based on the open source dillinger editor.
Adding to elias' answer, if you want to separate text in slides, just put *** between the text you want to separate. For your example to be in several pages, write it like this:
### Hello
- abc
- def
***
### Bye
- ghi
- jkl
And then use elias' answer, pandoc -t beamer -o output.pdf yourInput.md.
I have Ubuntu 18.10 (Cosmic Cuttlefish) and installed the full package from texlive. It works for me.
Previously I had used the npm markdown-pdf answer. However, on a fresh install of Ubuntu 19.04 (Disco Dingo) I had issues getting it to install correctly.
Instead I started using the Visual Studio Code package: "Markdown PDF"
Details:
Name: Markdown PDF
Id: yzane.markdown-pdf
Description: Convert Markdown to PDF
Version: 1.2.0
Publisher: yzane
Visual Studio Marketplace link: https://marketplace.visualstudio.com/items?itemName=yzane.markdown-pdf
It has worked consistently well. If you've had issues getting other answers to work, I would recommend trying this.
I've managed to get a stable Markdown -> HTML > PDF pipeline working with the MarkReport project.
It is a bit more than what Pandoc will do though, since it is based on WeasyPrint and is therefore aimed for clean report publishing, with cover, headers, sections, ...
It also enriches the HTML with syntax highlighting and LaTeX equations.
Simple way with iOS:
Use Shortcuts app (by Apple)
Make Rich Text From Markdown: Clipboard
^
Make PDF from Rich Text From Markdown
^
Show [PDF] in Quick Look
Just copy text and run the shortcut. Press share in Quick Look (bottom left) to store or send it. I use this to quickly convert Joplin notes to pdf.
I found that many markdown-to-pdf converters produce files that I don't find exactly neat-looking. However there is a solution to this.
If you're using IntelliJ, you can use a plugin called "Markdown". The export function uses pandoc as an engine so you probably will need to install that along with pdf-latex. https://pandoc.org/installing.html
In IntelliJ, under Tools > Markdown Converter > Export Markdown File To...
And there you go, a clean looking document. Additional styling can be added via a .css stylesheet.
Is there a tool that generates both PDF and CHM documentation from Markdown (or similar, such as RST) on Windows.
We are currently using Sphinx, but have been unable to get the PDF generation working on Windows (this guy has the same issue). It's a pain to have to generate the CHM on Windows and the PDF version on Linux (and I do need to generate both versions).
Is there an alternative tool (free or inexpensive commercial) that could do this task?
The source format must be in a plain-text-like format for version control, of which Markdown and RST are examples.
The Free Pascal distribution holds a CHM compiler called chmcmd. Some people with documentation tools report success with it (like the Preshrunk-cotton python package)
Some Linux distros also pack the chm compiler independently from the main FPC distribution. (since it only is a 700k binary without dependencies).
On Windows you can use the same (the windows version of chmcmd), or Microsoft Help Workshop, the default CHM generator from MS.
That's the CHM compiler part, now the input:
A CHM project before compilation is basically just html with a couple of XML indexes (TOC and master keyword based index) and a project file that is an INI file.
Usually the HTML generator backend of a documentation tool is tweaked to generate it as a special case. From what I read in your "this guy" link, sphinx can do that.
I was able to fulfil this need using Sphinx after all. I used MiKTeX to generate the PDF on Windows.
Install MiKTeX (< 200mb)
wget -nv -N http://mirrors.ctan.org/systems/win32/miktex/setup/miktex-portable-2.9.4757.exe
7z.exe x -y miktex-portable-2.9.4757.exe -o"miktex"
Add the bin directory to your path
SET Path=%Path%;%CD%\miktex\miktex\bin
Run Sphinx's "make.bat" to generate the .tex file.
SET SPHINXOPTS=-W -E
make.bat latex
Invoke MiKTeX's pdflatex:
cd build/latex
pdflatex.exe YOUR_PROJECT_NAME.tex
The resultant PDF will be in your build/latex directory
Is there a way, in Linux, Windows, or preferably Mac OS X to take a bunch of PDF files and "chain them" into one "booklet" without owning Acrobat and preferably without doing this manually?
I have TexShop, MikTex and the like installed, if any of their utilities help.
ghostcript method:
gs -q -sPAPERSIZE=letter -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=out.pdf in1.pdf in2.pdf in3.pdf ...
from: How to concatenate PDFs without pain
ImageMagick method:
convert file1.pdf file2.pdf file3.pdf out.pdf
pdftk method:
pdftk file1.pdf file2.pdf file3.pdf cat output out.pdf
I have tried several different tools and have gotten the most reliable results with the PDF toolkit, pdftk. It seems to work more consistently than trying to use gs or messing around with conversion to PostScript and back. And it avoids dealing with one image per page, which is a nuisance.
pdftk is included in Debian-based Linux distributions and perhaps others as well.
I had to recently research this and came up with the following. In the end I went with ImageMagick.
Merging is hard! http://ansuz.sooke.bc.ca/software/pdf-append.php
pdfjoin from the pdfjam package seems to be the standard on unix-like systems but not available on Windows
Coherentpdf is multi-platform. However licences cost up to €700
pdftk is multi-platform and open source. However it does appear to be 3 years old.
Imagemagick will merge pdfs and also generate pdfs from jpgs. I know it works on Linux and Windows.
PDFsam works using iText and Java
You can chain the "Get selected Items", "Combine PDF Pages", "Rename PDF Document" and "Move Finder Items" actions in Automator to create the desired workflow.
Have a look at Multivalent Document Tools
Failing that you can search out other tools via Freshmeat.net
I've mentioned it in the other topics and I'll mention it again: you can use the Ghostscript utilities pdf2ps and ps2pdf do it as so:
pdf2ps file1.pdf file1.ps # Convert file1 to PostScript
pdf2ps file2.pdf file2.ps # Convert file2 to PostScript
cat file2.ps >> file1.ps # Concatenate files
ps2pdf file1.ps output.pdf # Convert back to PDF
I have also used Multivalent Java based tools. It is a simple invocation of Java MultiValent main program passing in each pdf file you want to append as arguments.