Print Page | Close Window

Layers?

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=717
Printed Date: 22 Nov 24 at 6:48PM
Software Version: Web Wiz Forums 11.01 - http://www.webwizforums.com


Topic: Layers?
Posted By: Suilven
Subject: Layers?
Date Posted: 03 May 07 at 5:45PM
Hi all,

I'm trying out IsedQuickPDF.dll  - I guess I'm in the right place to ask questions? If not, please show me the door :o) I think I have the latest version and I am using it via the gpViewer activeX control. I am just trying to view PDFs.

Most PDFs appear ok. But I have some that have originated in a design studio. When I show them in this control, I only appear to see  some of the design - like a layer. It's not a colour separation layer but something  else.

Has anyone an idea of what I'm seeing? Or any ideas to try?

I'm sure this has already been covered somewhere in this forum, but I'm afraid I don't even know what search words to use.

TIA

Dave



Replies:
Posted By: Ingo
Date Posted: 04 May 07 at 1:50AM
Hi Dave!

The last released dll-version here is 5.22
The last released dcu-version here is 5.21
Only an idea: Perhaps you should try a "CombineLayers"?...
If you have an example online anywhere the members here can test it, too.

Best regards,
Ingo



Posted By: Suilven
Date Posted: 04 May 07 at 2:58AM
Hi Ingo,

Thanks for jumping in. I don't know much at all about PDFs, so I am probably missing something very simple. After my post, I downloaded the docs and did try CombineLayers() but with no luck. LayerCount() returned 1.

I'm not convinced I'm talking to the DLL correctly. In the gdPicture dll I have...

   SetISedQuickPDFLicenceNumber("...")
   DisplayFromFile( "...")  

The I've just done a SelectPage(1) before calling the layer functions. If I was not using the gdPicture dll, how would I load the PDF file?

The DLL reports version 5.22.0.119   I can't post the file I'm actually using because of copyright, but I will talk to the studio today and ask them to send me a test PDF.

Sorry for all these basic questions, but I am up against a deadline :o)

TIA  Dave


Posted By: Suilven
Date Posted: 04 May 07 at 8:19AM
Ingo,

You can find a test pdf at

www.suilven.com/ftp/test.pdf

If I open that with Acrobat 7, then save as an Acrobat 7 pdf file, it exhibits the same behaviour in iSED, where it shows almost in monochrome.

The studio is using both Artpro and Illustrator.

Any help from passing gurus will be most welcome.

TIA

Dave

 


Posted By: marian_pascalau
Date Posted: 04 May 07 at 10:25AM

Suilven,

the problem you have is caused by the fact that QuickPDF does not implement Colorspaces. The image in PDF file seems to be a kind of monochrome bitmap which change it's color based on ColorSpace implementation.
 
/Marian


Posted By: Suilven
Date Posted: 04 May 07 at 11:00AM
Marian,

Thank you for defining the problem. That will save me a lot of wasted time.

Dave


Posted By: marian_pascalau
Date Posted: 04 May 07 at 11:01AM
You'are wellcome


Posted By: Ingo
Date Posted: 05 May 07 at 4:53PM
Hi Dave!

For me it seems to be more a problem of the gpViewer activeX control as from QuickPDF? I can load the test.pdf with QuickPDF... then save it via RenderDocumentToFile as a jpg... then show it with Delphi via Image1.Picture.LoadFromFile(pdf.jpg)... and all look like it looks in the Foxit or Adobe Reader... complete and with the same colours.
So i think the problem is gpViewer (sorry Loic ;-).

I've seen that you've already posted in the gpViewer-forum... hope you'll get an answer there... it's weekend... wait a bit ;-)

Best regards,
Ingo
    


Posted By: Suilven
Date Posted: 07 May 07 at 4:37AM
Hi Ingo,

Good catch! Works here too and solves another problem which was to build up a library of lo-res JPGs. So I will probably use your work-around permanently. But I will tickle Loic and see if anything can be done.

Thanks again.

Dave


Posted By: marian_pascalau
Date Posted: 07 May 07 at 4:45AM
Hi there,
 
in Dave's test document can you see a black&white area on the Bottom-Right side of the document. In Acrobat it is rendered in color.
 
Was that the only problem you had Dave? Cause everithing else was indeed very well rendered with QuickPDF library.


Posted By: lcarrere
Date Posted: 07 May 07 at 5:08AM
Hi,
 
I've found the problem...
 
The RenderDocumentToFile() and DARenderPageToString() return differents data.
 
 
Try this sample in VB6:
 
 
Private Sub Form_Load()
 
Dim nDocumentID As Long, nPageID As Long
Dim hImageFile As Long
Dim sDocumentString As String
'Direct Access Mode
Dim oIsed As New iSED.QuickPDF
oIsed.UnlockKey ("354538350271B47ED3104F7CEC6FED8E")
nDocumentID = oIsed.DAOpenFile("c:\test.pdf", "")
nPageID = oIsed.DAFindPage(nDocumentID, 1)
sDocumentString = oIsed.DARenderPageToString(nDocumentID, nPageID, 1, 96)
hImageFile = FreeFile()
Open "c:\outputDA.jpg" For Binary As hImageFile
Put #hImageFile, , sDocumentString
Close #hImageFile
oIsed.DACloseFile (nDocumentID)
MsgBox "Done with Direct Access Mode!"

