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!

Debenu Quick PDF Library - PDF SDK Community Forum Homepage
Forum Home Forum Home > For Users of the Library > I need help - I can help
  New Posts New Posts RSS Feed - Image in PDF, OK in PDF Reader - not OK printing
  FAQ FAQ  Forum Search   Register Register  Login Login

Image in PDF, OK in PDF Reader - not OK printing

 Post Reply Post Reply
Author
Message
hishaps View Drop Down
Beginner
Beginner


Joined: 15 Feb 16
Status: Offline
Points: 7
Post Options Post Options   Thanks (0) Thanks(0)   Quote hishaps Quote  Post ReplyReply Direct Link To This Post Topic: Image in PDF, OK in PDF Reader - not OK printing
    Posted: 15 Feb 16 at 2:05PM
Hi guys at DebuEnu.

First of all thanks for a great product, I have used it for a long time and it is rock solid!

In the meantime, I have ran into a problem when printing a PDF that I can't find any solution to fix. The problem exists in version 9, but also in 12.12 which I have tried. 

I have a Word document which have a header image in the upper corner. When I save this document, and open it, everything looks smooth. However if I take this file and print it thru

the PrintDocument function

then this header image looks like it is repeating/looping and not centered anymore - What is wrong here when everthing looks fine in the Reader?

What do to here? - Please help!

Best,
Hisse
Back to Top
Ingo View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 29 Oct 05
Status: Offline
Points: 3524
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ingo Quote  Post ReplyReply Direct Link To This Post Posted: 15 Feb 16 at 3:44PM
Hi Hisse,

i would try "CombineContentStream" and "NormalizePage" before printing.
Perhaps this will help already.

Cheers and welcome here,
Ingo




Cheers,
Ingo

Back to Top
hishaps View Drop Down
Beginner
Beginner


Joined: 15 Feb 16
Status: Offline
Points: 7
Post Options Post Options   Thanks (0) Thanks(0)   Quote hishaps Quote  Post ReplyReply Direct Link To This Post Posted: 16 Feb 16 at 8:28AM
Hi Ingo

Thank you for your quick reply. Much appreciated. I tried all possible combination with NormalizePage 0 - 3 and with/without CombineContentStream, however the result is still the same :(

Is there any other approach I could do?


All the best,
Hisse
Back to Top
Ingo View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 29 Oct 05
Status: Offline
Points: 3524
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ingo Quote  Post ReplyReply Direct Link To This Post Posted: 16 Feb 16 at 1:36PM
you should upload the doc anywhere and post the link here.
So other users here can try getting a better result ;-)

Cheers,
Ingo

Back to Top
hishaps View Drop Down
Beginner
Beginner


Joined: 15 Feb 16
Status: Offline
Points: 7
Post Options Post Options   Thanks (0) Thanks(0)   Quote hishaps Quote  Post ReplyReply Direct Link To This Post Posted: 16 Feb 16 at 2:05PM
Hi Ingo.

Thats a great idea. I have uploaded the file to this location:

http://www.filedropper.com/repeatingimageafterprinting-copy

Let me hear if there is any trouble retrieving it.

Best.
Hassi
Back to Top
hishaps View Drop Down
Beginner
Beginner


Joined: 15 Feb 16
Status: Offline
Points: 7
Post Options Post Options   Thanks (0) Thanks(0)   Quote hishaps Quote  Post ReplyReply Direct Link To This Post Posted: 16 Feb 16 at 2:09PM
The file is then exported to PDF thru Word and then printed with the DebEnu libary. File looks fine in Reader afterwards.
Back to Top
Ingo View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 29 Oct 05
Status: Offline
Points: 3524
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ingo Quote  Post ReplyReply Direct Link To This Post Posted: 16 Feb 16 at 8:54PM
Hi,

for me it's okay.
I've saved the docx to pdf.
Then i print it via Foxit...
then i print it via a commandline-tool i've made with QuickPDF 10.12.

The printout is always the same.
The cat is on the top right as expected.

Cheers,
Ingo

Back to Top
hishaps View Drop Down
Beginner
Beginner


Joined: 15 Feb 16
Status: Offline
Points: 7
Post Options Post Options   Thanks (0) Thanks(0)   Quote hishaps Quote  Post ReplyReply Direct Link To This Post Posted: 17 Feb 16 at 8:25AM
Hi Ingo.

That is very interresting! Can you share the few lines of code you use to set up the pdf printing functionality in The DebEnu SDK?

Thanks!

Hiise


Edited by hishaps - 17 Feb 16 at 8:25AM
Back to Top
Ingo View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 29 Oct 05
Status: Offline
Points: 3524
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ingo Quote  Post ReplyReply Direct Link To This Post Posted: 17 Feb 16 at 10:10PM
Hi Hiise,

i don't know if it helps undocumented.
It's from a complete printer module which can use bins and few additional options...
If there are questions please go to the online reference and read about the functions.
This source was made with D2007 - so an utf-conversion was necessary...

   QP := TDebenuPDFLibrary1012.Create;
   try
      QP.UnlockKey('...');
      nokays := QP.LoadFromFile(Pchar( AnsiToUtf8(fname)),'' );
      if ( nokays = 0 ) then
         begin
            lec := QP.LastErrorCode;
// ...      if ( lec = ... ) Then

// ...
         
         end;
      
         If QP.EncryptionStatus > 0 Then
            QP.Decrypt;

         if ( prname = 'default') Then
            PriName := QP.GetDefaultPrinterName;

         if (prname <> 'default' ) then
            PriName := prname;

         pc := QP.PageCount;

// ...

         propt := QP.PrintOptions(pscal, rotate, fname);
             
         if ( bin > 0 ) Then
            begin
               cPriName := QP.NewCustomPrinter(PriName);
               QP.SetupCustomPrinter(cPriName, 9, bin);
            end; 
             
         if ( pend = 9999 ) then
            pend := pc;
         for i := 1 to copies do
            begin
               if ( bin > 0 ) Then
                  QP.PrintDocument(cPriName, pstart, pend, propt)
                 else 
                  QP.PrintDocument(PriName, pstart, pend, propt);
            end;
   finally
       QP.Free;
       ErrorAddr := Addr(err);
       ExitCode := 0001;
   end;

Cheers,
Ingo

Back to Top
hishaps View Drop Down
Beginner
Beginner


Joined: 15 Feb 16
Status: Offline
Points: 7
Post Options Post Options   Thanks (0) Thanks(0)   Quote hishaps Quote  Post ReplyReply Direct Link To This Post Posted: 02 Mar 16 at 8:52PM
Fantastic - I got this to work. Thanks a lot Ingo!

Best regards

Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 11.01
Copyright ©2001-2014 Web Wiz Ltd.

Copyright © 2017 Debenu. Debenu Quick PDF Library is a PDF SDK. All rights reserved. AboutContactBlogSupportOnline Store