Graphics, Figures & Tables ⇒ Insert a pdf-file
Insert a pdf-file
I'm writing a documentation and the documentation has an appendix. I like to add some data sheets to the appendix which I've only as a pdf-file. The pdf-file has several pages and I need all pages for my documentation.
My question: Can I include the whole pdf-file with one command to my documentation?
Thanks for all answers
NEW: TikZ book now 40% off at Amazon.com for a short time.
And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p
Insert a pdf-file
Re: Insert a pdf-file
*************************
=> Fibonacci numbers
Re: Insert a pdf-file
\usepackage{pdfpages}
\includepdf[pages=-]{doc_XY.pdf}
Thank you again for the link to the doc
Re: Insert a pdf-file
i am also trying to insert pdf files in latex using pdfpages package.
But using
\includepdf[pages..]{file_name}
it only includes empty pages.
Does anyone have any idea how to solve this?
Insert a pdf-file
You need to make sure you have all the requirements in the

-
- Posts: 2
- Joined: Wed May 23, 2012 5:37 pm
Insert a pdf-file

Code: Select all
###Define the pdf files to be generated
file=paste("comunalRazPred",j,".pdf",sep="")
pdf(file=file, paper="special", width=6, height=6)
###Define the graphs to be generated (loops)
for(j in 1:length(comraz)) {
par(mfrow=c(2,2))
comr<-comj[comj$RAZA==names(comraz)[j],]
for(i in 1:4) {
comri<-comr[comr$tipo==levels(comr$tipo)[i],]
comrti<-tapply(comri$n,comri$mesabrev,sum)
comrti[is.na(comrti)]<-0
comrti0<-tapply(comri$n,list(comri$comunal,comri$mesabrev),sum)
comrti0[is.na(comrti0)]<-0
comrti1<-round(prop.table(comrti0,2)*100,0)
ymax<-floor(max(comrti)+(0.3*(max(comrti))))
barcomri<-barplot(comrti0,las=1,ylab="nº de reses",ylim=c(0,ymax),
main=paste(names(comraz[j])," ",levels(comr$tipo)[i]),cex.names=0.7,cex.axis=0.8)
valeje<-min(b[a>ymax])
abline(h=seq(from=0,to=ymax,by=valeje),lty=2,
col="lightgrey")
par(new=T)
barcomri<-barplot(comrti0,las=1,ylim=c(0,ymax),cex.names=0.7,cex.axis=0.8)
text(barcomri,comrti,comrti1[2,],cex=0.5,pos=3)
legend("top",c("en explotación","en comunal"),box.lty=0,fill=grey.colors(2),
horiz=T)
} }
### THEN COMES MY PROBLEMS
### INCLUSION OF THE GENERATED GRAPHICS
dev.off()
cat("\\begin{figure}[htb]")
cat("\\begin{center}")
cat("\\includepdf[pages={-}]{",file,"}\n",sep="")
cat("\\caption{Evolución mensual en el número de reses segun su raza, tipo y localización}", sep="")
cat("\\end{center}")
cat("\\end{figure}")