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!
![]() |
PDF Object types |
Post Reply ![]() |
Author | |
Chopinke ![]() Team Player ![]() Joined: 29 Apr 14 Status: Offline Points: 24 |
![]() ![]() ![]() ![]() ![]() 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!
|
|
![]() |
|
Ingo ![]() Moderator Group ![]() ![]() Joined: 29 Oct 05 Status: Offline Points: 3529 |
![]() ![]() ![]() ![]() ![]() |
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 |
|
![]() |
|
Chopinke ![]() Team Player ![]() Joined: 29 Apr 14 Status: Offline Points: 24 |
![]() ![]() ![]() ![]() ![]() |
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!
|
|
![]() |
|
AndrewC ![]() Moderator Group ![]() ![]() Joined: 08 Dec 10 Location: Geelong, Aust Status: Offline Points: 841 |
![]() ![]() ![]() ![]() ![]() |
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. |
|
![]() |
|
Chopinke ![]() Team Player ![]() Joined: 29 Apr 14 Status: Offline Points: 24 |
![]() ![]() ![]() ![]() ![]() |
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!
|
|
![]() |
Post Reply ![]() |
|
Tweet
|
Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |
Copyright © 2017 Debenu. Debenu Quick PDF Library is a PDF SDK. All rights reserved. About — Contact — Blog — Support — Online Store