Replying to myself! 1) Modifying and saving a PDF file
I didn't find how to "save as..." a PDF file, but it seems like CloseFile should save it (with the same name). Nevertheless, what I'm doing does not work: page = 1 ' Defined as Global pdf = new MyDynaPDFMBS ' Defined as Global call pdf.CreateNewPDF(nil) If pdf.OpenImportFile(FileDoc, 0, "")<0 Then Return ' FileDoc defined as Global call pdf.SetImportFlags(pdf.kifImportAsPage + pdf.kifImportAll) // important! It makes the rendering faster. call pdf.ImportPDFFile(1,1.0,1.0) PageCount=pdf.GetPageCount ' Defined as Global render ' Rendering method. Useful, mandatory? If pdf.MovePage(PageCount,1) Then ' Échange réussi render ' Rendering method. Useful, mandatory? Call pdf.CloseFile End If Last page is not moved, PDF file is unchanged. 2) Export pages as JPeg files I discovered the "Extract Images" example and will study it. Is it the good example? TIA for any help, I'm a little bit lost... Jean-Luc Arnaud Le 19/03/2018 à 16:53, Jean-Luc Arnaud a écrit : > Hi, > > I have an actual newbie question: > > After modifying a PDF file (using DynaPDF), how do you save it to disk > with another name (Save as ...)? > > I tried to create a new pdf file (pdf2.CreateNewPDF), then to assign my > modified pdf (pdf1) to pdf2 (pdf2=pdf1) and finally flush pdf2 pages > (pdf2.FlushPages) but it claims for an output file. It should be the one > used when creating pdf2, shouldn't it? > > In addition, I'm looking for a way to export each page individually as a > JPeg file. I found ExtractPageText but nothing for images. > > TIA for your help. > _______________________________________________ Mbsplugins_monkeybreadsoftware.info mailing list mbsplugins@monkeybreadsoftware.info https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info