Print Page | Close Window

R yender Text Only

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=2896
Printed Date: 28 Jun 25 at 1:43PM
Software Version: Web Wiz Forums 11.01 - http://www.webwizforums.com


Topic: R yender Text Only
Posted By: emgi
Subject: R yender Text Only
Date Posted: 16 May 14 at 7:44AM
Hi,
I would like to render text only from pdf to image file.
I'm using DAExtractPageText function with option 4 and creating a new file base on returned data.
But the size of the rendered text is really different compared to the original.
Do you know why ?
Is there another way to do that ?

Thank you
Emgi




Replies:
Posted By: AndrewC
Date Posted: 18 May 14 at 9:36AM
emgi,

You may want to make use of the following function

  http://www.debenu.com/docs/pdf_library_reference/SplitPageText.php

This will not work on very complex typeset PDF files but it works well on most files.

  QP.LoadFromFile("1page.pdf", "");
  QP.CombineContentStreams();
  
  QP.SplitPageText(0);
  QP.RemoveContentStream(0);  // Remove the graphics layer leaving the text.

  QP.SaveToFile("textonly.pdf");

Andrew



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