Howto print pdf document (PurePDF)
Howto print pdf document (PurePDF)
Hi, does anyone have idea how to print (created with PurePDF) pdf file from purebasic code? Acrobat reader is not solution?
Re: Howto print pdf document (PurePDF)
There are a few dll solutions. The one I use is QuickPdfLibrary, not cheap though. I twas free once but bought out by Debenu and stuck a stupid price on it. I too only use it for printing so not great value.
-
- Always Here
- Posts: 6426
- Joined: Fri Oct 23, 2009 2:33 am
- Location: Wales, UK
- Contact:
Re: Howto print pdf document (PurePDF)
I think you have to use an app (like Adobe Reader) that can open a pdf file. You can use RunProgram() and just give the path + name of the pdf file you just created - that will open the file with whatever app the PC has avaiable to open pdfs. It might be the case that Reader has a command line argument that would just print the file without displaying first, but I have not seen that.
An alternative would be to build your own print file in a similar way to how you built the pdf, using the Print_Lib. The print lib can handle some graphics commands if required but it is not as comprhensive as the pdf lib. Another alternative - you could draw the entire document on an image using the 2D drawing commands - with that route, the print and the pdf file can be of the image, so they would be identical and that is desirable.
An alternative would be to build your own print file in a similar way to how you built the pdf, using the Print_Lib. The print lib can handle some graphics commands if required but it is not as comprhensive as the pdf lib. Another alternative - you could draw the entire document on an image using the 2D drawing commands - with that route, the print and the pdf file can be of the image, so they would be identical and that is desirable.
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
If it sounds simple, you have not grasped the complexity.
Re: Howto print pdf document (PurePDF)
Acro reader not a solution already stated. On a distributed product U simply can't guarantee it to be available. I had the same problem to solve a few years back thats why I went for the dll solution (albeit not cheap).
-
- Always Here
- Posts: 6426
- Joined: Fri Oct 23, 2009 2:33 am
- Location: Wales, UK
- Contact:
Re: Howto print pdf document (PurePDF)
.....As a compromise, the app could have a link to the Adobe Reader download. However, if it is suitable for the data, I think the idea of creating an image that will both print and be saved as a pdf would be the best solution.
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
If it sounds simple, you have not grasped the complexity.
Re: Howto print pdf document (PurePDF)
PDFPrint Command Line v2.0, from www.verypdf.com, can do the job, but it's not free
PureBasic: Surprisingly simple, diabolically powerful
Re: Howto print pdf document (PurePDF)
US$199 to print only. Not cheap. I thought QuickPDFLibrary was expensive but it can do much more than just print.
-
- Always Here
- Posts: 6426
- Joined: Fri Oct 23, 2009 2:33 am
- Location: Wales, UK
- Contact:
Re: Howto print pdf document (PurePDF)
Take a look at: http://pdfbox.apache.org/
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
If it sounds simple, you have not grasped the complexity.
Re: Howto print pdf document (PurePDF)
That looks interesting.
If I'm reading it right though it's a java commandline (.jar) to print, so java has to be installed on the host machine. In a way - out of the frying-pan into the fire.
If I'm reading it right though it's a java commandline (.jar) to print, so java has to be installed on the host machine. In a way - out of the frying-pan into the fire.
Re: Howto print pdf document (PurePDF)
Foxit Reader, its free and small
Code: Select all
/p
Re: Howto print pdf document (PurePDF)
Foxit Reader is an application. Doesn't seem to have commandline or library capabilities (or does it ?). If so it's simply a Acro Reader replacement, which is free anyway.
-
- Enthusiast
- Posts: 781
- Joined: Fri Apr 25, 2003 6:51 pm
- Location: NC, USA
- Contact:
Re: Howto print pdf document (PurePDF)
Foxit Reader
To print to the default printer...
To print to a desired printer...
Acrobat Reader
Caution: Adobe says these are unsupported commands, but they have existed for many versions. About Vs 8 Acrobat Reader stopped closing when called this way.
To print to the default printer... After printing Acrobat Reader will remain active and you will need to find a way to close it.
To print to a desired printer... After printing Acrobat Reader will remain active and you will need to find a way to close it.
To print to the default printer...
Code: Select all
RunProgram("C:\Program Files\Foxit Software\Foxit Reader\Foxit Reader.exe", "/p SomeFile.pdf","C:\FolderName\")
Code: Select all
RunProgram("C:\Program Files\Foxit Software\Foxit Reader\Foxit Reader.exe", "/t SomeFile.pdf PrinterName","C:\FolderName\")
Caution: Adobe says these are unsupported commands, but they have existed for many versions. About Vs 8 Acrobat Reader stopped closing when called this way.
To print to the default printer... After printing Acrobat Reader will remain active and you will need to find a way to close it.
Code: Select all
RunProgram("C:\Program Files\Adobe\Reader 10.0\Reader\AcroRd32.exe", "/p SomeFile.pdf","C:\FolderName\")
Code: Select all
RunProgram("C:\Program Files\Adobe\Reader 10.0\Reader\AcroRd32.exe", "/t SomeFile.pdf " + Chr(34)+ PrinterName + Chr(34),"C:\FolderName\")
Re: Howto print pdf document (PurePDF)
Thanx, but the problem is both/either have to be installed on the host machine, hence the need for a standalone solution.
Howto print pdf document (PurePDF)
Hello , first excuse me for my bad english .
In your code you "draw" the pdf , why not draw an image, print image and create the pdf with this image ?
Perhaps ?
In your code you "draw" the pdf , why not draw an image, print image and create the pdf with this image ?
Perhaps ?