|
|
|
|
Extrae una página de un archivo PDF en una Variable de tipo Image. // Extracts page 3 from the text.pdf file MyImage is Image = PDFExtractPage("text.pdf", 3)
EDT_NumPagePDF.BackgroundColor = White IF EDT_NumPagePDF = 0 THEN Info("Specify a page page number to be extracted") EDT_NumPagePDF.BackgroundColor = PastelRed SetFocusAndReturnToUserInput(EDT_NumPagePDF) RETURN END sNewPath is string = fSelectDir(sOriginalPath, ... "Directory selector","Select the page extraction directory") // Search in the DOC_Contact data file for the text contained in the Table control. HReadSeek(DOC_Contact, DOCID_Contact, TABLE_Win_Document_List.COL_DOCID_Contact) IF HFound() THEN HourGlass() MyPDFPath is string = sNewPath + "\" + ... DOC_Contact.DOCID_Contact + "." + DOC_Contact.Format // Document is a memo that contains the PDF file IF NOT HExtractMemo(DOC_Contact, Document, MyPDFPath) THEN Error(HErrorInfo()) ELSE IF PDFNumberOfPages(MyPDFPath) < EDT_NumPagePDF THEN Error("The PDF document does not contain enough pages", ... "Process canceled") RETURN END MyPDFImage is Image = PDFExtractPage(MyPDFPath, ... EDT_NumPagePDF) // Delete original PDF fDelete(MyPDFPath) MyPNGImage is string = sNewPath + "\" + DOC_Contact.DOCID_Contact + ... "_Page" + EDT_NumPagePDF + ".PNG" dSaveImagePNG(MyPDFImage, MyPNGImage) ShellExecute(MyPNGImage) END HourGlass(False) END
Sintaxis
<Result> = PDFExtractPage(<File path> , <Page number> [, <Width> [, <Height> [, <Password>]]])
<Result>: Imagen (imagen Variable) Image Variable que contiene el Image del Page extraído . El Image devuelto es un Image raster (no vectorial).Observación: Si el archivo PDF no existe o si la página no existe, el Image Variable devuelto no será válido. La variable ErrorOccurred corresponderá a True. <File path>: Cadena de caracteres Ruta del archivo PDF del que se extraerá la Page. <Page number>: Integro Número de la Page a extraer. <Width>: Entero opcional Anchura a la que debe rasterizarse la Page. Si no se especifica este parámetro (o si este parámetro es igual a 0), la altura y el ancho se calcularán a partir del tamaño de la página (en milímetros), considerando un DPI set a 300. <Height>: Entero opcional Altura a la que debe rasterizarse la Page. Si no se especifica este parámetro (o si este parámetro es igual a 0), la altura y el ancho se calcularán a partir del tamaño de la página (en milímetros), considerando un DPI set a 300. <Password>: Cadena de caracteres opcional Contraseña del PDF Document. Clasificación Lógica de negocio / UI: Lógica de negocio Componente: wd290wdpdf.dll
Esta página también está disponible para…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|