pdf to jpg convertor ?
- Richard Chidiak
- Posts: 946
- Joined: Thu Oct 06, 2005 7:05 pm
- Location: France
- Contact:
pdf to jpg convertor ?
Hello
I need to print a pdf "with my application" , i can print the pdf as a standalone with silent printing
But i need to be able to preview the pdf at the end of a particular report, i was thinking of converting the pdf to an image format like jpg and add a print page containing the jpg to that report
Does anyone know of a command line utility (silent) that can perform this task (convert the pdf to image format )?
nConvert is a perfect example but i am concerned about licensing as the tool will be shipped with my application,
Thanks for the help,
Richard
I need to print a pdf "with my application" , i can print the pdf as a standalone with silent printing
But i need to be able to preview the pdf at the end of a particular report, i was thinking of converting the pdf to an image format like jpg and add a print page containing the jpg to that report
Does anyone know of a command line utility (silent) that can perform this task (convert the pdf to image format )?
nConvert is a perfect example but i am concerned about licensing as the tool will be shipped with my application,
Thanks for the help,
Richard
- James Bott
- Posts: 4840
- Joined: Fri Nov 18, 2005 4:52 pm
- Location: San Diego, California, USA
- Contact:
Re: pdf to jpg convertor ?
Richard,
I don't understand what you are trying to do.
The standard report preview will look like the PDF if you have your print device set to a PDF printer driver. You do know about PDF printer drivers?
I don't understand why you want an image of the report in another report, or is it the same report? Is the report that you want an image of, only one page long?
Regards,
James
But i need to be able to preview the pdf at the end of a particular report, i was thinking of converting the pdf to an image format like jpg and add a print page containing the jpg to that report
I don't understand what you are trying to do.
The standard report preview will look like the PDF if you have your print device set to a PDF printer driver. You do know about PDF printer drivers?
I don't understand why you want an image of the report in another report, or is it the same report? Is the report that you want an image of, only one page long?
Regards,
James
- Richard Chidiak
- Posts: 946
- Joined: Thu Oct 06, 2005 7:05 pm
- Location: France
- Contact:
Re: pdf to jpg convertor ?
James
Maybe i did not express correctly my need
Let us say i have an invoice that is printed with my application, no matter how many pages it takes
Along with the invoice, our clients need to deliver "their customers" with a particular fiscal document , this document is a pdf document
So when i print the invoice , i need to print and preview the pdf document at the same time
I sure know about pdf printer drivers but that is not the need, i also use image2pdf that can convert the report to pdf but i need to print the whole together (invoice + pdf)
Richard
Maybe i did not express correctly my need
Let us say i have an invoice that is printed with my application, no matter how many pages it takes
Along with the invoice, our clients need to deliver "their customers" with a particular fiscal document , this document is a pdf document
So when i print the invoice , i need to print and preview the pdf document at the same time
I sure know about pdf printer drivers but that is not the need, i also use image2pdf that can convert the report to pdf but i need to print the whole together (invoice + pdf)
Richard
- Otto
- Posts: 6416
- Joined: Fri Oct 07, 2005 7:07 pm
- Has thanked: 35 times
- Been thanked: 2 times
- Contact:
Re: pdf to jpg convertor ?
Richard,
I use FASTREPORT for this task:
Best regards,
Otto
I use FASTREPORT for this task:
Code: Select all | Expand
oFr:SetProperty("PDFExport", "FileName", ".\Report\" + ALLTRIM(str(seconds())) + ".pdf")
oFr:SetProperty("PDFExport", "OpenAfterExport", .f.)
oFr:SetProperty("PDFExport", "ShowDialog",.f.)
oFr:PrepareReport()
//i need to print and preview the pdf document at the same time
oFr:DoExport("PDFExport")
oFr:ShowReport()
Best regards,
Otto
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
- Richard Chidiak
- Posts: 946
- Joined: Thu Oct 06, 2005 7:05 pm
- Location: France
- Contact:
Re: pdf to jpg convertor ?
Otto
Thanks but this is not an option to me
My report is quite complex , i use the fwh print engine for it , not easy to port to fastreport
Thanks anyway,
Richard
Thanks but this is not an option to me
My report is quite complex , i use the fwh print engine for it , not easy to port to fastreport
Thanks anyway,
Richard
- Otto
- Posts: 6416
- Joined: Fri Oct 07, 2005 7:07 pm
- Has thanked: 35 times
- Been thanked: 2 times
- Contact:
Re: pdf to jpg convertor ?
Hello Richard,
Why? I do prepare all my reports in temp-dbf files.
When I convert an existing report I first fetch all the
print commands in a temp-dbf.
This way the reports in Fastreport designer are very easy to create.
I do nearly no calculations, etc. inside the reports.
For example
If I print an invoice I have the totals inside the temp-dbf files.
Best regards,
Otto
Why? I do prepare all my reports in temp-dbf files.
When I convert an existing report I first fetch all the
print commands in a temp-dbf.
This way the reports in Fastreport designer are very easy to create.
I do nearly no calculations, etc. inside the reports.
For example
If I print an invoice I have the totals inside the temp-dbf files.
Best regards,
Otto
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
- James Bott
- Posts: 4840
- Joined: Fri Nov 18, 2005 4:52 pm
- Location: San Diego, California, USA
- Contact:
Re: pdf to jpg convertor ?
Richard,
OK, but I still do not understand why you need an image. Also, are you printing the PDF to the printer also? Or, just to a file?
You could print the PDF to a file, then print the PDF to the printer.
You could print to the printer, then print the PDF to a file.
Do you mean you need a preview before printing anything or?
Regards,
James
OK, but I still do not understand why you need an image. Also, are you printing the PDF to the printer also? Or, just to a file?
You could print the PDF to a file, then print the PDF to the printer.
You could print to the printer, then print the PDF to a file.
Do you mean you need a preview before printing anything or?
Regards,
James
- Richard Chidiak
- Posts: 946
- Joined: Thu Oct 06, 2005 7:05 pm
- Location: France
- Contact:
Re: pdf to jpg convertor ?
James
Do you mean you need a preview before printing anything or
Yes i need to preview the whole together
Richard
Do you mean you need a preview before printing anything or
Yes i need to preview the whole together
Richard
- James Bott
- Posts: 4840
- Joined: Fri Nov 18, 2005 4:52 pm
- Location: San Diego, California, USA
- Contact:
Re: pdf to jpg convertor ?
Richard,
OK, but I am guessing that I still don't understand what the "whole" is. Are you talking about a printout and a PDF that are different things or the same thing?
If they are the same thing, then is seems you just need to do a preview, then print to a print device, then print to a PDF file.
If they are not the same thing, then please explain exactly what they are.
Regards,
James
Yes i need to preview the whole together
OK, but I am guessing that I still don't understand what the "whole" is. Are you talking about a printout and a PDF that are different things or the same thing?
If they are the same thing, then is seems you just need to do a preview, then print to a print device, then print to a PDF file.
If they are not the same thing, then please explain exactly what they are.
Regards,
James
- Richard Chidiak
- Posts: 946
- Joined: Thu Oct 06, 2005 7:05 pm
- Location: France
- Contact:
Re: pdf to jpg convertor ?
James
The original print out is an invoice generated from my app (fwh tprinter class) , so far so good
I need the ability to add to this invoice (print out) a pdf document before printing , so the final print out will be : original print out + pdf document , this will be the new print out that will be previewed and printed
This is why i need to convert pdf to jpeg , i can create a print out with a jpeg for the add on and then preview
Richard
The original print out is an invoice generated from my app (fwh tprinter class) , so far so good
I need the ability to add to this invoice (print out) a pdf document before printing , so the final print out will be : original print out + pdf document , this will be the new print out that will be previewed and printed
This is why i need to convert pdf to jpeg , i can create a print out with a jpeg for the add on and then preview
Richard
- James Bott
- Posts: 4840
- Joined: Fri Nov 18, 2005 4:52 pm
- Location: San Diego, California, USA
- Contact:
Re: pdf to jpg convertor ?
Richard,
OK, so the PDF document is NOT the invoice? What is it? Is it already in existence when the report is printed or is it created when the report is printed.
Why does the PDF need to be a JPG? Are you using the report class or the printer class to generate your report? I'm not sure how you can add an existing PDF to a report that is being generated. Maybe you could add an image as a footer or maybe add a page feed then print the image as the last page.
Regards,
James
OK, so the PDF document is NOT the invoice? What is it? Is it already in existence when the report is printed or is it created when the report is printed.
Why does the PDF need to be a JPG? Are you using the report class or the printer class to generate your report? I'm not sure how you can add an existing PDF to a report that is being generated. Maybe you could add an image as a footer or maybe add a page feed then print the image as the last page.
Regards,
James
- Richard Chidiak
- Posts: 946
- Joined: Thu Oct 06, 2005 7:05 pm
- Location: France
- Contact:
Re: pdf to jpg convertor ?
James
The pdf is not the invoice, it is a constant document that may or may not be present,
add a page feed then print the image as the last page
This is exactly what i want to do, and this is why i need to convert the pdf to an image format
I probably have found the solution with "xnview" that allows this conversion, i will place a purchase order today
Regards,
Richard
The pdf is not the invoice, it is a constant document that may or may not be present,
add a page feed then print the image as the last page
This is exactly what i want to do, and this is why i need to convert the pdf to an image format
I probably have found the solution with "xnview" that allows this conversion, i will place a purchase order today
Regards,
Richard
Re: pdf to jpg convertor ?
Richard,
You can have a look at GHOSTSCRIPT ( Freeware ) Version 9.0
There are many Informations in the Internet.
You can convert PDF to any Image-formats from Command-line ( You are looking for )
Inside Your Application You can call it with WINEXEC
Useful Informations :
http://pages.cs.wisc.edu/~ghost/doc/cvs/Use.htm
Sample Commands :
Convert Test.pdf to PNG for better Quality
--------------------------------------------------
WINEXEC ( "gs" -dSAFER -dBATCH -dNOPAUSE -r150 -sDEVICE=png16m -dTextAlphaBits=4 -sOutputFile=page -%02d.png Test.pdf )
Convert Test.pdf to JPG
----------------------------
WINEXEC ( "gs" -dNOPAUSE -sDEVICE=jpeg -r144 -sOutputFile=p%03d.jpg Test.pdf )
Best Regards
Uwe
You can have a look at GHOSTSCRIPT ( Freeware ) Version 9.0
There are many Informations in the Internet.
You can convert PDF to any Image-formats from Command-line ( You are looking for )
Inside Your Application You can call it with WINEXEC
Useful Informations :
http://pages.cs.wisc.edu/~ghost/doc/cvs/Use.htm
Sample Commands :
Convert Test.pdf to PNG for better Quality
--------------------------------------------------
WINEXEC ( "gs" -dSAFER -dBATCH -dNOPAUSE -r150 -sDEVICE=png16m -dTextAlphaBits=4 -sOutputFile=page -%02d.png Test.pdf )
Convert Test.pdf to JPG
----------------------------
WINEXEC ( "gs" -dNOPAUSE -sDEVICE=jpeg -r144 -sOutputFile=p%03d.jpg Test.pdf )
Best Regards
Uwe

Since 1995 ( the first release of FW 1.9 )
i work with FW.
If you have any questions about special functions, maybe i can help.
i work with FW.
If you have any questions about special functions, maybe i can help.
- Richard Chidiak
- Posts: 946
- Joined: Thu Oct 06, 2005 7:05 pm
- Location: France
- Contact:
Re: pdf to jpg convertor ?
Uwe
Thanks, i have already downloaded it and using it now , almost all pdf to image converter need ghostscript for this task.
To be more precise, i have downloaded a lite edition of ghostscrip that has an automatic silent installation process , important for my application no prompts or whatever
And in adjunction i have purchased a license to commercial use of nconvert.exe that allows me all grafic combinations.
So i convert direct from pdf to emf and add to my report the needed pages (the pdf can be in several pages, no problem), working like a charm !
Great product,
Richard
Thanks, i have already downloaded it and using it now , almost all pdf to image converter need ghostscript for this task.
To be more precise, i have downloaded a lite edition of ghostscrip that has an automatic silent installation process , important for my application no prompts or whatever
And in adjunction i have purchased a license to commercial use of nconvert.exe that allows me all grafic combinations.
So i convert direct from pdf to emf and add to my report the needed pages (the pdf can be in several pages, no problem), working like a charm !
Great product,
Richard