Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » Draw, Display, Images, Bitmaps, Icons » Decrease PDF size. Compress images?
Decrease PDF size. Compress images? [message #49437] Fri, 09 February 2018 15:38 Go to previous message
shockjockey is currently offline  shockjockey
Messages: 3
Registered: July 2016
Junior Member
Hello all!

I am working on a converter that will extract and stitch a number of JPG files together into a single PDF file and lay text on top of it. This works fine but my problem is that the PDF file is very big, about 5 to 10 times the size of the JPG files combined. I wondered if I should take a different approach or could add some code to compress the images in the resulting PDF?\

This is a simplified code example of what I am doing so far:

Image img = StreamRaster::LoadStringAny("C:\\path\\to\\jpg.jpg");

Report r;
				
r.SetPageSize(img.GetWidth(), img.GetHeight());
				
r.DrawImage(0, 0, img);

String pdf_contents = Pdf(r);

SaveFile("C:\\path\\to\\pdf.pdf", pdf_contents);


Thanks in advance for any pointers in the right direction that you might be able to give me!

[Updated on: Fri, 09 February 2018 15:49]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Loses qualifiers const in Size Image::GetDPI(void)
Next Topic: What is the best way to handle scaling icons?
Goto Forum:
  


Current Time: Mon Apr 29 13:52:38 CEST 2024

Total time taken to generate the page: 0.03073 seconds