Results 1 to 17 of 17

Thread: PDF to Image Converter

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    May 2024
    Location
    India
    Posts
    4
    Qt products
    Qt/Embedded
    Platforms
    Windows

    Default Re: PDF to Image Converter

    Hey hi, you should check the code because scaledsimage isn't being set correctly.

    Qt Code:
    1. pdfFile = LoadPDF(fixurl.absoluteFilePath(), page, large);
    2. if (pdfFile.isNull()) {
    3. QMessageBox::warning(0, "Error", "Failed to load PDF.");
    4. } else {
    5. QImage tImage = pdfFile.toImage();
    6. if (!tImage.isNull()) {
    7. tImage.save("output.png", "PNG", 100);
    8. } else {
    9. QMessageBox::warning(0, "Error", "Failed to convert QPixmap to QImage.");
    10. }
    11. }
    To copy to clipboard, switch view to plain text mode 

  2. #2
    Join Date
    May 2024
    Location
    India
    Posts
    4
    Qt products
    Qt/Embedded
    Platforms
    Windows

    Default Re: PDF to Image Converter

    Quote Originally Posted by nehakakar View Post
    Hey hi, you should check the code because scaledsimage isn't being set correctly.

    Qt Code:
    1. pdfFile = LoadPDF(fixurl.absoluteFilePath(), page, large);
    2. if (pdfFile.isNull()) {
    3. QMessageBox::warning(0, "Error", "Failed to load PDF.");
    4. } else {
    5. QImage tImage = pdfFile.toImage();
    6. if (!tImage.isNull()) {
    7. tImage.save("output.png", "PNG", 100);
    8. } else {
    9. QMessageBox::warning(0, "Error", "Failed to convert QPixmap to QImage.");
    10. }
    11. }
    To copy to clipboard, switch view to plain text mode 
    On the other hand you can also use any online image converter such as Image Converter and for compressor Jpeg Compressor, these are really good tool.

Similar Threads

  1. Unit Converter Widget
    By baray98 in forum Qt Programming
    Replies: 13
    Last Post: 17th December 2016, 16:06
  2. Replies: 6
    Last Post: 21st September 2009, 10:55
  3. hide image,once moused moved from image
    By yuvaraj.yadav in forum Qt Programming
    Replies: 1
    Last Post: 22nd April 2009, 08:16
  4. Replies: 3
    Last Post: 14th March 2007, 08:09
  5. Image Converter
    By deekayt in forum General Discussion
    Replies: 1
    Last Post: 30th October 2006, 21:13

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.