Made a simple cmd line tool to convert various files to pdf ( using the static lib to be found in the link under)
can work stand alone for raw txt format files and also with the most used picture formats
but can also use the win10 'Microsoft Print to Pdf' virtual printer as companion to convert almost all type of files
without the disturbing messagebox to define the destination path.
With that tool or using the static lib directly you can create the full automation of the conversion process for multiple files...
see the previous topic on libs to have the full history
viewtopic.php?f=14&t=27489
or directly on my github
https://github.com/marpon/Print_to_Pdf
Print2Pdf , cmd line tool to convert files to pdf
Re: Print2Pdf , cmd line tool to convert files to pdf
From my point of view, there is something important missing, if the aim is, to:
replace tool(s) like PDFCreator, which is "generation of unique file-name(s)",
aka: "file-name" + "save-date" + "save-time" + ".PDF", or similar ...
This is under the following cases a "must-have" condition:
when used with a continuously running application, which repeatedly uses the
same file-name(s), to be converted to pdf-format.
replace tool(s) like PDFCreator, which is "generation of unique file-name(s)",
aka: "file-name" + "save-date" + "save-time" + ".PDF", or similar ...
This is under the following cases a "must-have" condition:
when used with a continuously running application, which repeatedly uses the
same file-name(s), to be converted to pdf-format.
Re: Print2Pdf , cmd line tool to convert files to pdf
@MrSwiss
thank's for your interrest...
give you the opportunity to define your destination, it only imposes you a destination name, if you do not give a full path destination file.
the print2pdf.bas file is just a simple example i've put to show how to use the lib function,
and also an exercice for me : implementing the different possible states console mode , i've developped in another topic here.
Another element you are pointing right:
Yes , my idea is to replace PDFCreator , have a look in my github , you will find AllToPdf an application i've done with PowerBasic 10.3, using COM features from previous version of PdfCreator (<2.0), still working very well, but incompatible with the last versions of PDFCreator (they totally modified the COM Objects)
So, if I have to redo the job with the new COM from PdfCreator, why not simply change companion tool, now in win10 it is possible to use Print to Pdf virtual printer , it is better to use it , it will give also the possibility to create 32 or 64 bits applications.
If you develop something arround that subject, do not hesitate to post it, i will be always interrested to have a look.
thank's for your interrest...
no problem, you can choose what destination name you want, you can adapt the code as you want, the lib : print2pdf functionFrom my point of view, there is something important missing, if the aim is, to:
replace tool(s) like PDFCreator, which is "generation of unique file-name(s)",
aka: "file-name" + "save-date" + "save-time" + ".PDF", or similar ...
Code: Select all
Declare Function Print2Pdf Alias "print2pdf"( _
Byval psrc As Zstring Ptr, _ 'source file full path to convert to pdf
Byval pdest As Zstring Ptr, _ 'target file full path , if null the source file will be used as path with .pdf
byval verbose As Long = 0) _ 'by defaut not verbose, if 1 shows errors with MessageBox ; if 2 debugg mode, shows steps to console (adding console if needed)
As Long ' returns 0 on success ; > 0 if fails : 1 to 13
the print2pdf.bas file is just a simple example i've put to show how to use the lib function,
and also an exercice for me : implementing the different possible states console mode , i've developped in another topic here.
Another element you are pointing right:
Yes , my idea is to replace PDFCreator , have a look in my github , you will find AllToPdf an application i've done with PowerBasic 10.3, using COM features from previous version of PdfCreator (<2.0), still working very well, but incompatible with the last versions of PDFCreator (they totally modified the COM Objects)
So, if I have to redo the job with the new COM from PdfCreator, why not simply change companion tool, now in win10 it is possible to use Print to Pdf virtual printer , it is better to use it , it will give also the possibility to create 32 or 64 bits applications.
If you develop something arround that subject, do not hesitate to post it, i will be always interrested to have a look.
Win2Pdf , GUI tool to convert files to pdf
To continue, that subject, i've done some evolution on the lib and now it can support better the different types of source files to convert to pdf.
using that evolution of the lib , i've done a GUI interface to work with multiples files to convert to pdf,
heve a look here
https://github.com/marpon/Print_to_Pdf
https://github.com/marpon/Print_to_Pdf/ ... in2pdf.jpg
using that evolution of the lib , i've done a GUI interface to work with multiples files to convert to pdf,
heve a look here
https://github.com/marpon/Print_to_Pdf
https://github.com/marpon/Print_to_Pdf/ ... in2pdf.jpg