Included PDF vector is missing objects











up vote
6
down vote

favorite












I have created some vector graphic in Adobe Illustrator that I want to include in my latex document.



Whenever I export the vector from Illustrator with compatibility set to PDF 1.4 or above, the figure is missing certain elements or objects in the compiled latex output. Drop shadow is an example of such a missing object.



If I export it with PDF 1.3 compatibility, however, it works fine.
Setting the compatibility to PDF 1.3 is not a solution because it messes with the quality of many of my figures.



The objects are only missing with some pdf viewers, though. They are not missing with Google Chrome, but are missing with Preview on MacOS. Viewing the included pdf's directly, works fine too. It is only in the compiled latex output objects are missing.



I am using pdfTeX 3.14159265-2.6-1.40.18 (TeX Live 2017).



Any ideas?



EDIT:



An example of the included pdf is this, and the produced output is this.



documentclass[12pt, a4paper, english]{report}
usepackage[utf8]{inputenc}
usepackage{caption, graphicx}


begin{document}
testing...

begin{figure}[htb!]
centering
includegraphics[width=9cm]{osa}
caption{test-figure}
label{some-label}
end{figure}
end{document}









share|improve this question
















bumped to the homepage by Community 2 hours ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.











  • 1




    Welcome to TeX.Stackexchange! There are sometimes problems with transparency etc. Can you make the problematic pdf available, which you want to include? There are a few tricks in latex how to fix this problem.
    – samcarter
    Apr 28 at 12:36








  • 1




    Some other trick which often helps: before including the image in latex, open it with Preview and save it. Then try again to compile.
    – samcarter
    Apr 28 at 12:39










  • Thanks, that unfortunately did not work.
    – user33236
    Apr 28 at 13:30










  • Can Illustrator export to svg? If yes, you could try tex.stackexchange.com/a/291861/36296
    – samcarter
    Apr 28 at 16:40















up vote
6
down vote

favorite












I have created some vector graphic in Adobe Illustrator that I want to include in my latex document.



Whenever I export the vector from Illustrator with compatibility set to PDF 1.4 or above, the figure is missing certain elements or objects in the compiled latex output. Drop shadow is an example of such a missing object.



If I export it with PDF 1.3 compatibility, however, it works fine.
Setting the compatibility to PDF 1.3 is not a solution because it messes with the quality of many of my figures.



The objects are only missing with some pdf viewers, though. They are not missing with Google Chrome, but are missing with Preview on MacOS. Viewing the included pdf's directly, works fine too. It is only in the compiled latex output objects are missing.



I am using pdfTeX 3.14159265-2.6-1.40.18 (TeX Live 2017).



Any ideas?



EDIT:



An example of the included pdf is this, and the produced output is this.



documentclass[12pt, a4paper, english]{report}
usepackage[utf8]{inputenc}
usepackage{caption, graphicx}


begin{document}
testing...

begin{figure}[htb!]
centering
includegraphics[width=9cm]{osa}
caption{test-figure}
label{some-label}
end{figure}
end{document}









share|improve this question
















bumped to the homepage by Community 2 hours ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.











  • 1




    Welcome to TeX.Stackexchange! There are sometimes problems with transparency etc. Can you make the problematic pdf available, which you want to include? There are a few tricks in latex how to fix this problem.
    – samcarter
    Apr 28 at 12:36








  • 1




    Some other trick which often helps: before including the image in latex, open it with Preview and save it. Then try again to compile.
    – samcarter
    Apr 28 at 12:39










  • Thanks, that unfortunately did not work.
    – user33236
    Apr 28 at 13:30










  • Can Illustrator export to svg? If yes, you could try tex.stackexchange.com/a/291861/36296
    – samcarter
    Apr 28 at 16:40













up vote
6
down vote

favorite









up vote
6
down vote

favorite











I have created some vector graphic in Adobe Illustrator that I want to include in my latex document.



Whenever I export the vector from Illustrator with compatibility set to PDF 1.4 or above, the figure is missing certain elements or objects in the compiled latex output. Drop shadow is an example of such a missing object.



If I export it with PDF 1.3 compatibility, however, it works fine.
Setting the compatibility to PDF 1.3 is not a solution because it messes with the quality of many of my figures.



The objects are only missing with some pdf viewers, though. They are not missing with Google Chrome, but are missing with Preview on MacOS. Viewing the included pdf's directly, works fine too. It is only in the compiled latex output objects are missing.



I am using pdfTeX 3.14159265-2.6-1.40.18 (TeX Live 2017).



Any ideas?



EDIT:



An example of the included pdf is this, and the produced output is this.



