Thursday, November 12, 2020

add jpg to pdf

Python stuff:

https://stackabuse.com/working-with-pdfs-in-python-adding-images-and-watermarks/


C# Stuff:

https://ironpdf.com/docs/questions/signing/


Delphi stuff:

https://github.com/synopse/SynPDF

https://synopse.info/forum/viewtopic.php?pid=370

http://www.trichview.com/forums/viewtopic.php?t=7304

https://awesomeopensource.com/project/synopse/SynPDF


procedure TForm5.Button1Click(Sender: TObject);

var
lPdf : TPdfDocument;
lPage : TPdfPage;
begin
lPdf := TPdfDocument.Create;
try
lPdf.Info.Author := 'Tester';
lPdf.Info.CreationDate := Now;
lPdf.Info.Creator := 'Tester';
lPdf.DefaultPaperSize := psA4;
lPage := lPDF.AddPage;
lPDF.Canvas.SetFont('Helvetica',10.0,[]);
lPDF.Canvas.SetLeading(lPDF.Canvas.Page.FontSize);
lPDF.Canvas.SetLineWidth(0.1);
lPdf.Canvas.BeginText;
lPdf.Canvas.TextOut( 300, 700, 'This is some text.');
lPdf.Canvas.EndText;
lPdf.SaveToFile('c:\temp\test.pdf');
finally
lPdf.Free;
end;
end;

Conclusion - the best choice:




# To extract pages 1-3, 5 and 6-10 from a PDF file and save them as another one:
qpdf --empty --pages <input.pdf> <1-3,5,6-10> -- <output.pdf>
 
# To merge (concatenate) all the pages of a list of PDF files and save the result as a new PDF:
qpdf --empty --pages <file1.pdf> <file2.pdf> <file3.pdf> -- <output.pdf>
 
# To merge (concatenate) given pages from a list of PDF files and save the result as a new PDF:
qpdf --empty --pages <file1.pdf> <1,6-8> <file2.pdf> <3,4,5> -- <output.pdf>
 
# To write each group of n pages to a separate output file with a given filename pattern:
qpdf --split-pages=n <input.pdf> <out_%d.pdf>
 
# To rotate certain pages of a pdf with a given angle:
qpdf --rotate=<90:2,4,6> --rotate=<180:7-8> <input.pdf> <output.pdf>
 
# To remove the password from a password protected file:
qpdf --password=<password> --decrypt <input.pdf> <output.pdf>




--------------

Extract pages 1-3, 5 and 6-10 from a PDF file and save them as another one:
qpdf --empty --pages input.pdf 1-3,5,6-10 -- output.pdf
Merge (concatenate) all the pages of a list of PDF files and save the result as a new PDF:
qpdf --empty --pages file1.pdf file2.pdf file3.pdf -- output.pdf
Merge (concatenate) given pages from a list of PDF files and save the result as a new PDF:
qpdf --empty --pages file1.pdf 1,6-8 file2.pdf 3,4,5 -- output.pdf
Write each group of n pages to a separate output file with a given filename pattern:
qpdf --split-pages=n input.pdf out_%d.pdf
Rotate certain pages of a pdf with a given angle:
qpdf --rotate=90:2,4,6 --rotate=180:7-8 input.pdf output.pdf
Remove the password from a password protected file:
qpdf --password=password --decrypt input.pdf output.pdf

Delphi:


C#:





No comments:

Post a Comment

Коментар: