Do you own a Debenu Quick PDF Library version 7, 8, 9, 10, 11, 12, 13 or iSEDQuickPDF license? Upgrade to Debenu Quick PDF Library 14 today!

Debenu Quick PDF Library - PDF SDK Community Forum Homepage
Forum Home Forum Home > For Users of the Library > I need help - I can help
  New Posts New Posts RSS Feed - ImageHorizontalResolution
  FAQ FAQ  Forum Search   Register Register  Login Login

ImageHorizontalResolution

 Post Reply Post Reply
Author
Message
jvonbokel View Drop Down
Beginner
Beginner


Joined: 16 Apr 10
Location: St Louis, MO
Status: Offline
Points: 5
Post Options Post Options   Thanks (0) Thanks(0)   Quote jvonbokel Quote  Post ReplyReply Direct Link To This Post Topic: ImageHorizontalResolution
    Posted: 03 May 10 at 5:40PM
When I try to use ImageHorizontalResolution or ImageVerticalResolution on a bitmap, it only returns 0.  Is there another way to get the resolution of a bitmap?  I tried a built-in Bitmap.FromFile(source) in vb.net, but it gives an out of memory error on large files (600-700MB), which is apparently due to the fact that the bitmap must be stored contiguously in virtual memory.  I also tried reading the binary header, but the resolution fields are unreliable.  Some files are accurate, others are useless.

John
Back to Top
Ingo View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 29 Oct 05
Status: Offline
Points: 3530
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ingo Quote  Post ReplyReply Direct Link To This Post Posted: 03 May 10 at 7:08PM
Hi John!

It should be more than seldom that a 700 mb image was inserted in a pdf 'cause "normally" the creator wants that somebody shall load and open the pdf ;-)

The image-dimensions from built-in images you can only get if you had inserted them before. This doesn't work on already existing, old images. If you want this you can do it by yourself.
To do it you should load the pdf, decrypt it and save it unencrypted as a temp-file. This temp-file you can examine. Open a pdf with an editor like notepad and have a direct look into the pdf then you'll know what to examine.

Cheers, Ingo
  
Back to Top
jvonbokel View Drop Down
Beginner
Beginner


Joined: 16 Apr 10
Location: St Louis, MO
Status: Offline
Points: 5
Post Options Post Options   Thanks (0) Thanks(0)   Quote jvonbokel Quote  Post ReplyReply Direct Link To This Post Posted: 04 May 10 at 11:05PM
Is there a limit to the size of an image in a pdf made with QuickPDFLibrary?  I found a way to determine the dimensions and resolution of my large bitmaps without opening them, but when I try to insert the image, it fails.

In vb.net, I use:

imgID = QP.AddImageFromFile(source, 0)

and I get success for files as large as ~178MB, but imgID is zero for files ~317MB and up (I don't presently have samples between those two sizes).

Thanks,
John
Back to Top
Ingo View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 29 Oct 05
Status: Offline
Points: 3530
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ingo Quote  Post ReplyReply Direct Link To This Post Posted: 05 May 10 at 6:09AM
Hi John!

There's not a known limit but the functionality of inserting an image needs a multiple of the original bytes of the image. So inserting an 100 mb image into a pdf-document doesn't need 100 mb ram may perhaps 500? I'll give a hint to the developers of QuickPDF about this thread... perhaps they can tell a bit about the case you described.

Cheers, Ingo

Back to Top
jvonbokel View Drop Down
Beginner
Beginner


Joined: 16 Apr 10
Location: St Louis, MO
Status: Offline
Points: 5
Post Options Post Options   Thanks (0) Thanks(0)   Quote jvonbokel Quote  Post ReplyReply Direct Link To This Post Posted: 05 May 10 at 4:45PM
I was able to insert them without issue using PDFlib, so it should be possible.  Unfortunately PDFlib doesn't support the OGC GeoPDF spec, though, which is what drew me to QuickPDFLibrary in the first place.  I wonder if I could cut the images into halves (or smaller) and "re-assemble" them inside the PDF by placing them adjacent to each other on the page.
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 11.01
Copyright ©2001-2014 Web Wiz Ltd.

Copyright © 2017 Debenu. Debenu Quick PDF Library is a PDF SDK. All rights reserved. AboutContactBlogSupportOnline Store