Skip to content
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

[BUG] pdftocairo not executed #12

Closed
MaikBrant opened this issue Sep 23, 2024 · 8 comments · Fixed by #13
Closed

[BUG] pdftocairo not executed #12

MaikBrant opened this issue Sep 23, 2024 · 8 comments · Fixed by #13
Assignees
Labels
bug Something isn't working

Comments

@MaikBrant
Copy link

image
Failed to execute pdftocairo. Report bug with postscript file to dev.

@MaikBrant MaikBrant added the bug Something isn't working label Sep 23, 2024
@ahnafnafee ahnafnafee linked a pull request Sep 23, 2024 that will close this issue
@ahnafnafee
Copy link
Owner

I believe you will need to install "poppler" version 0.89.0 to be able to execute pdftocairo correctly. I will update the README to address that. Please let me know if that does not solve your issue.

choco install poppler --version 0.89.0 -y --force

@MaikBrant
Copy link
Author

it worked, but nothing is displayed, just an empty page

image

@ahnafnafee ahnafnafee reopened this Sep 24, 2024
@ahnafnafee
Copy link
Owner

Hi @MaikBrant, could you share the postscript file or an example one that has the same issue? Thanks!

@MaikBrant
Copy link
Author

This is my first job in this programming language, maybe I need to start the file in a special way?

@ahnafnafee ahnafnafee changed the title [BUG] [BUG] pdftocairo not executed Sep 24, 2024
@ahnafnafee
Copy link
Owner

I believe there are multiple ways to define headers for postscript file. However, it will be difficult to debug this issue without a reproducible example file.

Are you able to view the file using GhostScript?

@MaikBrant
Copy link
Author

% Фон
newpath
0.0 0.2 0.5 setrgbcolor
0 0 moveto
612 0 lineto
612 792 lineto
0 792 lineto
closepath
fill

% Луна
1.0 1.0 0.6 setrgbcolor
300 700 70 0 360 arc
fill

% Земля
newpath
0.0 0.0 0.0 setrgbcolor
0 0 moveto
612 0 lineto
612 100 lineto
0 100 lineto
closepath
fill

%холм1
newpath
0.1 0.3 0.1 setrgbcolor
0 100 moveto
0 250 rlineto
170 200 rlineto
400 -450 rlineto
closepath
gsave
fill

%холм2
newpath
0.2 0.3 0.1 setrgbcolor
0 100 moveto
400 500 rlineto
400 -500 rlineto
closepath
gsave
fill

%дом1
newpath
10 100 moveto
0 300 rlineto
170 0 rlineto
0 -300 rlineto
closepath
gsave
0.5 0.5 0.5 setrgbcolor
fill

%кусочек дерева нижний
newpath
0.1 0.4 0.0 setrgbcolor
400 210 moveto
100 100 rlineto
100 -100 rlineto
closepath
gsave
fill

%кусочек дерева средний
newpath
0.1 0.5 0.1 setrgbcolor
400 265 moveto
100 100 rlineto
100 -100 rlineto
closepath
gsave
fill

%кусочек дерева верхний

newpath
0.1 0.6 0.0 setrgbcolor
400 320 moveto
100 100 rlineto
100 -100 rlineto
closepath
gsave
fill

%ствол
newpath
490 100 moveto
0 110 rlineto
20 0 rlineto
0 -110 rlineto
closepath
gsave
0.3 0.2 0.1 setrgbcolor
fill

%окно1

newpath
25 200 moveto
0 60 rlineto
60 0 rlineto
0 -60 rlineto
closepath
gsave
1.0 0.9 0.2 setrgbcolor
fill

%окно2

newpath
105 200 moveto
0 60 rlineto
60 0 rlineto
0 -60 rlineto
closepath
gsave
1.0 0.9 0.2 setrgbcolor
fill

%окно3

newpath
105 280 moveto
0 60 rlineto
60 0 rlineto
0 -60 rlineto
closepath
gsave
1.0 0.9 0.2 setrgbcolor
fill

%окно4
newpath
25 280 moveto
0 60 rlineto
60 0 rlineto
0 -60 rlineto
closepath
gsave
1.0 0.9 0.2 setrgbcolor
fill

% дом2
newpath
180 100 moveto
0 250 rlineto
160 0 rlineto
0 -250 rlineto
closepath
gsave
0.3 0.3 0.3 setrgbcolor
fill

%окно1

newpath
200 200 moveto
0 50 rlineto
50 0 rlineto
0 -50 rlineto
closepath
gsave
1.0 0.9 0.2 setrgbcolor
fill

%окно3

newpath
265 260 moveto
0 50 rlineto
50 0 rlineto
0 -50 rlineto
closepath
gsave
1.0 0.9 0.2 setrgbcolor
Fill
Here is example, when I use GhostScript image displayed, but in Visual Studio nothing is displayed

@MaikBrant
Copy link
Author

@ahnafnafee, I'm sorry to bother you, but is there any way to solve my problem, or do I need to look for alternative ways to solve the problem?

@MaikBrant
Copy link
Author

The problem was in the name of the folder where the file was stored

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants