Jump to content

error unir pdfs - (Moved)


Go to solution Solved by bdr529,

Recommended Posts

Hola chicos,
tengo un problema con mi código de autoit, porque quiero unir pdfs.
(pdf24), y no funciona y no muestra ningún error.

No se cual puede ser el error pero no me aparece el pdf adjunto.

$PDF24 = "C:\Archivos de programa\PDF24\pdf24.exe"
Dormir ( 4000 )
 
$archivo1 = "C:\Usuarios\jpelayo\Documentos\prueba\cuota.pdf"
$archivo2 = "C:\Usuarios\jpelayo\Documentos\prueba\reporte.pdf"
 
$salida = "C:\Usuarios\jpelayo\Documentos\prueba\salida.pdf"
Dormir ( 4000 )
 
$comando =   '/mergePDF"' & $archivo1 & '" "' & $archivo2 & '" "' & $salida & '"'
Dormir ( 4000 )
 
Ejecutar ( $PDF24 & ' ' & $comando )
Revelación

 

 
$PDF24 = "C:\Archivos de programa\PDF24\pdf24.exe"
Dormir ( 4000 )
 
$archivo1 = "C:\Usuarios\jpelayo\Documentos\prueba\cuota.pdf"
$archivo2 = "C:\Usuarios\jpelayo\Documentos\prueba\reporte.pdf"
 
$salida = "C:\Usuarios\jpelayo\Documentos\prueba\salida.pdf"
Dormir ( 4000 )
 
$comando =   '/mergePDF"' & $archivo1 & '" "' & $archivo2 & '" "' & $salida & '"'
Dormir ( 4000 )
 
Ejecutar ( $PDF24 & ' ' & $comando )

 

Edited by stiv
Link to post
Share on other sites
  • Moderators

Moved to the appropriate AutoIt General Help and Support forum, as the AutoIt Example Scripts forum very clearly states:

Quote

Share your cool AutoIt scripts, UDFs and applications with others.


Do not post general support questions here, instead use the AutoIt Help and Support forums.

Moderation Team

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to post
Share on other sites

@Danp2  

I made the change that you recommended with "Console Write"
However, it does not create the new joined file.

 

I don't know what it could be, and I have the autoit version 3.3.145

image.png.7c1f5fdd5ff7da14b877fd418892032b.png

Link to post
Share on other sites

@stivThe switch to ConsoleWrite is intended to be temporary to allow you to see the error in your code. You will eventually switch back to Run(), but first you need to review the console output to examine the string that you were passing to Run() and correct its format.

This is what I got and it is clearly incorrect --

     C:\Program Files\PDF24\pdf24.exe /mergePDF"C:\Users\jpelayo\Documents\prueba\cuota.pdf" "C:\Users\jpelayo\Documents\prueba\reporte.pdf" "C:\Users\jpelayo\Documents\prueba\salida.pdf"

Hints: You need quotes around program path because it contains spaces and you are missing a space following the "mergePDF" parameter.

Link to post
Share on other sites

@Danp2

I validated spaces and quotes and it didn't work for me, if I went without finding the error. however I found a useful script that unifies them.

Run("pdftk.exe C:\Users\jpelayo\Documents\prueba\cuota.pdf C:\Users\jpelayo\Documents\prueba\reporte.pdf cat output  C:\Users\jpelayo\Documents\prueba\archivo_unificado.pdf")

I would have liked to do it with pdf24.

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...