In order to print documents out on preprinted form I need to make sure everything is printed where it should be. When using acroread all is fine but when I print in Okular, the page borders aren't respected anymore, overall size seeems to be changed... etc. Reproducible: Always
Can you attach one such document?
Created attachment 81124 [details] original PDF
Created attachment 81125 [details] printed with Okular The whole document is moved up to the top and to the right
Created attachment 81126 [details] printed with Acrobat Reader Selecting "Page scaling: None" it is printed as it is being displayed on the screen
Setting back to unconfirmed now that documents are attached, if someone wants to give it a try and confirm, that'd be cool
Hi, i just tried to print these two files in Okular 0.19 (KDE Applications 4.13) and it has printed correctly. Please if you can reproduce this problem in Okular >= 0.19 (KDE Applications >= 4.13) reopen this bug.
Bug still exists. Stuff gets resized and then the printed info doesn't match the fields on the form anymore. If I print with Adobe Acrobat Reader, no resizing occurs.
Which okular version are you using? Which cups?
Okular Version 0.19.1 Using KDE Development Platform 4.13.1 CUPS 172-0ubuntu1
can you enable all okular debuging in kdebugdialog, run okular from the shell, print and attach the debug line that has lpr as part of its contents?
howto enable all the okular debugging?
Have you tried using kdebugdialog as i mentioned? What problems you had?
and how to use kdebugdialog?
You open a terminal and write kdebugdialog
and then is all is greyed out... no idea what to do or how it works.
(In reply to comment #15) > and then is all is greyed out... no idea what to do or how it works. Please try kdebugdialog --fullmode
If I can chime in on this one. I've long had the same issue. My printer margins are different, so the test file here still fits in the margins of the printer - but only just. Every file I print is scaled to fit - but not to the actual printer margins. I tend these days to print PDF files directly using the lpr command lpr -o BRDuplex=DuplexTumble -o BRTonerSaveMode=ON -o Collate=True filename.pdf debugging okular shows that it uses the following lpr options: okular(Okular::FilePrinter::doPrintFiles: Executing "lpr.cups" with arguments ("-P", "BrotherMFC", "-#1", "-J", "filename.pdf", "-o", "media=A4", "-o", "portrait", "-o", "sides=one-sided", "-o", "outputorder=normal", "-o", "Collate=False", "-o", "page-left=10", "-o", "page-top=10", "-o", "page-right=10", "-o", "page-bottom=10", "-o", "fit-to-page", "-o", "BRTonerSaveMode=ON", "-r", "/tmp/kde-nicholas/okulary15700.ps") Of note there is the -o "fit-to-page". I notice that evince has the ability to select this or not (and deselecting it in evince causes my prints to print out perfectly). being able to do so in okular would also be wonderful! Of secondary note is that, for my printer (Brother) at least, the "sides=one-sided" option is useless - it is overridden by the printer settings BRDuplex.
If it helps, most of my documents I have issues with are LibreOffice draw documents (saved to PDF) set to have no margins, but making sure that I stay within the actual margins my printer can print. (That is, I make sure that there is no actual content within 5mm of the page border). When resizing, okular then scales my document down to the actual printer margins, which means that there is effectively twice as much margin as is required. (The printer margin plus my empty-margin-area) If necessary, I can also upload a test document...
I still don't get what I should doe with kdebugdialog.
1. Open the Konsole programme 2. Type in " kdebugdialog " and press Enter 3. Untick the checkbox that reads "Disable all debug output" 4. Click the OK button 5. You'll be back in konsole. Now type "okular" and press enter 6. Open the PDF in okular and print it. 7. Close okular. 8. You'll be back in konsole. One of the lines should mention "lpr.cups". Copy that line here. I'll bet you'll have an output similar to the one I posted above... For the devs, I am running: Qt: 4.8.6 KDE Development Platform: 4.13.1 Okular: 0.19.1
Oh - almost forgot! When you're done, repeat steps 1-4, but this time tick the box!
hyper@subi:~$ kdebugdialog QDBusConnection: session D-Bus connection created before QCoreApplication. Application may misbehave. QDBusConnection: session D-Bus connection created before QCoreApplication. Application may misbehave. Bus::open: Can not get ibus-daemon's address. IBusInputContext::createInputContext: no connection to ibus-daemon hyper@subi:~$ okular okular(17867)/kdecore (KSycoca) KSycocaPrivate::openDatabase: Trying to open ksycoca from "/var/tmp/kdecache-hyper/ksycoca4" okular(17867)/kdecore (KConfigSkeleton) KCoreConfigSkeleton::writeConfig: okular(17867)/kdecore (KConfigSkeleton) KCoreConfigSkeleton::writeConfig: okular(17867)/kdecore (KConfigSkeleton) KCoreConfigSkeleton::writeConfig: okular(17867)/kdecore (KConfigSkeleton) KCoreConfigSkeleton::writeConfig: okular(17867)/kdecore (KConfigSkeleton) KCoreConfigSkeleton::writeConfig: Bus::open: Can not get ibus-daemon's address. IBusInputContext::createInputContext: no connection to ibus-daemon okular(17867)/kparts KParts::ReadWritePart::setModified: setModified( false ) okular(17867)/kparts KParts::ReadWritePart::setModified: setModified( false ) okular(17867)/kdecore (trader) KMimeTypeTrader::query: query for mimeType "application/pdf" , "okular/Generator" : returning 1 offers This backend is only for XRandR 1.1, your version is: 1 . 4 okular(17867)/kparts KParts::ReadWritePart::setModified: setModified( false ) okular(17867)/kparts KParts::Part::~Part: deleting widget Sidebar(0xa2c9d0) "" hyper@subi:~$
You don't seem to be printing at all...
yet a page was printed out following the instructions by Nicholas
Ok, Nicholas is going to help you then from now on i guess.
I can try. Let's do this a little differently: 1. Open the Konsole programme 2. Type in: kdebugdialog & and press Enter (note the ampersand at the end of that command! 3. Make sure that the checkbox that reads "Disable all debug output" is not ticked 4. In the search field at the top of the window, type "okular". This should filter the list below to 7 or 8 entries. Make sure that all of them *are* ticked. 4. Click the "Apply button". 5. Now go back to the Konsole that you opened earlier. It will be waiting for a new command. Type in: okular 2&> ~/okulardebug.txt and press enter. 6. Okular will open. Within okular, file->open your pdf, and then file->print it. 7. Quit okular. 8. In the kdebugdialog window that should still be open, make sure that the checkbox that reads "Disable all debug output" *is* ticked and click the "OK" Button. 9. Open the file "okulardebug.txt" in your home directory in your favourite text editor. (Kate, kwrite, ....) 10. Copy and paste the contents here.
Bus::open: Can not get ibus-daemon's address. IBusInputContext::createInputContext: no connection to ibus-daemon This backend is only for XRandR 1.1, your version is: 1 . 4 okular(3946) KDirWatch::removeFile: doesn't know "/home/hyper/2" okular(3946) KDirWatch::removeDir: doesn't know "/home/hyper"
Created attachment 87355 [details] Add customTab to the printdialog to set fit-to-page options Hmmmm - I'm afraid I have no idea why you aren't getting the debug information out. Still - I suspect that my debug information tells the story. For any developers out there: The attached patch adds a custom tab for setting the fit-to-page option. My question is this (I'm stuck here): how do I reference the optiontab in FilePrinter.cpp so that I can set the corresponding lpr options?
You don't reference it, you pass the options down, not ask them up. Anyway please use reviewboard.kde.org for patches, it's much easier to discuss them there.
Nicholas, any success uploading your patch to https://git.reviewboard.kde.org/ ?
Nicholas, if you can provide the information requested in comment #30, please add it.
No response, marking as WONTFIX. If you can provide the information requested in comment #30, please add it.