GithubHelp home page GithubHelp logo

reviczky / pstoedit Goto Github PK

View Code? Open in Web Editor NEW
4.0 4.0 2.0 4.67 MB

pstoedit is a tool converting PostScript and PDF files into various other formats suported by different drawing editors. As a prerequesite it needs GhostScript to be installed (binary installation is sufficient).

Home Page: http://www.calvina.de/pstoedit/

License: GNU General Public License v2.0

Makefile 12.61% Shell 17.28% M4 1.04% Java 1.98% HTML 0.46% PostScript 0.02% C 4.28% C++ 58.17% Awk 0.03% Prolog 4.10% QMake 0.03%

pstoedit's People

Contributors

reviczky avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

pstoedit's Issues

pstoedit.h:104:74: error: unknown type name ‘bool’ in version 4.0.0 when building in C autotrace

Hi,

Trying to build the latest version 4.0.0 with GCC 11, I get:

libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I/gnu/store/0y1frga3xwcnj0qrzyq2m96nmd4625qq-imagemagick-6.9.13-5/include/ImageMagick-6 -fopenmp -DMAGICKCORE_HDRI_ENABLE=0 -DMAGICKCORE_QUANTUM_DEPTH=16 -pthread -I/gn
u/store/z8fw63658ag30p3r20m8im5710as48rh-glib-2.72.3/include/glib-2.0 -I/gnu/store/z8fw63658ag30p3r20m8im5710as48rh-glib-2.72.3/lib/glib-2.0/include -DLOCALEDIR=\"/gnu/store/3yhnspw420c2gds1qb66pb9d559ap5b6-autot
race-0.31.9/share/locale\" -g -O2 -c src/output.c  -fPIC -DPIC -o src/.libs/output.o
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I/gnu/store/0y1frga3xwcnj0qrzyq2m96nmd4625qq-imagemagick-6.9.13-5/include/ImageMagick-6 -fopenmp -DMAGICKCORE_HDRI_ENABLE=0 -DMAGICKCORE_QUANTUM_DEPTH=16 -pthread -I/gn
u/store/z8fw63658ag30p3r20m8im5710as48rh-glib-2.72.3/include/glib-2.0 -I/gnu/store/z8fw63658ag30p3r20m8im5710as48rh-glib-2.72.3/lib/glib-2.0/include -DLOCALEDIR=\"/gnu/store/3yhnspw420c2gds1qb66pb9d559ap5b6-autot
race-0.31.9/share/locale\" -g -O2 -c src/input.c  -fPIC -DPIC -o src/.libs/input.o
/gnu/store/p7zqfnpxkqj7im10x2ncpm9l62g3zmnp-bash-minimal-5.1.16/bin/bash ./libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I.   -I/gnu/store/0y1frga3xwcnj0qrzyq2m96nmd4625qq-imagemagick-6.9.13-5/include/I
mageMagick-6 -fopenmp -DMAGICKCORE_HDRI_ENABLE=0 -DMAGICKCORE_QUANTUM_DEPTH=16   -pthread -I/gnu/store/z8fw63658ag30p3r20m8im5710as48rh-glib-2.72.3/include/glib-2.0 -I/gnu/store/z8fw63658ag30p3r20m8im5710as48rh-g
lib-2.72.3/lib/glib-2.0/include -DLOCALEDIR=\""/gnu/store/3yhnspw420c2gds1qb66pb9d559ap5b6-autotrace-0.31.9/share/locale"\"   -g -O2 -c -o src/despeckle.lo src/despeckle.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I/gnu/store/0y1frga3xwcnj0qrzyq2m96nmd4625qq-imagemagick-6.9.13-5/include/ImageMagick-6 -fopenmp -DMAGICKCORE_HDRI_ENABLE=0 -DMAGICKCORE_QUANTUM_DEPTH=16 -pthread -I/gn
u/store/z8fw63658ag30p3r20m8im5710as48rh-glib-2.72.3/include/glib-2.0 -I/gnu/store/z8fw63658ag30p3r20m8im5710as48rh-glib-2.72.3/lib/glib-2.0/include -DLOCALEDIR=\"/gnu/store/3yhnspw420c2gds1qb66pb9d559ap5b6-autot
race-0.31.9/share/locale\" -g -O2 -c src/pxl-outline.c  -fPIC -DPIC -o src/.libs/pxl-outline.o
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I/gnu/store/0y1frga3xwcnj0qrzyq2m96nmd4625qq-imagemagick-6.9.13-5/include/ImageMagick-6 -fopenmp -DMAGICKCORE_HDRI_ENABLE=0 -DMAGICKCORE_QUANTUM_DEPTH=16 -pthread -I/gn
u/store/z8fw63658ag30p3r20m8im5710as48rh-glib-2.72.3/include/glib-2.0 -I/gnu/store/z8fw63658ag30p3r20m8im5710as48rh-glib-2.72.3/lib/glib-2.0/include -DLOCALEDIR=\"/gnu/store/3yhnspw420c2gds1qb66pb9d559ap5b6-autot
race-0.31.9/share/locale\" -g -O2 -c src/median.c  -fPIC -DPIC -o src/.libs/median.o
In file included from src/output-pstoedit.c:30:
/gnu/store/818c1z92k85kwvvwyv62k58v70psskrh-pstoedit-4.00/include/pstoedit/pstoedit.h:104:48: error: unknown type name ‘std’; did you mean ‘stdin’?
  104 | void loadpstoeditplugins(const char* progname, std::ostream & errstream, bool verbose);
      |                                                ^~~
      |                                                stdin