documentclass[12pt, a4paper, english]{report}
usepackage[utf8]{inputenc}
usepackage{caption, graphicx}


begin{document}
testing...

begin{figure}[htb!]
centering
includegraphics[width=9cm]{osa}
caption{test-figure}
label{some-label}
end{figure}
end{document}









share|improve this question















I have created some vector graphic in Adobe Illustrator that I want to include in my latex document.



Whenever I export the vector from Illustrator with compatibility set to PDF 1.4 or above, the figure is missing certain elements or objects in the compiled latex output. Drop shadow is an example of such a missing object.



If I export it with PDF 1.3 compatibility, however, it works fine.
Setting the compatibility to PDF 1.3 is not a solution because it messes with the quality of many of my figures.



The objects are only missing with some pdf viewers, though. They are not missing with Google Chrome, but are missing with Preview on MacOS. Viewing the included pdf's directly, works fine too. It is only in the compiled latex output objects are missing.



I am using pdfTeX 3.14159265-2.6-1.40.18 (TeX Live 2017).



Any ideas?



EDIT:



An example of the included pdf is this, and the produced output is this.



documentclass[12pt, a4paper, english]{report}
usepackage[utf8]{inputenc}
usepackage{caption, graphicx}


begin{document}
testing...

begin{figure}[htb!]
centering
includegraphics[width=9cm]{osa}
caption{test-figure}
label{some-label}
end{figure}
end{document}






pdftex pdf includegraphics






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Apr 28 at 13:28

























asked Apr 27 at 19:22









user33236

312




312





bumped to the homepage by Community 2 hours ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.







bumped to the homepage by Community 2 hours ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.










  • 1




    Welcome to TeX.Stackexchange! There are sometimes problems with transparency etc. Can you make the problematic pdf available, which you want to include? There are a few tricks in latex how to fix this problem.
    – samcarter
    Apr 28 at 12:36








  • 1




    Some other trick which often helps: before including the image in latex, open it with Preview and save it. Then try again to compile.
    – samcarter
    Apr 28 at 12:39










  • Thanks, that unfortunately did not work.
    – user33236
    Apr 28 at 13:30










  • Can Illustrator export to svg? If yes, you could try tex.stackexchange.com/a/291861/36296
    – samcarter
    Apr 28 at 16:40














  • 1




    Welcome to TeX.Stackexchange! There are sometimes problems with transparency etc. Can you make the problematic pdf available, which you want to include? There are a few tricks in latex how to fix this problem.
    – samcarter
    Apr 28 at 12:36








  • 1




    Some other trick which often helps: before including the image in latex, open it with Preview and save it. Then try again to compile.
    – samcarter
    Apr 28 at 12:39










  • Thanks, that unfortunately did not work.
    – user33236
    Apr 28 at 13:30










  • Can Illustrator export to svg? If yes, you could try tex.stackexchange.com/a/291861/36296
    – samcarter
    Apr 28 at 16:40








1




1




Welcome to TeX.Stackexchange! There are sometimes problems with transparency etc. Can you make the problematic pdf available, which you want to include? There are a few tricks in latex how to fix this problem.
– samcarter
Apr 28 at 12:36






Welcome to TeX.Stackexchange! There are sometimes problems with transparency etc. Can you make the problematic pdf available, which you want to include? There are a few tricks in latex how to fix this problem.
– samcarter
Apr 28 at 12:36






1




1




Some other trick which often helps: before including the image in latex, open it with Preview and save it. Then try again to compile.
– samcarter
Apr 28 at 12:39




Some other trick which often helps: before including the image in latex, open it with Preview and save it. Then try again to compile.
– samcarter
Apr 28 at 12:39












Thanks, that unfortunately did not work.
– user33236
Apr 28 at 13:30




Thanks, that unfortunately did not work.
– user33236
Apr 28 at 13:30












Can Illustrator export to svg? If yes, you could try tex.stackexchange.com/a/291861/36296
– samcarter
Apr 28 at 16:40




Can Illustrator export to svg? If yes, you could try tex.stackexchange.com/a/291861/36296
– samcarter
Apr 28 at 16:40










1 Answer
1






active

oldest

votes

















up vote
0
down vote













Including pdfs which contain semi-transparent shapes often causes problems with the compiled document in Mac Preview.



I tested a couple of workarounds and the following two seems to work for your image, however they will both result in a rasterized image:





  • based on https://tex.stackexchange.com/a/166123/36296 you could use ghostscript to sanitize the image



    ps2pdfwr -dCompatibilityLevel=1.4 -dHaveTransparency=false osa.pdf sanitized.pdf


  • convert the image to ps (psd2ps osa.pdf) and back (pdf2ps oas.ps)



enter image description here






