pgf's and pstricks's opacity is not working

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
9
down vote

favorite












I've recently upgraded (on Ubuntu 18.04 LTS) TexLive 2016 to 2017. The problem that came up is that the opacity of tikz (pgf) and of pstricks pictures is not working in .ps and .pdf files after rendering (Latex to dvi to ps to pdf).



I've tried in Texstudio, Texmaker, and Kile and the problem occurred with all three editors. I've tried evince and okular and the problem occurred in both viewers. On the other hand in Qtikz and in Texstudio's preview, opacity is working fine for tikz.



I didn't had this problem with all previous TexLive versions.



Here is a minimal example with one tikz and one pstricks image:



documentclass[10pt]article
usepackage[english,greek]babel
usepackage[iso-8859-7]inputenc
usepackagepstricks, pstricks-add
usepackagegraphicx, color
usepackagepgf,tikz

begindocument

begintikzpicture[line cap=round,line join=round,x=0.5cm,y=0.5cm]
clip(-3.6008835336224467,-3.8322994902133702) rectangle (3.6645946388488806,2.9075908995685467);
draw [line width=1.2pt,color=gray,fill=gray,fill opacity=0.25] (0.,0.) circle (0.75cm);
fill[line width=1.6pt,color=blue,fill=blue,fill opacity=0.25] (0.,1.) -- (0.,-1.) -- (2.,-1.) -- (2.,1.) -- cycle;
draw [line width=1.6pt,color=blue] (0.,1.)-- (0.,-1.);
draw [line width=1.6pt,color=blue] (0.,-1.)-- (2.,-1.);
draw [line width=1.6pt,color=blue] (2.,-1.)-- (2.,1.);
draw [line width=1.6pt,color=blue] (2.,1.)-- (0.,1.);
endtikzpicture


bigskip


pssetxunit=0.5cm,yunit=0.5cm,algebraic=true,dimen=middle,dotstyle=o,dotsize=5pt 0,linewidth=0.8pt,arrowsize=3pt 2,arrowinset=0.25
beginpspicture*(-3.6008835336224467,-3.8322994902133702)(3.6645946388488806,2.9075908995685467)
pscircle[linewidth=1.2pt,linecolor=gray,fillcolor=gray,fillstyle=solid,opacity=0.25](0.,0.)0.75
pspolygon[linewidth=1.6pt,linecolor=blue,fillcolor=blue,fillstyle=solid,opacity=0.25](0.,1.)(0.,-1.)(2.,-1.)(2.,1.)
psline[linewidth=1.6pt,linecolor=blue](0.,1.)(0.,-1.)
psline[linewidth=1.6pt,linecolor=blue](0.,-1.)(2.,-1.)
psline[linewidth=1.6pt,linecolor=blue](2.,-1.)(2.,1.)
psline[linewidth=1.6pt,linecolor=blue](2.,1.)(0.,1.)
endpspicture*


enddocument


The result (in both) should be



enter image description here



but I receive



enter image description here



Any ideas on how to handle this issue?



P.S. Because I have tikz and pstricks in the same document, pfdlatex isn't appropriate to compile.










share|improve this question









New contributor




Grigorios Kostakos is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.



















  • If @Alex's answer has solved your problem, it is customary to accept it, see: tex.stackexchange.com/help/someone-answers
    – AndréC
    Oct 4 at 17:04














up vote
9
down vote

favorite












I've recently upgraded (on Ubuntu 18.04 LTS) TexLive 2016 to 2017. The problem that came up is that the opacity of tikz (pgf) and of pstricks pictures is not working in .ps and .pdf files after rendering (Latex to dvi to ps to pdf).



I've tried in Texstudio, Texmaker, and Kile and the problem occurred with all three editors. I've tried evince and okular and the problem occurred in both viewers. On the other hand in Qtikz and in Texstudio's preview, opacity is working fine for tikz.



I didn't had this problem with all previous TexLive versions.



