ContentStreamCount seems screwy
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=2215
Printed Date: 26 Jun 25 at 12:46PM Software Version: Web Wiz Forums 11.01 - http://www.webwizforums.com
Topic: ContentStreamCount seems screwy
Posted By: cscooper
Subject: ContentStreamCount seems screwy
Date Posted: 07 Apr 12 at 1:51PM
I've got a PDF document with 2 pages, for each page ContentStreamCount returns '2' but in each case Stream #1 is valid but Stream #2 is zero-length. Is this expected behavior? Has QuickPDF created a second content stream in case I want to write to it (or something)?
Thanks, Chris
|
Replies:
Posted By: Ingo
Date Posted: 07 Apr 12 at 5:11PM
Hi Chris!
Perhaps it starts with 0 and not with 1 and you're counting starting with 1? Only an idea ... ;-) Your relevant code regarding this issue would be good to know.
Cheers, Ingo
|
Posted By: cscooper
Date Posted: 07 Apr 12 at 8:44PM
Good idea but I don't think that's it ... GetContentStreamCount() returns 2; SelectContentStream(0) and SelectContentStream(3) both fail; after SelectContentStream(1), GetContentStreamToString() returns a byte array that is 94090 bytes long;
after SelectContentStream(2), GetContentStreamToString() returns a byte array that is 0 bytes long.
|
Posted By: edvoigt
Date Posted: 08 Apr 12 at 10:23AM
Hi,
in QuickPDF I think all list are made as starting by 1. So SelectContentStream(0) has ever to fail.
Where the empty contentstream comes, knows only the producer of the PDF (or not).
But why not using CombineContentStreams before?
So you have all pagecontent at once.
What do you want to do with the stream? To manipulate it, you have to be very very familar with the PDF-specifications. Most it's better to let QuickPDF do this job.
Cheers, Werner
|
|