Print Page | Close Window

Problem with Russian text

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=1183
Printed Date: 24 May 24 at 2:25PM
Software Version: Web Wiz Forums 11.01 - http://www.webwizforums.com


Topic: Problem with Russian text
Posted By: dene14
Subject: Problem with Russian text
Date Posted: 21 Aug 09 at 2:29PM
Good day, guys.
I have a real problem when I try to extract PDF with a Russian language symbols, instead of it I have nothing (string = '';). In extracted data I have only latin and special symbols like #.,!"' and numbers.
Im tried to set AddTrueTypeFont and AddSubsettedFont, but I think that It for saving text in PDF file. Also I tried PDFLibrary.SetFontEncoding(2), but also got no luck...
Here is my code:
procedure TfrmBaseConvert.Button1Click(Sender: TObject);
var
PDFLibrary: TQuickPDF0715;
i: Integer;
temp1: TStringList;
begin
  PDFLibrary := TQuickPDF0715.Create;
  temp1 := TStringList.Create;
  try
  PDFLibrary.UnlockKey(- its my key -);
  begin
  PDFLibrary.LoadFromFile('C:\Documents and Settings\DENE\Desktop\HelloFromDelphi.pdf');
  PDFLibrary.SetFontEncoding(2);
  temp1.Clear;
  for i := 1 to PDFLibrary.PageCount do
  begin
  PDFLibrary.SelectPage(i);
  temp1.Text := temp1.Text + (PDFLibrary.GetPageText(2));
  end;

  end;
  finally
  PDFLibrary.Free;
  end;
end;

Please, help me. Thx a lot.



Replies:
Posted By: DELBEKE
Date Posted: 21 Aug 09 at 4:06PM
Your code seem good, but QuickPdf have problems with UniCode. I think Debenu is Working on it.


Posted By: Ingo
Date Posted: 21 Aug 09 at 9:16PM
Perhaps the russian font isn't the problem?
How the pdf was made? With a free pdf-printer-driver like PDFCreator?
If it's an old version (using GhostScript before version 8.15) this is normal.
Does your extract result look like this here:
   !!\"!\"#
 \" !$%%#%%
&    $%#'
()*+   *,-* ./*\"-
 
* +  *  -0 * 12\"
  ! \"\"\" # \"$
!3 (1 3# (1 4!'56
   - !3 (1 3# (1
  7- !$3# (1
8+  *  8+
 9  ** *    7
-:-\"
;*:
7+ *<+=
\"
&-- =
%%%%%%$
 =

Cheers, Ingo


Posted By: dene14
Date Posted: 22 Aug 09 at 12:27AM
Nope, Ingo, as I say all russian symbols are supressed, in any place with Russian string Im get clear string String = '';


Posted By: dene14
Date Posted: 24 Aug 09 at 12:53PM

Can anybody help me ???

Is it trouble of PDF library or its my trouble ???



Posted By: Ingo
Date Posted: 24 Aug 09 at 2:58PM
Hi!

You've seen what Jean-Luc Delbeke has written above?

Cheers, Ingo




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