Here is a minimal example with one tikz and one pstricks image:



documentclass[10pt]article
usepackage[english,greek]babel
usepackage[iso-8859-7]inputenc
usepackagepstricks, pstricks-add
usepackagegraphicx, color
usepackagepgf,tikz

begindocument

begintikzpicture[line cap=round,line join=round,x=0.5cm,y=0.5cm]
clip(-3.6008835336224467,-3.8322994902133702) rectangle (3.6645946388488806,2.9075908995685467);
draw [line width=1.2pt,color=gray,fill=gray,fill opacity=0.25] (0.,0.) circle (0.75cm);
fill[line width=1.6pt,color=blue,fill=blue,fill opacity=0.25] (0.,1.) -- (0.,-1.) -- (2.,-1.) -- (2.,1.) -- cycle;
draw [line width=1.6pt,color=blue] (0.,1.)-- (0.,-1.);
draw [line width=1.6pt,color=blue] (0.,-1.)-- (2.,-1.);
draw [line width=1.6pt,color=blue] (2.,-1.)-- (2.,1.);
draw [line width=1.6pt,color=blue] (2.,1.)-- (0.,1.);
endtikzpicture


bigskip


pssetxunit=0.5cm,yunit=0.5cm,algebraic=true,dimen=middle,dotstyle=o,dotsize=5pt 0,linewidth=0.8pt,arrowsize=3pt 2,arrowinset=0.25
beginpspicture*(-3.6008835336224467,-3.8322994902133702)(3.6645946388488806,2.9075908995685467)
pscircle[linewidth=1.2pt,linecolor=gray,fillcolor=gray,fillstyle=solid,opacity=0.25](0.,0.)0.75
pspolygon[linewidth=1.6pt,linecolor=blue,fillcolor=blue,fillstyle=solid,opacity=0.25](0.,1.)(0.,-1.)(2.,-1.)(2.,1.)
psline[linewidth=1.6pt,linecolor=blue](0.,1.)(0.,-1.)
psline[linewidth=1.6pt,linecolor=blue](0.,-1.)(2.,-1.)
psline[linewidth=1.6pt,linecolor=blue](2.,-1.)(2.,1.)
psline[linewidth=1.6pt,linecolor=blue](2.,1.)(0.,1.)
endpspicture*


enddocument


The result (in both) should be



enter image description here



but I receive



enter image description here



Any ideas on how to handle this issue?



P.S. Because I have tikz and pstricks in the same document, pfdlatex isn't appropriate to compile.










share|improve this question









New contributor




Grigorios Kostakos is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.



















  • If @Alex's answer has solved your problem, it is customary to accept it, see: tex.stackexchange.com/help/someone-answers
    – AndréC
    Oct 4 at 17:04












up vote
9
down vote

favorite









up vote
9
down vote

favorite











I've recently upgraded (on Ubuntu 18.04 LTS) TexLive 2016 to 2017. The problem that came up is that the opacity of tikz (pgf) and of pstricks pictures is not working in .ps and .pdf files after rendering (Latex to dvi to ps to pdf).



I've tried in Texstudio, Texmaker, and Kile and the problem occurred with all three editors. I've tried evince and okular and the problem occurred in both viewers. On the other hand in Qtikz and in Texstudio's preview, opacity is working fine for tikz.



I didn't had this problem with all previous TexLive versions.



Here is a minimal example with one tikz and one pstricks image:



documentclass[10pt]article
usepackage[english,greek]babel
usepackage[iso-8859-7]inputenc
usepackagepstricks, pstricks-add
usepackagegraphicx, color
usepackagepgf,tikz

begindocument

