Print Page | Close Window

Cannot load file

Printed From: Debenu Quick PDF Library - PDF SDK Community Forum
Category: For Users of the Library
Forum Name: I need help - I can help
Forum Description: Problems and solutions while programming with the Debenu Quick PDF Library and Debenu PDF Viewer SDK
URL: http://www.quickpdf.org/forum/forum_posts.asp?TID=1227
Printed Date: 12 Dec 25 at 10:20AM
Software Version: Web Wiz Forums 11.01 - http://www.webwizforums.com


Topic: Cannot load file
Posted By: Yadutt
Subject: Cannot load file
Date Posted: 29 Sep 09 at 6:03PM
Hello,
I'm using the function LoadFromFile, but getting a value of Zero.

mlCurrDocument = mobjPDFLib.GetDocumentID(1)
   mlCurrPage = 1
  
   ' Set options
   mobjPDFLib.SetOrigin 1
   mobjPDFLib.CompressFonts 1
   mobjPDFLib.CompressImages 1
   mobjPDFLib.NewPages 2
  
   mobjPDFLib.SelectDocument mlCurrDocument
   
   lRes = mobjPDFLib.LoadFromFile(msSourceFile)

I would like to attach the pdf file which is one page. Can someone please let me know how as there is no functionality on this page to attache file.

Thank you



Replies:
Posted By: Ingo
Date Posted: 30 Sep 09 at 6:21AM
Hi!

There's no function to "attach" one pdf-file with another one.
I think you need merge-functionality to get two pdf-files together.
Have a look here:
http://www.quickpdflibrary.com/help/quickpdf/DocumentManipulation.php
You can copy single or a range of pages to another document.
Please have a look here:
http://www.quickpdflibrary.com/help/quickpdf/PageManipulation.php
If you really want to attach a file to a pdf-document you should have a look at the embed-functions.
If your pdf-file always returns with a zero you should load it with Foxit or Adobe Reader... What do they "say"? Is the pdf okay or are there error messages, too?

Cheers, Ingo



Posted By: Rowan
Date Posted: 30 Sep 09 at 7:58AM
I think Ingo is right, it sounds like you mean merge, but for anyone else looking to actually attach a document to a PDF, this is now possible with Quick PDF Library. In version 7.12 there was a function added which allows you to embed an attachment in the PDF so that it shows up in the Attachments panel in Adobe Reader and Acrobat.

EmbedFile
http://www.quickpdflibrary.com/help/quickpdf/EmbedFile.php - http://www.quickpdflibrary.com/help/quickpdf/EmbedFile.php


Posted By: Yadutt
Date Posted: 30 Sep 09 at 10:07AM

Sorry, I think the question is misunderstood.

I have this pdf file that contains one page. I want to load it using the PDF Library function LoadFromFile.
 
I can view the pdf file with Acrobat Reader. I want to upload this single pdf file on this post. Is there a way I can upload this so you can have a look.
 
Thanks.


Posted By: Ingo
Date Posted: 30 Sep 09 at 11:47AM
Hi!

You can send it to me directly:
ingo -dot- schmoekel -at- ewetel -dot- net
or you can go to the official QP-support-pages:
http://www.quickpdflibrary.com/support/support-query.php

BTW: Is there a create in your code before doing the load?
          Is there an unlock on the lib before doing the load?

Cheers, Ingo



Posted By: Ingo
Date Posted: 30 Sep 09 at 1:33PM
Hi!

I've checked the file. Here are the results:
Only one small page but 5 mb.
Only one page but 3199 objects, 325 images, 212 CMYK-entries.
The load lasts very long but for me with success.
Preview works - Textextraction, too.

I think your document code stuff being before load should be after loadfile.
Check all returning values. I guess that already mlCurrDocument will be wrong.

To make it more clear:
First you should do the create, then the unlock, then the load, then select document (save the id), then the second load, then the second select document (save the id) and then the merge. This will work.

Cheers, Ingo





Print Page | Close Window

Forum Software by Web Wiz Forums® version 11.01 - http://www.webwizforums.com
Copyright ©2001-2014 Web Wiz Ltd. - http://www.webwiz.co.uk