/gnu/store/818c1z92k85kwvvwyv62k58v70psskrh-pstoedit-4.00/include/pstoedit/pstoedit.h:104:74: error: unknown type name ‘bool’
  104 | void loadpstoeditplugins(const char* progname, std::ostream & errstream, bool verbose);
      |                                                                          ^~~~
In file included from src/output-pstoedit.c:30:
/gnu/store/818c1z92k85kwvvwyv62k58v70psskrh-pstoedit-4.00/include/pstoedit/pstoedit.h:40:1: note: ‘bool’ is defined in header ‘<stdbool.h>’; did you forget to ‘#include <stdbool.h>’?
   39 | #include "pstoedll.h"
  +++ |+#include <stdbool.h>
   40 | 

Crash after updating to 4.01

Under Linux in version 4.01, the attached file layout.ps (created by xkbprint) causes a crash:

❯ /tmp/tmp.mmfmrDwejt/pstoedit-nomagick/src/pstoedit-4.01/src/pstoedit -f plot-svg layout.ps layout-test.svg
pstoedit: version 4.01 / DLL interface 108 (release build - g++ 13.2.1 20230801 - 64-bit) : Copyright (C) 1993 - 2024 Wolfgang Glunz
/usr/include/c++/13.2.1/bits/stl_vector.h:1125: std::vector<_Tp, _Alloc>::reference std::vector<_Tp, _Alloc>::operator[](size_type) [with _Tp = const char*; _Alloc = std::allocator<const char*>; reference = const char*&; size_type = long unsigned int]: Assertion '__n < this->size()' failed.
zsh: IOT instruction (core dumped)  /tmp/tmp.mmfmrDwejt/pstoedit-nomagick/src/pstoedit-4.01/src/pstoedit -f   

This does not happen in version 4.00:

❯ /tmp/tmp.mmfmrDwejt/pstoedit-nomagick/src/pstoedit-4.00/src/pstoedit -f plot-svg layout.ps layout-test.svg
pstoedit: version 4.00 / DLL interface 108 (release build - g++ 13.2.1 20230801 - 64-bit) : Copyright (C) 1993 - 2023 Wolfgang Glunz
libplot: cannot retrieve font "IsoKeyCaps", using default "Helvetica"

I zipped the layout.ps input file because GitHub tells me file type ps is not supported. For full reference, I am also attaching the correct output layout-test.svg file generated by version 4.00.

The binary is built as specified in this Arch PKGBUILD file:

