My client needs to send their suppliers purchase orders (via email as PDF attachments) with images of each item ordered included. The images are held as jpegs as downloaded from their digital camera and are usually 1600x1200 and about 340kb in size.
If they use these images a one line purchase order creates a pdf some 4mb in size - not very helpful as they can often have 10 lines per order. So my first question is - Can these pdfs be slimmed down. I know that Adobe V7 has a file size reduction option which works very well but clearly I don't want my client to have to buy Acrobat and then do extra work on each pdf that is created.
I have looked at all the settings available in the various "printers and devices" that A5 installs and there is nothing showing that might help.
I then had the idea of letting the client easily shrink the image from within Alpha using Image_transform, so I placed a button with the following bit of code on one of the forms as a trial.
dim tbl as p
dim b1 as b
dim b2 as b
dim b3 as c
dim b4 as c
tbl = table.current()
b3 = trim(tbl.image1)
b4 = "C:\gemcosting\reduced\redimage01.jpg"
b1 = file.to_blob(b3)
b2 = a5_image_transform(b1)
file.from_blob(b4, b2)
Using the above and setting the file reduction to 25% of original size resulted in a new file being saved which shows its dimensions being reduced to 400x300 but the file is still 226kb and worse than that the resulting jpeg was unreadable by both Alpha and Paintshop Pro so clearly something is going wrong in the transformation process.
This sort of requirement is only going toi increase as e-commerce expands so any input would be very useful for all the Alpha community.
Many thanks
Bob Whitaker
UK
If they use these images a one line purchase order creates a pdf some 4mb in size - not very helpful as they can often have 10 lines per order. So my first question is - Can these pdfs be slimmed down. I know that Adobe V7 has a file size reduction option which works very well but clearly I don't want my client to have to buy Acrobat and then do extra work on each pdf that is created.
I have looked at all the settings available in the various "printers and devices" that A5 installs and there is nothing showing that might help.
I then had the idea of letting the client easily shrink the image from within Alpha using Image_transform, so I placed a button with the following bit of code on one of the forms as a trial.
dim tbl as p
dim b1 as b
dim b2 as b
dim b3 as c
dim b4 as c
tbl = table.current()
b3 = trim(tbl.image1)
b4 = "C:\gemcosting\reduced\redimage01.jpg"
b1 = file.to_blob(b3)
b2 = a5_image_transform(b1)
file.from_blob(b4, b2)
Using the above and setting the file reduction to 25% of original size resulted in a new file being saved which shows its dimensions being reduced to 400x300 but the file is still 226kb and worse than that the resulting jpeg was unreadable by both Alpha and Paintshop Pro so clearly something is going wrong in the transformation process.
This sort of requirement is only going toi increase as e-commerce expands so any input would be very useful for all the Alpha community.
Many thanks
Bob Whitaker
UK
Comment