Questions tagged [pdfpages]

A Python method, in matplotlib, for generating a pdf with multiple pages or a Latex package for inserting external pdf documents.

is either a Python method for generating a pdf with multiple pages or a Latex package for inserting external pdf documents.

If the question relates to the Python method it should usually be tagged with both and . If it relates to the Latex package it should be tagged with .

Further reading:

60 questions
1
vote
1 answer

PyPlot: Trying to generate shared legend in a subplot, but legends don't appear properly when embedded in a loop. (PDF backend)

I'm just starting out with Matplotlib, switching from Matlab. I run Spyder through python(x,y) on Windows 7. I wrote a little script whose job is to Open several Excel spreadsheets containing tabular data For each sheet, generate several pie plots…
nivek
  • 515
  • 1
  • 7
  • 18
0
votes
1 answer

How to stop extra page being created in PDF output from matplotlib PdfPages function

I can't figure out why I'm getting an extra page in my PDF file. I only have 7 files that are loaded but 8 are being created in the PDF output file. Below is the code I'm working with. The files being loaded are actually copies of one file each…
DamianJ
  • 419
  • 2
  • 8
  • 18
0
votes
0 answers

PdfPages slow printing

I am using PdfPages to save several images in one file, but saving a 2D colormesh in particular seems ridiculously slow. Saving a 3D plot of my data takes about 10 seconds. These are made with fig3 = mpl.figure() fig, ax =…
0
votes
0 answers

Add horizontal scrolling to the plot (dataframe table) while using matplotlib / PdfPages

I'm using matplotlib to plot a dataframe table into a PDF file using PdfPages. The dataframe has around 75 columns and need to display each of the columns. so, I tried to add horizontal scrolling to the image. I'm using below code: # df is the…
Mandar Pande
  • 12,250
  • 16
  • 45
  • 72
0
votes
1 answer

How to detect drawings and get their size from a pdf using python?

Basically I want to detect and get the bounding box of the figures or drawings which are in pdf using python, enter image description here As per the image I just want the bounding box of the figure right below the question, but it also detects the…
0
votes
1 answer

Put Header, Footer and page number for pdf with pdfpages matplotlib

I created PDF file of figures with pdfpages in matplotlib. Now I want to add headers (contains text and line), footer (contains text and line) and page number. How can I do that?
rahnama7m
  • 865
  • 10
  • 38
0
votes
1 answer

How to plot 4 figures per page with pdfpages in matplotlib?

I have the code below which produces the output I want. import pandas as pd import numpy as np import seaborn as sns import matplotlib.pyplot as plt from matplotlib.backends.backend_pdf import PdfPages plt.style.use('ggplot') %matplotlib…
Sid
  • 123
  • 8
0
votes
0 answers

How to save subplots in different pages of a single pdf using PDFPages

I have a datframe with metric and grouping variables. I want to group the data by several grouping variables, do subplot and then export it to pdf. Right now I have a function which does subplots and returns it to another function. Then that…
viv1993
  • 67
  • 2
0
votes
0 answers

pdfpages doesn't work, error: file not found

I do have a problem with the "pdfpages" package. I would like to insert a pdf drawing in my appendix. The file I would like to insert is in the same folder, the name of the file in my code is correct, nevertheless the error "cannot find file…
0
votes
1 answer

The page is not added to PDF, it gives an error "Optinal value"?

Good afternoon, I want to call a function in a button to add an image page to a document.Here in this method which provided below. @IBAction func mergeButton(_ sender: Any) { let newDocument = PDFDocument() let image =…
Sandero
  • 11
  • 7
0
votes
1 answer

How to save multiple graphs as separate pages in a pdf?

I have a loop that loops through 50 dataframes and calculates a variable called p90_annual for each. Within this loop I want to plot p90_annual as a page in a pdf where each page is p90_annual for each dataframe. (I want a 50 page pdf where each…
Megan Martin
  • 221
  • 1
  • 9
0
votes
1 answer

Itext java pdfptableevent rounded corners background multiple pages

I am using itext 4.2 java to generate pdf and want to have rounded corners with background color and I am able to accomplish it as well. I face one issue the first column was alone getting rounded corner and background so inorder to fix it ,I need…
bigler
  • 9
  • 3
0
votes
0 answers

Python panda PdfPages export to single PDF from different itteration

I'm planning to make a report consist of a lot (total 200+) of seaborn chart and some tables. There are different chart and to build them initially I'm using different script and iteration of PdfPages. But somehow I'm required to compile all the…
choco
  • 73
  • 7
0
votes
2 answers

Matplotlib.pyplot - how to save a histogram in a variable for later access?

Due to data access patterns, I need to save various histograms in a Python list and then access them later to output as part of a multi-page PDF. If I save the histograms to my PDF as soon as I create them, my code works fine: def…
user984792
  • 53
  • 2
  • 7
0
votes
2 answers

In matplotlib with PdfPages, how do I set the plotting area to only use the top half of a full page?

With the code below, I'd like to create a two page pdf, with both pages in standard portrait (8.5 inches wide and 11 inches tall). How can I set the plot area of the second page to only use the top half of the page? I tried using the commented out…
Steve Schulist
  • 931
  • 1
  • 11
  • 18