overlay one pdf or ps file on top of another

前端 未结 9 1283
轻奢々
轻奢々 2020-12-02 05:27

I have two pdf or postscript files (I can work with either one). What I want to do is merge each page on top of the other so that page1 of document A will be combined with

相关标签:
9条回答
  • 2020-12-02 05:58

    I had success solving this problem (PDF only and Python) by using pyPdf, specifically the mergePage operation.

    From the docs:

    # add page 4 from input1, but first add a watermark from another pdf:
    page4 = input1.getPage(3)
    watermark = PdfFileReader(file("watermark.pdf", "rb"))
    page4.mergePage(watermark.getPage(0))
    

    Should be enough to get the idea.

    0 讨论(0)
  • 2020-12-02 06:01

    If you're dealing with only postscript, chances are the only 'pagebreaks' are the 'showpage' operator.
    In which case you can simply grab the postscript data from the beginning of file one to the first instance of 'showpage', do the same with the other file, then concatenate these 2 chunks of postscript to create your new page.

    If the 2 files are only one page, then you may be able to simply join the 2 files.

    0 讨论(0)
  • 2020-12-02 06:01

    Aspose.Pdf.Kit with thePdfFileStamp class can do this, too. It works most of the time correctly.

    0 讨论(0)
  • 2020-12-02 06:02

    For OS X there is PDF letterhead. Doesn't do anything else than just overlaying PDF's. https://itunes.apple.com/us/app/pdf-letterhead/id976548033?mt=12

    0 讨论(0)
  • 2020-12-02 06:04

    VeryPDF PDF Editor has a PDF Overlay function, look at this web page,

    http://www.verypdf.com/wordpress/201304/how-to-overlay-pdf-to-another-pdf-35885.html

    0 讨论(0)
  • 2020-12-02 06:13

    I used the Mac OS tool PDFClerk Pro. I imported the PDF pages, then merged them with the option "Merge Pages (Stacked)." It really impressed me.

    0 讨论(0)
提交回复
热议问题