begintikzpicture[line cap=round,line join=round,x=0.5cm,y=0.5cm]
clip(-3.6008835336224467,-3.8322994902133702) rectangle (3.6645946388488806,2.9075908995685467);
draw [line width=1.2pt,color=gray,fill=gray,fill opacity=0.25] (0.,0.) circle (0.75cm);
fill[line width=1.6pt,color=blue,fill=blue,fill opacity=0.25] (0.,1.) -- (0.,-1.) -- (2.,-1.) -- (2.,1.) -- cycle;
draw [line width=1.6pt,color=blue] (0.,1.)-- (0.,-1.);
draw [line width=1.6pt,color=blue] (0.,-1.)-- (2.,-1.);
draw [line width=1.6pt,color=blue] (2.,-1.)-- (2.,1.);
draw [line width=1.6pt,color=blue] (2.,1.)-- (0.,1.);
endtikzpicture


bigskip


pssetxunit=0.5cm,yunit=0.5cm,algebraic=true,dimen=middle,dotstyle=o,dotsize=5pt 0,linewidth=0.8pt,arrowsize=3pt 2,arrowinset=0.25
beginpspicture*(-3.6008835336224467,-3.8322994902133702)(3.6645946388488806,2.9075908995685467)
pscircle[linewidth=1.2pt,linecolor=gray,fillcolor=gray,fillstyle=solid,opacity=0.25](0.,0.)0.75
pspolygon[linewidth=1.6pt,linecolor=blue,fillcolor=blue,fillstyle=solid,opacity=0.25](0.,1.)(0.,-1.)(2.,-1.)(2.,1.)
psline[linewidth=1.6pt,linecolor=blue](0.,1.)(0.,-1.)
psline[linewidth=1.6pt,linecolor=blue](0.,-1.)(2.,-1.)
psline[linewidth=1.6pt,linecolor=blue](2.,-1.)(2.,1.)
psline[linewidth=1.6pt,linecolor=blue](2.,1.)(0.,1.)
endpspicture*


enddocument


The result (in both) should be



enter image description here



but I receive



enter image description here



Any ideas on how to handle this issue?



P.S. Because I have tikz and pstricks in the same document, pfdlatex isn't appropriate to compile.










share|improve this question









New contributor




Grigorios Kostakos is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











I've recently upgraded (on Ubuntu 18.04 LTS) TexLive 2016 to 2017. The problem that came up is that the opacity of tikz (pgf) and of pstricks pictures is not working in .ps and .pdf files after rendering (Latex to dvi to ps to pdf).



I've tried in Texstudio, Texmaker, and Kile and the problem occurred with all three editors. I've tried evince and okular and the problem occurred in both viewers. On the other hand in Qtikz and in Texstudio's preview, opacity is working fine for tikz.



I didn't had this problem with all previous TexLive versions.



Here is a minimal example with one tikz and one pstricks image:



documentclass[10pt]article
usepackage[english,greek]babel
usepackage[iso-8859-7]inputenc
usepackagepstricks, pstricks-add
usepackagegraphicx, color
usepackagepgf,tikz

begindocument

begintikzpicture[line cap=round,line join=round,x=0.5cm,y=0.5cm]
clip(-3.6008835336224467,-3.8322994902133702) rectangle (3.6645946388488806,2.9075908995685467);
draw [line width=1.2pt,color=gray,fill=gray,fill opacity=0.25] (0.,0.) circle (0.75cm);
fill[line width=1.6pt,color=blue,fill=blue,fill opacity=0.25] (0.,1.) -- (0.,-1.) -- (2.,-1.) -- (2.,1.) -- cycle;
draw [line width=1.6pt,color=blue] (0.,1.)-- (0.,-1.);
draw [line width=1.6pt,color=blue] (0.,-1.)-- (2.,-1.);
draw [line width=1.6pt,color=blue] (2.,-1.)-- (2.,1.);
draw [line width=1.6pt,color=blue] (2.,1.)-- (0.,1.);
endtikzpicture


bigskip


