EvotecIT / PSWritePDF

PowerShell Module to create, edit, split, merge PDF files on Windows / Linux and MacOS
GNU Affero General Public License v3.0
195 stars 21 forks source link

Add table or add text into existing pdf #39

Open ericxin1982 opened 2 years ago

ericxin1982 commented 2 years ago

hi,

I am wondering how to add text or table into existing pdf, not write txt or table into new pdf.

Thanks Eric Xin

PrzemyslawKlys commented 2 years ago

Unfortunately I don't know. But you should start like that ... and then go thru $PDF variable

Import-Module .\PSWritePDF.psd1 -Force

$FilePath = "$PSSCriptRoot\Example12.ReadingTable.pdf"
$PDF = Get-PDF -FilePath $FilePath
$PDF
Close-PDF -Document $PDF

I tried finding some c# docs around itext 7 how to find an existing table - and failed. Maybe you will have more luck.

ericxin1982 commented 2 years ago

@PrzemyslawKlys

Sorry, I meant add text into an existing pdf, not must have especially a table object.

Thanks Eric Xin