share|improve this answer























  • Thanks, but does not both of these methods result in rasterized image?
    – user33236
    Apr 28 at 16:12










  • @user33236 You are right, I just examined the result of the ps detour and it is indeed embedded as an image :(
    – samcarter
    Apr 28 at 16:36











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: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














 

draft saved


draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f428925%2fincluded-pdf-vector-is-missing-objects%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes








up vote
0
down vote













Including pdfs which contain semi-transparent shapes often causes problems with the compiled document in Mac Preview.



I tested a couple of workarounds and the following two seems to work for your image, however they will both result in a rasterized image:





  • based on https://tex.stackexchange.com/a/166123/36296 you could use ghostscript to sanitize the image



    ps2pdfwr -dCompatibilityLevel=1.4 -dHaveTransparency=false osa.pdf sanitized.pdf


  • convert the image to ps (psd2ps osa.pdf) and back (pdf2ps oas.ps)



enter image description here






share|improve this answer























  • Thanks, but does not both of these methods result in rasterized image?
    – user33236
    Apr 28 at 16:12










  • @user33236 You are right, I just examined the result of the ps detour and it is indeed embedded as an image :(
    – samcarter
    Apr 28 at 16:36















up vote
0
down vote













Including pdfs which contain semi-transparent shapes often causes problems with the compiled document in Mac Preview.



I tested a couple of workarounds and the following two seems to work for your image, however they will both result in a rasterized image:





  • based on https://tex.stackexchange.com/a/166123/36296 you could use ghostscript to sanitize the image



    ps2pdfwr -dCompatibilityLevel=1.4 -dHaveTransparency=false osa.pdf sanitized.pdf


  • convert the image to ps (psd2ps osa.pdf) and back (pdf2ps oas.ps)



enter image description here






share|improve this answer























  • Thanks, but does not both of these methods result in rasterized image?
    – user33236
    Apr 28 at 16:12










  • @user33236 You are right, I just examined the result of the ps detour and it is indeed embedded as an image :(
    – samcarter
    Apr 28 at 16:36













up vote
0
down vote










up vote
0
down vote









Including pdfs which contain semi-transparent shapes often causes problems with the compiled document in Mac Preview.



I tested a couple of workarounds and the following two seems to work for your image, however they will both result in a rasterized image:





  • based on https://tex.stackexchange.com/a/166123/36296 you could use ghostscript to sanitize the image



    ps2pdfwr -dCompatibilityLevel=1.4 -dHaveTransparency=false osa.pdf sanitized.pdf


  • convert the image to ps (psd2ps osa.pdf) and back (pdf2ps oas.ps)



enter image description here






share|improve this answer














Including pdfs which contain semi-transparent shapes often causes problems with the compiled document in Mac Preview.



I tested a couple of workarounds and the following two seems to work for your image, however they will both result in a rasterized image:





  • based on https://tex.stackexchange.com/a/166123/36296 you could use ghostscript to sanitize the image



    ps2pdfwr -dCompatibilityLevel=1.4 -dHaveTransparency=false osa.pdf sanitized.pdf


  • convert the image to ps (psd2ps osa.pdf) and back (pdf2ps oas.ps)



enter image description here







share|improve this answer














share|improve this answer



share|improve this answer








edited Apr 28 at 16:41

























answered Apr 28 at 14:59









samcarter

82.3k793262




82.3k793262












  • Thanks, but does not both of these methods result in rasterized image?
    – user33236
    Apr 28 at 16:12










  • @user33236 You are right, I just examined the result of the ps detour and it is indeed embedded as an image :(
    – samcarter
    Apr 28 at 16:36


















  • Thanks, but does not both of these methods result in rasterized image?
    – user33236
    Apr 28 at 16:12










  • @user33236 You are right, I just examined the result of the ps detour and it is indeed embedded as an image :(
    – samcarter
    Apr 28 at 16:36
















Thanks, but does not both of these methods result in rasterized image?
– user33236
Apr 28 at 16:12




Thanks, but does not both of these methods result in rasterized image?
– user33236
Apr 28 at 16:12












@user33236 You are right, I just examined the result of the ps detour and it is indeed embedded as an image :(
– samcarter
Apr 28 at 16:36




@user33236 You are right, I just examined the result of the ps detour and it is indeed embedded as an image :(
– samcarter
Apr 28 at 16:36


















 

draft saved


draft discarded



















































 


draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f428925%2fincluded-pdf-vector-is-missing-objects%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

A CLEAN and SIMPLE way to add appendices to Table of Contents and bookmarks

Calculate evaluation metrics using cross_val_predict sklearn

Insert data from modal to MySQL (multiple modal on website)