pssetxunit=0.5cm,yunit=0.5cm,algebraic=true,dimen=middle,dotstyle=o,dotsize=5pt 0,linewidth=0.8pt,arrowsize=3pt 2,arrowinset=0.25
beginpspicture*(-3.6008835336224467,-3.8322994902133702)(3.6645946388488806,2.9075908995685467)
pscircle[linewidth=1.2pt,linecolor=gray,fillcolor=gray,fillstyle=solid,opacity=0.25](0.,0.)0.75
pspolygon[linewidth=1.6pt,linecolor=blue,fillcolor=blue,fillstyle=solid,opacity=0.25](0.,1.)(0.,-1.)(2.,-1.)(2.,1.)
psline[linewidth=1.6pt,linecolor=blue](0.,1.)(0.,-1.)
psline[linewidth=1.6pt,linecolor=blue](0.,-1.)(2.,-1.)
psline[linewidth=1.6pt,linecolor=blue](2.,-1.)(2.,1.)
psline[linewidth=1.6pt,linecolor=blue](2.,1.)(0.,1.)
endpspicture*


enddocument


The result (in both) should be



enter image description here



but I receive



enter image description here



Any ideas on how to handle this issue?



P.S. Because I have tikz and pstricks in the same document, pfdlatex isn't appropriate to compile.







tikz-pgf pstricks transparency ghostscript ps2pdf






share|improve this question









New contributor




Grigorios Kostakos is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











share|improve this question









New contributor




Grigorios Kostakos is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









share|improve this question




share|improve this question








edited Oct 4 at 12:25









AlexG

31.3k475139




31.3k475139






New contributor




Grigorios Kostakos is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









asked Oct 4 at 10:33









Grigorios Kostakos

483




483




New contributor




Grigorios Kostakos is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





New contributor





Grigorios Kostakos is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






Grigorios Kostakos is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











  • If @Alex's answer has solved your problem, it is customary to accept it, see: tex.stackexchange.com/help/someone-answers
    – AndréC
    Oct 4 at 17:04
















  • If @Alex's answer has solved your problem, it is customary to accept it, see: tex.stackexchange.com/help/someone-answers
    – AndréC
    Oct 4 at 17:04















If @Alex's answer has solved your problem, it is customary to accept it, see: tex.stackexchange.com/help/someone-answers
– AndréC
Oct 4 at 17:04




If @Alex's answer has solved your problem, it is customary to accept it, see: tex.stackexchange.com/help/someone-answers
– AndréC
Oct 4 at 17:04










1 Answer
1






active

oldest

votes

















up vote
8
down vote



accepted










Due to recently discovered Ghostscript vulnerabilities, a number of operations during format conversion, including transparency related operations, have been disabled for default usage, beginning with GS version 9.24.



They can still be accessed in unsafe operation mode of Ghostscript, which must be explicitly enabled by the user.



Enable unsafe mode with the -dNOSAFER option:



ps2pdf -dNOSAFER myfile.ps myfile.pdf


Of course, this may not be done for PS files of untrusted origin.






share|improve this answer






















  • Interesting: does that mean transparency in PostScript is 'dead' (at least for secure ones).
    – Joseph Wright♦
    Oct 4 at 11:36










  • @joseph Don't know. The related reports and statements are a long and difficult read. I hope these changes are temporary and will be replaced by fixing their origins.
    – AlexG
    Oct 4 at 11:40











  • @AlexG thanks! I changed on Texstudio and on Texmaker Ps2Pdf command : ps2pdf -dNOSAFER %.ps %.pdf and tikz and pstricks works fine. Although I can't make it work in Kile.
    – Grigorios Kostakos
    Oct 4 at 12:16










  • @GrigoriosKostakos Glad to hear this. As for Kile, I don't know how to adjust. I always run the tools (latex, dvips, ps2pdf) on the command line.
    – AlexG
    Oct 4 at 12:20










Your Answer







StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "85"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
convertImagesToLinks: false,
noModals: false,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);






Grigorios Kostakos is a new contributor. Be nice, and check out our Code of Conduct.









 

draft saved


draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f453780%2fpgfs-and-pstrickss-opacity-is-not-working%23new-answer', 'question_page');

);

Post as a guest






























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes








up vote
8
down vote



accepted










Due to recently discovered Ghostscript vulnerabilities, a number of operations during format conversion, including transparency related operations, have been disabled for default usage, beginning with GS version 9.24.



They can still be accessed in unsafe operation mode of Ghostscript, which must be explicitly enabled by the user.



Enable unsafe mode with the -dNOSAFER option:



ps2pdf -dNOSAFER myfile.ps myfile.pdf


Of course, this may not be done for PS files of untrusted origin.






share|improve this answer






















  • Interesting: does that mean transparency in PostScript is 'dead' (at least for secure ones).
    – Joseph Wright♦
    Oct 4 at 11:36










  • @joseph Don't know. The related reports and statements are a long and difficult read. I hope these changes are temporary and will be replaced by fixing their origins.
    – AlexG
    Oct 4 at 11:40











  • @AlexG thanks! I changed on Texstudio and on Texmaker Ps2Pdf command : ps2pdf -dNOSAFER %.ps %.pdf and tikz and pstricks works fine. Although I can't make it work in Kile.
    – Grigorios Kostakos
    Oct 4 at 12:16










  • @GrigoriosKostakos Glad to hear this. As for Kile, I don't know how to adjust. I always run the tools (latex, dvips, ps2pdf) on the command line.
    – AlexG
    Oct 4 at 12:20














up vote
8
down vote



accepted










Due to recently discovered Ghostscript vulnerabilities, a number of operations during format conversion, including transparency related operations, have been disabled for default usage, beginning with GS version 9.24.



They can still be accessed in unsafe operation mode of Ghostscript, which must be explicitly enabled by the user.



Enable unsafe mode with the -dNOSAFER option:



ps2pdf -dNOSAFER myfile.ps myfile.pdf


Of course, this may not be done for PS files of untrusted origin.






share|improve this answer






















  • Interesting: does that mean transparency in PostScript is 'dead' (at least for secure ones).
    – Joseph Wright♦
    Oct 4 at 11:36










  • @joseph Don't know. The related reports and statements are a long and difficult read. I hope these changes are temporary and will be replaced by fixing their origins.
    – AlexG
    Oct 4 at 11:40











  • @AlexG thanks! I changed on Texstudio and on Texmaker Ps2Pdf command : ps2pdf -dNOSAFER %.ps %.pdf and tikz and pstricks works fine. Although I can't make it work in Kile.
    – Grigorios Kostakos
    Oct 4 at 12:16










  • @GrigoriosKostakos Glad to hear this. As for Kile, I don't know how to adjust. I always run the tools (latex, dvips, ps2pdf) on the command line.
    – AlexG
    Oct 4 at 12:20












up vote
8
down vote



accepted







up vote
8
down vote



accepted






Due to recently discovered Ghostscript vulnerabilities, a number of operations during format conversion, including transparency related operations, have been disabled for default usage, beginning with GS version 9.24.



They can still be accessed in unsafe operation mode of Ghostscript, which must be explicitly enabled by the user.



Enable unsafe mode with the -dNOSAFER option:



ps2pdf -dNOSAFER myfile.ps myfile.pdf


Of course, this may not be done for PS files of untrusted origin.






share|improve this answer














Due to recently discovered Ghostscript vulnerabilities, a number of operations during format conversion, including transparency related operations, have been disabled for default usage, beginning with GS version 9.24.



They can still be accessed in unsafe operation mode of Ghostscript, which must be explicitly enabled by the user.



Enable unsafe mode with the -dNOSAFER option:



ps2pdf -dNOSAFER myfile.ps myfile.pdf


Of course, this may not be done for PS files of untrusted origin.







share|improve this answer














share|improve this answer



share|improve this answer








edited Oct 4 at 12:01

























answered Oct 4 at 11:25









AlexG

31.3k475139




