GithubHelp home page GithubHelp logo

shioyadan / kuroko-cli Goto Github PK

View Code? Open in Web Editor NEW
8.0 2.0 1.0 310 KB

Kuroko-cli is a simple command line tool to convert EMF to PDF. You can download a pre-compiled binary from https://github.com/shioyadan/kuroko-cli/releases.

License: BSD 3-Clause "New" or "Revised" License

Makefile 4.53% Batchfile 3.50% C++ 91.97%

kuroko-cli's Introduction

Kuroko-CLI

Kuroko-CLI is a small command line tool to convert from EMF to PDF.

  • It captures EMF data in a clipboard and converts it to PDF.
  • In a similar way as MetafileToEPSConverter makes EPS files, you can make PDF files from pictures on MS Power Point/Excel.
  • Kuroko-CLI can run only on Windows 10, because it relies on "Microsoft Print to PDF" printer.

demo

How to use

You should install a dedicated virtual printer before running Kuroko.

kuroko-cli.exe -i

Capture EMF data in a clipboard and convert it to a PDF file.

kuroko-cli.exe -b PDF_FILE_NAME

Convert an EMF file to a PDF file.

kuroko-cli.exe -c EMF_FILE_NAME [PDF_FILE_NAME]

How to build

  • Install Visual Studio Build Tools 2019 - C++ Build Tools
  • Run this command
    build_shell.bat nmake build_release 
    
  • or
    C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Auxiliary\Build\vcvars64.bat
    nmake build_release
    
  • or open it with VSCode and run a build task.

Known issues

  • Transparent objects are not converted correctly.
    • Kuroko currently uses GDI and this issue seems to be due to GDI's limitation.
    • Using GDI+ and ConvertToEmfPlus should solve this issue, but not.
    • If you set USE_GDI_PLUS in kuroko-cli.cpp, GDI+ is enabled.
    • Any suggestions and pull-requests are welcome.
  • A PDF cropping algorithm is extremely unsafe and may be broken in the future when the MS PDF printer is updated.

License

Copyright (C) 2020 Ryota Shioya [email protected] This application is released under the 3-Clause BSD License, see LICENSE.md.

kuroko-cli's People

Contributors

shioyadan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

doytsujin

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.