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!

Debenu Quick PDF Library - PDF SDK Community Forum Homepage
Forum Home Forum Home > For Users of the Library > I need help - I can help
  New Posts New Posts RSS Feed - PDF Object types
  FAQ FAQ  Forum Search   Register Register  Login Login

PDF Object types

 Post Reply Post Reply
Author
Message
Chopinke View Drop Down
Team Player
Team Player


Joined: 29 Apr 14
Status: Offline
Points: 24
Post Options Post Options   Thanks (0) Thanks(0)   Quote Chopinke Quote  Post ReplyReply Direct Link To This Post Topic: PDF Object types
    Posted: 27 Nov 14 at 2:22PM
I can see there is a function in the SDK to get all objects contained in the PDF. How can I get the type of that object?

The reason is that on a PDF somebody put a blue rectangle with Adobe Illustrator. I am trying to find what object is that.

Thanks!
Back to Top
Ingo View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 29 Oct 05
Status: Offline
Points: 3529
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ingo Quote  Post ReplyReply Direct Link To This Post Posted: 29 Nov 14 at 11:08AM
Hi Chopinke,

is it possible for you to upload the file anywhere?
Perhpas could be interesting for me and for other ones, too ;-)
In this case i often do some search directly in the pdf code wit a "normal" texteditor.

Cheers,
Ingo


Cheers,
Ingo

Back to Top
Chopinke View Drop Down
Team Player
Team Player


Joined: 29 Apr 14
Status: Offline
Points: 24
Post Options Post Options   Thanks (0) Thanks(0)   Quote Chopinke Quote  Post ReplyReply Direct Link To This Post Posted: 29 Nov 14 at 1:36PM
Hi,

Here is the file:
https://www.dropbox.com/s/hsjb129s3p6xioq/links_stamped.pdf?dl=0

There is a blue rectangle at the top right side. It was added by Illustrator. I can see this is the object in the file:

----------------
6 0 obj
<</ArtBox[0.0 0.0 1275.0 1650.0]/BleedBox[0.0 0.0 1275.0 1650.0]/Contents 7 0 R/CropBox[0 0 1275 1650]/LastModified(D:20141118213821+01'00')/MediaBox[0 0 1275 1650]/Parent 1 0 R/PieceInfo<</Illustrator 11 0 R>>/Resources<</ExtGState<</GS0 8 0 R>>/ProcSet[/PDF/ImageC]/Properties<</MC0 9 0 R>>/XObject<</Im0 10 0 R>>>>/Rotate 0/TrimBox[0.0 0.0 1275.0 1650.0]/Type/Page>>
endobj
----------------

But ArtBox, BleedBox or CropBox is not exactly this blue rectangle, I saw another file modified by PhotoShop, some text added, and PhotoShop also added these 'boxes'.

I thought there was an object type like text, or annotation.

Your help is appreciated.

Thank!
Back to Top
AndrewC View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 08 Dec 10
Location: Geelong, Aust
Status: Offline
Points: 841
Post Options Post Options   Thanks (0) Thanks(0)   Quote AndrewC Quote  Post ReplyReply Direct Link To This Post Posted: 30 Nov 14 at 3:43AM
It is not an object but part of the drawing commands.  The ContentStreams as part of the "/Contents 7 0 R" object

The blue rectangle has been added as a set of drawing commands in the Contentstream.  Normally there are hundreds of commands to draw lines, text, shading, images but this PDF is very simple and only contains an Image and a blue rectangle.

<Start>
/Layer /MC0 BDC 
q
/GS0 gs
1275 0 0 1650 0 0 cm
/Im0 Do                        <------- Draw the background image
Q
0.18 0.18 0.749 rg       <------- Blue
/GS0 gs
1128 1570 -41 40 re    <------- Rectangle
f
EMC 
<End>

Also, the PDF was stamped with AltaStampCreator and not Illustrator.

Andrew.



Back to Top
Chopinke View Drop Down
Team Player
Team Player


Joined: 29 Apr 14
Status: Offline
Points: 24
Post Options Post Options   Thanks (0) Thanks(0)   Quote Chopinke Quote  Post ReplyReply Direct Link To This Post Posted: 02 Dec 14 at 12:46PM
Hi,

Thanks for the info, actually AltaStampCreator is our product, and the blue rectangle was added by Adobe Illustrator, or I believe that's what "</Illustrator 11 0 R> " means.

The PDF is created by our product: A totally empty PDF with a single BMP image embedded, nothing else. I have to detect any modifications on PDF structure level, before I extract that embedded image and examine it as a bitmap. If there are changes, like annotation added, or in this case, blue rectangle, I use the render page to produce a 'combined' canvas as a bitmap.

The speed is critical, so I use the '...count' properties to see if there are any modifications made, like AnnotationCount. I could always use render page method, but that is much slower than a few IFs and then extracting the image.

In the current case I could not find how I can check that blue rectangle using the API's methods or properties. I use Delphi XE7. I went for detecting the presence of ArtBox, because I know I did not create one in the first place, so if it's present, it was a modification by somebody else.

Thanks!
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 11.01
Copyright ©2001-2014 Web Wiz Ltd.

Copyright © 2017 Debenu. Debenu Quick PDF Library is a PDF SDK. All rights reserved. AboutContactBlogSupportOnline Store