pkgname=pstoedit-nomagick
pkgver=4.00
pkgrel=1
pkgdesc='Translates PS/PDF graphics to other vector formats (no ImageMagick dependency)'
arch=('x86_64')
url='http://www.pstoedit.net/'
license=('GPL-2.0-or-later')
depends=('gd' 'ghostscript' 'ming' 'libemf' 'libzip' 'plotutils' 'zlib')
provides=('pstoedit')
conflicts=('pstoedit')
source=("https://sourceforge.net/projects/pstoedit/files/pstoedit/${pkgver}/pstoedit-${pkgver}.tar.gz")
sha256sums=('075a7daeaba75f3d1922beae680cc3662bb373c7e3826282229fda2733ac62ea')

build() {
    cd "pstoedit-${pkgver}"
    ./configure \
        --prefix='/usr'\
        --enable-static='no' \
        --enable-shared='yes' \
        --with-emf \
        --without-magick \
        --with-libplot \
        --with-swf \
        --with-pptx
    make
}

check() {
    make -C "pstoedit-${pkgver}" check
}

package() {
    make -C "pstoedit-${pkgver}" DESTDIR="$pkgdir" install
}

Since I am testing both versions on the same system, it is highly unlikely that the issue is due to an incorrect or missing dependency in the Arch PKGCONFIG, given that version 4.00 works while version 4.01 does not.

For the full picture: The original version of this PKGBUILD included two patches to the code, which have been removed in version 4.01. I built version 4.00 without these patches exactly like version 4.01, using the above PKGBUILD file, and it still works. Hence, the only remaining difference between the two versions I am comparing is indeed the source code of pstoedit.

layout.ps.zip
layout-test

DELAYBIND command has been deprecated

pstoedit 3.70

command line: pstoedit -f mpost [test.eps|test.pdf|test.svg|test2.eps] out.pdf
command line: pstoedit -nb -f mpost [test.eps|test.pdf|test.svg|test2.eps] out.pdf

ghostscript versions: https://launchpad.net/ubuntu/+source/ghostscript
ghostscript versions: https://packages.debian.org/search?keywords=ghostscript
pstoedit versions: https://launchpad.net/ubuntu/+source/pstoedit

DELAYBIND

 GS  | PDF | SVG | EPS | EPS2
-----+-----+-----+-----+-----
9.10 |  ✓  | (3) |  ✓  |  ✓
9.18 |  ✓  | (3) |  ✓  |  ✓
9.20 |  ✓  | (3) |  ✓  |  ✓
9.21 |  ✓  | (3) |  ✓  |  ✓
9.22 | (1) | (1) | (1) | (1)

NOBIND

 GS  | PDF | SVG | EPS | EPS2
-----+-----+-----+-----+-----
9.10 |  ✓  | (3) |  ✓  |  ✓
9.18 | (4) | (3) |  ✓  |  ✓
9.20 | (4) | (3) |  ✓  |  ✓
9.21 | (4) | (3) |  ✓  |  ✓
9.22 | (2) | (2) | (2) | (2)

Logs

pstoedit 3.71

command line: pstoedit -rdb -f mpost [test.eps|test.pdf|test.svg|test2.eps] out.pdf
command line: pstoedit -nb -f mpost [test.eps|test.pdf|test.svg|test2.eps] out.pdf

ghostscript versions: https://launchpad.net/ubuntu/+source/ghostscript
ghostscript versions: https://packages.debian.org/search?keywords=ghostscript
pstoedit versions: https://code.launchpad.net/~reviczky/+archive/ubuntu/pstoedit

DELAYBIND

 GS  | PDF | SVG | EPS | EPS2
-----+-----+-----+-----+-----
9.10 | (4) | (2) |  ✓  | (3)
9.18 | (6) | (2) |  ✓  | (3)
9.20 | (1) | (2) |  ✓  | (3)
9.21 | (1) | (2) |  ✓  | (3)
9.22 | (1) | (2) |  ✓  | (3)

NOBIND

 GS  | PDF | SVG | EPS | EPS2
-----+-----+-----+-----+-----
9.10 | (4) | (2) |  ✓  | (5)
9.18 | (6) | (2) |  ✓  | (5)
9.20 | (7) | (2) |  ✓  | (5)
9.21 | (7) | (2) |  ✓  | (5)
9.22 | (1) | (2) |  ✓  | (3)

Logs

Test Files

  1. PDF: test.pdf
  2. SVG: test.svg.pdf
  3. EPS (3.0): test.eps.pdf
  4. EPS (2.0): test2.eps.pdf

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.