'STD Access Mode
oIsed.LoadFromFile ("c:\test.pdf")
Call oIsed.RenderDocumentToFile(96, 1, 1, 1, "c:\outputSTD.jpg")
oIsed.RemoveDocument (oIsed.DocumentID(1))
MsgBox "Done with STD Access Mode!"
 
End Sub
 
 
 
The DARenderPageToString() returns a grayscaled image Dead
 
Marian do you know how we can resolve this point ?
 
Best regards,
 
Loïc Carrère


Posted By: Suilven
Date Posted: 07 May 07 at 6:38AM
Marian,

>n Dave's test document can you see a black&white area on the >Bottom-Right side of the document. In Acrobat it is rendered in color.
 
>Was that the only problem you had Dave? Cause everithing else was >indeed very well rendered with QuickPDF library.

No, the whole image was almost all monochrome. Some colour did survive. On the PDFs that I could not publish, spot colour swatches around the main design did appear ok, but the main design had objects missing or wrong colour info.

Using Ingo's workaround, the colour swatches in the bottom right of the image are still monochrome and some other colour swatches are missing. Is this still the "ColourSpace" problem?

HTH

Dave

PS Great support group! Shows what can be done when a group take ownership of a product.




Posted By: Suilven
Date Posted: 07 May 07 at 6:56AM
Marian,

I spoke too soon. If I try Ingo's workaround with the new PDFs that I can't publish, they appear better than before, but large blocks of colour in the design are not shown at all :o(

If it is any consolation, ConvertIMage from SoftInterface cannot render these images correctly either. Only Foxit seems to display the same image as Acrobat. Looks like I have a studio who are at the "bleeding" edge of technology.

Dave





Posted By: marian_pascalau
Date Posted: 07 May 07 at 8:35AM
Dave, please provide some image samples.
Create please some screenshots and send them please to support(at)quickpdf.org (or publish them in this forum).


Posted By: marian_pascalau
Date Posted: 07 May 07 at 10:19AM
Loïc, the result of your research is right. The set of DA* functions was never (and never will) used by me. The implementation is very strange and does not follow a clear programming logic.
 
In this case the problem is caused by the fact that jumping to Indirect PDF objects is not implemented inside DA* functions. The PDF contents are supposing tp make use of an Indirect ColorSpace object which will never work because of missing implementation.


Posted By: Suilven
Date Posted: 07 May 07 at 11:45AM
Marian,

I understand your need for visual evidence.

I cannot send the PDFs which cause me real problems because they are for a product that has not been launched yet. It is a Bank Holiday in the UK, but I will ask the studio tomorrow first thing for some more examples that I can share.

Your efforts are much appreciated.

Dave


Posted By: Suilven
Date Posted: 08 May 07 at 7:50AM
Marian,

I spoke to my contact very briefly this morning. They are out of their office for the rest of the week.  But they did say that the test.pdf was created with the same app as my newer ones.

The implication is that if you can solve the problems on that test.pdf, the other should show ok.

So I guess I have to ask if the problem is rooted in ColorSpaces? And, if it is, will there be a solution in QuickPDF in the very near future?

TIA

Dave


Posted By: Suilven
Date Posted: 08 May 07 at 8:29AM
Marian, Ingo,

I said that Foxit renders the test.pdf correctly. Well 1.3 does, but 2.0 makes a complete mess of it. I don't know if this information helps you.

Are PDF standards as fluid/lax/ill-defined as I am starting to think they are?

Regards,

Dave


Posted By: marian_pascalau
Date Posted: 08 May 07 at 8:55AM

Dave, this is just a "current state" of QuickPDF answer.

At the moment there are 3x problems which may affect you:

 

1) DA function are not properly implemented. It seems that these were the original PDF manipulation functions and lack of several important improvements. This can be fixed in case you are willing to sponsor this correction and the result will be exposed in source code but only to you.

 

This case you can use QuickPDF with gpViewer activeX control and you will receive the same result as: STD Access Mode functions.

 

A solution is relative simple to implement.

 

2) The QuickPDF does not implement color space functions. As result some of the colors are not matched within an embedded index table.

 

As result some colored areas are wrong and produce very unpleasant results.

 

Solution complexity: moderate.

 

3) The QuickPDF does not implement ICC color profiles. This is not a very critical problem but may cause that colors are different rendered between QuickPDF and Acrobat programs (Foxit renders well).

 

As result some of the colors are slightly different with relative great difference when converting CMYK to RGB colors in Magenta/Blue range.

 

Solution complexity: development has moderate complexity but require intensive study of color profile specifications.

 

Info: PDF specs are relative well defined. Most of the problems are caused by a weak implementation or the size of PDF specification Tongue!!!



Posted By: lcarrere
Date Posted: 09 May 07 at 10:49AM
Hi all ! Smile

Marian thanks for your answers.

Dave, Now the GdPicture components stop to use the DA methods. You can update your component here for best results: http://www.gdpicture.com/ressources/betas/

Best regards,

Loïc Carrère



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