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!
![]() |
ImageHorizontalResolution |
Post Reply
|
| Author | |
jvonbokel
Beginner
Joined: 16 Apr 10 Location: St Louis, MO Status: Offline Points: 5 |
Post Options
Thanks(0)
Quote Reply
Topic: ImageHorizontalResolutionPosted: 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
|
|
![]() |
|
Ingo
Moderator Group
Joined: 29 Oct 05 Status: Offline Points: 3530 |
Post Options
Thanks(0)
Quote Reply
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 |
|
![]() |
|
jvonbokel
Beginner
Joined: 16 Apr 10 Location: St Louis, MO Status: Offline Points: 5 |
Post Options
Thanks(0)
Quote Reply
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
|
|
![]() |
|
Ingo
Moderator Group
Joined: 29 Oct 05 Status: Offline Points: 3530 |
Post Options
Thanks(0)
Quote Reply
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 |
|
![]() |
|
jvonbokel
Beginner
Joined: 16 Apr 10 Location: St Louis, MO Status: Offline Points: 5 |
Post Options
Thanks(0)
Quote Reply
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.
|
|
![]() |
|
Post Reply
|
|
|
Tweet
|
| Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |
Copyright © 2017 Debenu. Debenu Quick PDF Library is a PDF SDK. All rights reserved. About — Contact — Blog — Support — Online Store