Print Page | Close Window

Multipage PDFs causing filename issue

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=494
Printed Date: 19 May 24 at 8:34AM
Software Version: Web Wiz Forums 11.01 - http://www.webwizforums.com


Topic: Multipage PDFs causing filename issue
Posted By: chilluk
Subject: Multipage PDFs causing filename issue
Date Posted: 30 Aug 06 at 6:10AM

I'm trying to thumbnail a directory of PDFs - using VBA and iSed - utilising the RenerDocumentToFile command.

It seems on multipage PDFs that the resultant file name always has a 1 appended (I'm specifying first page only) and I don't want that as the filenames need to match exactly the originals.

Please help!!




Replies:
Posted By: Ingo
Date Posted: 30 Aug 06 at 8:10AM
Hi chilluk!

How should this work?
Each page of the document will be converted to an image - so the names can't be the same. If so - the result will be only the last page as an image - the other pages will be lost.

If this is not okay for you you can work with copy, delete, kill, rename, ... after the function call.

Best regards,
Ingo


Posted By: chilluk
Date Posted: 30 Aug 06 at 8:13AM

I am specifying in the code that I only want to convert a single page - so ideally I'd want it to just have the name I specify without the added on 1. Can I detect multiple pages first and then I would know which ones need renaming?

Thanks for your reply.



Posted By: chilluk
Date Posted: 30 Aug 06 at 8:20AM
Ah - no worries - maybe it names all with the suffix of 1 - I'll just rename them all!!


Posted By: hbarclay
Date Posted: 30 Aug 06 at 11:19AM
The suffix should be whatever the page number is, and if you don't want it to be the suffix, you can insert a '%p' into the file name and the page number will replace the %p.

If you were using Delphi you could just call RenderPageToStream and then save the stream to a file, using VBA you might try RenderPageToString and then save the resulting string to a file. That way you would have complete control over the file name. I haven't tried either of these, but the functions look like they should work.



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