dawbarton / pdf2svg Goto Github PK
View Code? Open in Web Editor NEWA simple PDF to SVG converter using the Poppler and Cairo libraries
License: GNU General Public License v2.0
A simple PDF to SVG converter using the Poppler and Cairo libraries
License: GNU General Public License v2.0
I want to convert a multipage PDF to SVG files.
Based on main page, I have to use "all"
pdf2svg <input.pdf> <output.svg> "all"
I just got one SVG file that corresponds to the last page of my PDF file.
What do I miss here?
When trying to convert the following PDF on Windows 7, pdf2svg crashes and I see a message:
pdf2svg.exe has stopped working.
https://drive.google.com/file/d/0B0odzw1WMqkGbWxwYXdwM1RIWEk/view
Some PDFs work fine.
Tested on a clean Windows 7 64 bit with only Office 2013 installed.
I'm using the following pdf2svg version:
http://www.cityinthesky.co.uk/wp-content/uploads/2014/06/pdf2svg-w32bin-0.2.2.zip
Thanks
I don't know if this is the right place to ask this question. I made a TikZ figure in the pdf format and converted to the svg format. It is success. However, when I tried to load the svg file to android studio as drawable vector. Android studio showed the error. My question is:
Is there a way I can avoid this problem when I make convertion?
Thanks,
Xuefeng
The boxes I need this to run on I can not download or install anything on but I can include in my git repo a binary as I already to with pdftk.
But this tool would be a lot better option since it does both steps for me in one eg make pages and images.
Thanks for you work!
it is an ubuntu box I need to make this for btw. I tried this
http://jurjenbokma.com/ApprenticesNotes/getting_statlinked_binaries_on_debian.html
but it did not work.
Is there any option to import text nodes as text instead of converting to paths?
Attached please find a CMYK PDF, but in PDF2SVG I get RGB SVG.
See also the following discussion:
https://community.adobe.com/t5/indesign/cc2020-indesign-svg-cmyk-color-support/td-p/10719039
https://community.adobe.com/t5/illustrator/how-can-i-export-an-svg-with-both-rgb-and-cmyk-colors/m-p/6050907
Suki
CMYK-image.pdf
9685498 changed poppler_page_render
to poppler_page_render_for_printing
, but there is no way to change it back (if the SVG is intended to be displayed and not printed).
Whenever I try to run PDF2SVG, it crashs on Win10 with the message of "pdf2svg.exe has stopped working". Does the code outdated for Win10? It occurs on different PDF files, and havent success yet. Any idea? Does it outdated on Win10?
There are several tutorial to compile pdf2svg
under Mac OSX, but I do not want homebrew or fink installed on my Mac. Thus, can anyone provide a Mac OSX binary of pdf2svg
.
check for cairo version >= 1.2.6 fails for Rocky Linux 9 despite having Cairo 1.7.2
OS: Rocky Linux 9.2
Release: pdf2svg-0.2.3
However...
There is some possibility that the program is ported to windows through mingw, is an excellent tool and it produces very good svg (better than produced by pdftocairo and inskcape).
Is supported in almost all linux distributions, but unfortunately is not available for windows
Saludos
Hi,
It's possible to convert the background of a pdf into a single image instead of several ?
Regards,
Florian
I am converting a bunch of .pdfs created with AutoCAD, but for about half of them the conversion silently fails resulting in a 0-byte .svg.
The only information I get from the pdf2svg tool is an exit code of 0xC06D007E which looks like a proper HRESULT (Unknown Software Exception) on Windows. 0x7E is ERROR_MOD_NOT_FOUND, 0xC means Failure, Reserved and facility 0x6D is FACILITY_VISUALCPP.
Seeing that nothing is logged to the console and I am not aware whether or how the tool does any logging, I would like to learn how to diagnose this error or how to work around it.
Did i missed something or it‘s the problem with the program itself?
Hi,
I was checking the Homebrew formula for pdf2svg and I realized that there is absolutely no need to enforce a gtk+ dependency since it is nowhere used by pdf2svg.c. You can safely remove all references to gtk+ from configure.ac and Makefile.am
Oh and autoreconf complains because it cannot find README...
Hello,
So right now I can only output *.svg files, is it possible to just print the svg result to stdout?
Thanks
Hi,
I want to add watermark on the output, is There any suggestions?
I don't want to simply add text or picture path on svg, and don't want to add watermark on the pdf.
Thanks.
> ls /usr/lib64 | grep poppler
libpoppler-cpp.so
libpoppler-cpp.so.0
libpoppler-cpp.so.0.7.0
libpoppler-glib.so
libpoppler-glib.so.8
libpoppler-glib.so.8.13.0
libpoppler-qt5.so
libpoppler-qt5.so.1
libpoppler-qt5.so.1.19.0
libpoppler.so
libpoppler.so.89
libpoppler.so.89.0.0
> echo $LD_LIBRARY_PATH
/usr/lib64 /opt/intel/compilers_and_libraries_2019.4.243/linux/compiler/lib/intel64_lin /opt/intel/compilers_and_libraries_2019.4.243/linux/mpi/intel64/libfabric/lib /opt/intel/compilers_and_libraries_2019.4.243/linux/mpi/intel64/lib/release /opt/intel/compilers_and_libraries_2019.4.243/linux/mpi/intel64/lib /opt/intel/compilers_and_libraries_2019.4.243/linux/ipp/lib/intel64 /opt/intel/compilers_and_libraries_2019.4.243/linux/compiler/lib/intel64_lin /opt/intel/compilers_and_libraries_2019.4.243/linux/mkl/lib/intel64_lin /opt/intel/compilers_and_libraries_2019.4.243/linux/tbb/lib/intel64/gcc4.7 /opt/intel/compilers_and_libraries_2019.4.243/linux/tbb/lib/intel64/gcc4.7 /opt/intel/compilers_and_libraries_2019.4.243/linux/daal/lib/intel64_lin /opt/intel/compilers_and_libraries_2019.4.243/linux/daal/../tbb/lib/intel64_lin/gcc4.4
> echo $PKG_CONFIG_PATH
/usr/lib64 /opt/intel/compilers_and_libraries_2019.4.243/linux/mkl/bin/pkgconfig
However, configuring fails with
configure: error: Package requirements (poppler-glib >= 0.5.4) were not met:
No package 'poppler-glib' found
Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.
Alternatively, you may set the environment variables POPPLERGLIB_CFLAGS
and POPPLERGLIB_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.
The distro I'm using doesn't provide pdf2svg, a dependency for PGFPlots.jl, so I figured I'd try building from source.
Is is possible to convert to SVG but keep text as text?
while (1) {
size_t _wr_len = snprintf(svgFilenameBuffer, svgFilenameBufLen, svgFilename, pageInd + 1);
if (_wr_len >= svgFilenameBufLen) {
svgFilenameBufLen = _wr_len + 1;
svgFilenameBuffer = (char*)realloc(svgFilenameBuffer, svgFilenameBufLen);
assert(svgFilenameBuffer != NULL);
continue;
}
break;
}
modify here can work
The attached file has a single character x which is fine in Evince but blurry when converted to SVG.
I installed with macports, but compiling from source does not make a difference.
I have a pdf file (call it f.pdf
) and run this
$ pdf2svg f.pdf f.svg
Unable to open file
no further information.
Edit: Nevermind, my bad.
I tested some PDF files that can successfully generate SVG image.
But some PDF files failed, the generated SVG image file is void and displayed as black.
When I open the svg file in Emacs buffer, it can display correctly. Weird.
I confirm that I can open the PDF file normally.
I upload the svg file here. Maybe you want to check out.
My PDF file contains pages that are labeled with something other than Arabic numerals. Apart from the usual roman numerals there is also a page at the very beginning simply called "Titel". That is actually a prefix for the page label and according to PDFtk has a NoNumber
number style:
PageLabelBegin
PageLabelNewIndex: 1
PageLabelStart: 1
PageLabelPrefix: Titel
PageLabelNumStyle: NoNumber
From the second page on roman numerals are used:
PageLabelBegin
PageLabelNewIndex: 2
PageLabelStart: 2
PageLabelNumStyle: UppercaseRomanNumerals
Now, I can convert the page with label "II" without any problem, but if I call pdf2svg with "Titel" as a page label, I don't get the first page of the document as expected but rather an error:
$ pdf2svg my-doc.pdf /dev/null Titel
Page does not exist
If I replace "Titel" with roman numeral "I", the first page is returned.
That doesn't seem correct to me since roman numerals should only be used from the second page onward in this document. Any ideas?
One could trigger a new release that includes the latest bugfixes?
I've just created the following pdf:
http://www.martin-thoma.de/bug-report/printer-testpage.pdf
It is rendered correctly by Google Chrome and ImageMagick, but wrong by this PDF viewer:
See tex.SE for the context / other bug reports.
Ubuntu man page says
The usual format modificators work as well: output-page%02d.svg will give you output-page00.svg, output-page01.svg, etc.
but output results start with 1: output-page01.svg, output-page02.svg, etc.
Is it possible to name output as described?
@dawbarton, @borismarin could you please take a look?
Thank you in advance
I did a simple test with a PDF that had some links into.. unfortunately it seems like the rendered SVG does not have them.. According to this article, SVG's suppose hyperlinks: https://alligator.io/svg/hyperlinks-svg/
Are they supposed to work here?
scanned pdf
pdf ocr
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.