Print Page | Close Window

RenderDocumentToFile not working??

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=2311
Printed Date: 05 Apr 26 at 7:01PM
Software Version: Web Wiz Forums 11.01 - http://www.webwizforums.com


Topic: RenderDocumentToFile not working??
Posted By: mazluta
Subject: RenderDocumentToFile not working??
Date Posted: 21 Jun 12 at 6:28AM
  ToFileName := RemoveBackSlashChar(DstDirName) + '\TmpPng%p.bmp';
  PDFLibrary := TQuickPDF0719.Create;
  Try
    UnlockResult := PDFLibrary.UnlockKey(edtLicenseKey);
    IF UnlockResult <> 1 then
      Exit;

    IF Not FileExists(Pdf_FileName) Then
      Exit;

    CurCursor := Screen.Cursor;
    Try
      Screen.Cursor := crHourGlass;
      PDFLibrary.LoadFromFile(Pdf_FileName);

//      PDFLibrary.SetOrigin(1);
//      PDFLibrary.SetMeasurementUnits(1);
//      PDFLibrary.SetPageSize('A4');


      PDFLibrary.RenderDocumentToFile(72,1,1,0{BMP},ToFileName);

    Finally
      Screen.Cursor := CurCursor;
    End;
  Finally
    FreeAndNil(PDFLibrary);
  End;




Replies:
Posted By: mazluta
Date Posted: 21 Jun 12 at 10:20AM
i figer out that if the ToFileName is in Document And Setting it fail.

C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\MzSc\20120621181251\TmpPng%p.png

if i change it to
c:\aa\TmpPng%p.png

it work.

is it bug in quickpdf??


Posted By: Ingo
Date Posted: 21 Jun 12 at 10:53PM
Hi!

The To-filename is yours ;-)
There are many functions making long paths from short ones.
Please ask Google for it and then do something like
ToFileName := MakeLongPath(ToFileName)
before using it  ;-)

Cheers and welcome here,
Ingo





Posted By: mazluta
Date Posted: 21 Jun 12 at 11:30PM
thanks for the replay.
i will test your idia.
will back to you with Tongue   or Confused


Posted By: Ingo
Date Posted: 22 Jun 12 at 12:18PM
Hi!

Here's a link to relevant convertion functions:
http://www.delphidabbler.com/tips/6
Taking this samples this could work for you:
ToFileName := GetLongName(ToFileName);

Cheers, Ingo



Posted By: mazluta
Date Posted: 22 Jun 12 at 4:02PM
Well Ingo.
i test it. and it work fine.
i steel think it's QuickPdf responsbilty to work with any (good) DIRECTORY i send it.
but, it work, so let go on
thanks again for your help.



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