Print Page | Close Window

Rerender existing PDFs

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


Topic: Rerender existing PDFs
Posted By: martin.weigl
Subject: Rerender existing PDFs
Date Posted: 07 Apr 16 at 1:44PM
Hello all,
 
i have PDF files containing elements (Rectangles, Texts, etc. - no images!) in the RGB color space. I need to convert these PDFs to the CMYK color space. Is there any possibility to somehow convert existing PDFs or iterate through them redrawing them to new files or anything else that I could use in order to receive PDFs in CMYK color space?
 
Regards,
Martin



Replies:
Posted By: Ingo
Date Posted: 07 Apr 16 at 8:39PM
Hi Martin,

About manual converting/calculating RGB-values to CMYK you can read in this thread:
http://www.quickpdf.org/forum/edit-pdf-text_topic1378.html
For example to set the text color in CMYK you can use SetTextColorCMYK:
http://www.debenu.com/docs/pdf_library_reference/SetTextColorCMYK.php
In the online reference you'll find in the section "color" many CMYK-functions:
http://www.debenu.com/docs/pdf_library_reference/Color.php



-------------
Cheers,
Ingo



Posted By: martin.weigl
Date Posted: 21 Apr 16 at 12:22PM
Hi Ingo,
 
thx for ur reply. The info was not exactly what I was looking for:
I need to convert elements of existing PDF files from the RGB color space into colors of the CMYK color space. If there is some way to do so (i. e. render the existing PDF element-by-element into a new one converting the colors), please let me know.
Is there a way to fetch all elements (rectangles, circles, texts, etc.) out of a PDF file?
 
Regards,
Martin


Posted By: Ingo
Date Posted: 21 Apr 16 at 9:22PM
Hi Martin,

embedded images you can extract from pdf-pages, converting them outside with other third party tools.
Rectangles, circles and so on are not graphic objects but only scriptcode - you can't extract things like this.



-------------
Cheers,
Ingo



Posted By: martin.weigl
Date Posted: 22 Apr 16 at 7:58AM
Hi Ingo,

thx for ur reply. The problem is (as you mentioned [URL=http://www.quickpdf.org/forum/topic3314_post13194.html#13194]here[URL]), that the PDFs metadata identifies the PDF as "CMYK", alltough it has some RGB elements embedded.
That's the problem that I need to detect (without correcting it, simply detecting ist is enough).


Regars,
Martin




Posted By: Ingo
Date Posted: 22 Apr 16 at 10:28PM
Hi Martin,

it's not difficult.
Take few relevant pdf-files and have a look directly inside with - for example - notepad.
Keep in mind the relevant devicetags you've found.
Then you can build a routine... reading the pdf-file into a stream and doing a fulltextsearch (with your tags) on the stream.
Additionally you should search for strings like 
<</BitsPerComponent
/ColorSpace 291
<</BitsPerComponent 8/ColorSpace 291
or rdf-content like this:
dc:format="image/jpeg"
...or any other similar string.

What i've found searching for you in ONE pdf was the next:
<</BitsPerComponent 8/ColorSpace 293
...and few lines later:
<</BitsPerComponent 8/ColorSpace/DeviceRGB/
...and later this:
<</BitsPerComponent 8/ColorSpace/DeviceGray/

To determine if coloured objects were used or if device-tags were used can be a different issue.




-------------
Cheers,
Ingo



Posted By: martin.weigl
Date Posted: 25 Apr 16 at 1:12PM
Hi Ingo,

thx for your help!

Regards,
Martin



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