31.3k475139











  • Interesting: does that mean transparency in PostScript is 'dead' (at least for secure ones).
    – Joseph Wright♦
    Oct 4 at 11:36










  • @joseph Don't know. The related reports and statements are a long and difficult read. I hope these changes are temporary and will be replaced by fixing their origins.
    – AlexG
    Oct 4 at 11:40











  • @AlexG thanks! I changed on Texstudio and on Texmaker Ps2Pdf command : ps2pdf -dNOSAFER %.ps %.pdf and tikz and pstricks works fine. Although I can't make it work in Kile.
    – Grigorios Kostakos
    Oct 4 at 12:16










  • @GrigoriosKostakos Glad to hear this. As for Kile, I don't know how to adjust. I always run the tools (latex, dvips, ps2pdf) on the command line.
    – AlexG
    Oct 4 at 12:20
















  • Interesting: does that mean transparency in PostScript is 'dead' (at least for secure ones).
    – Joseph Wright♦
    Oct 4 at 11:36










  • @joseph Don't know. The related reports and statements are a long and difficult read. I hope these changes are temporary and will be replaced by fixing their origins.
    – AlexG
    Oct 4 at 11:40











  • @AlexG thanks! I changed on Texstudio and on Texmaker Ps2Pdf command : ps2pdf -dNOSAFER %.ps %.pdf and tikz and pstricks works fine. Although I can't make it work in Kile.
    – Grigorios Kostakos
    Oct 4 at 12:16










  • @GrigoriosKostakos Glad to hear this. As for Kile, I don't know how to adjust. I always run the tools (latex, dvips, ps2pdf) on the command line.
    – AlexG
    Oct 4 at 12:20















Interesting: does that mean transparency in PostScript is 'dead' (at least for secure ones).
– Joseph Wright♦
Oct 4 at 11:36




Interesting: does that mean transparency in PostScript is 'dead' (at least for secure ones).
– Joseph Wright♦
Oct 4 at 11:36












@joseph Don't know. The related reports and statements are a long and difficult read. I hope these changes are temporary and will be replaced by fixing their origins.
– AlexG
Oct 4 at 11:40





@joseph Don't know. The related reports and statements are a long and difficult read. I hope these changes are temporary and will be replaced by fixing their origins.
– AlexG
Oct 4 at 11:40













@AlexG thanks! I changed on Texstudio and on Texmaker Ps2Pdf command : ps2pdf -dNOSAFER %.ps %.pdf and tikz and pstricks works fine. Although I can't make it work in Kile.
– Grigorios Kostakos
Oct 4 at 12:16




@AlexG thanks! I changed on Texstudio and on Texmaker Ps2Pdf command : ps2pdf -dNOSAFER %.ps %.pdf and tikz and pstricks works fine. Although I can't make it work in Kile.
– Grigorios Kostakos
Oct 4 at 12:16












@GrigoriosKostakos Glad to hear this. As for Kile, I don't know how to adjust. I always run the tools (latex, dvips, ps2pdf) on the command line.
– AlexG
Oct 4 at 12:20




@GrigoriosKostakos Glad to hear this. As for Kile, I don't know how to adjust. I always run the tools (latex, dvips, ps2pdf) on the command line.
– AlexG
Oct 4 at 12:20










Grigorios Kostakos is a new contributor. Be nice, and check out our Code of Conduct.









 

draft saved


draft discarded


















Grigorios Kostakos is a new contributor. Be nice, and check out our Code of Conduct.












Grigorios Kostakos is a new contributor. Be nice, and check out our Code of Conduct.











Grigorios Kostakos is a new contributor. Be nice, and check out our Code of Conduct.













 


draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f453780%2fpgfs-and-pstrickss-opacity-is-not-working%23new-answer', 'question_page');

);

Post as a guest













































































Popular posts from this blog

How to check contact read email or not when send email to Individual?

Displaying single band from multi-band raster using QGIS

How many registers does an x86_64 CPU actually have?