I have have scanned an A4R paper sheet to a 2048x1443 jpg file.
EDIT1 : It's already rotated to landscape (2048x1443). END OF EDIT1
Now if I try convert it with this command :
$ convert -page A4R A4R_Scanned.jpg A4R_Scanned.pdf $ echo $? 0
EDIT2 : There was no error message regarding the A4R argument. END OF EDIT2
I get a blank US Letter, Portrait page :
$ identify A4R_Scanned.pdf **** Warning: File has an empty MediaBox. Using the current page size instead. Output may be incorrect. **** Warning: File has an empty MediaBox. Using the current page size instead. Output may be incorrect. A4R_Scanned.pdf PDF 595x842 595x842+0+0 16-bit Bilevel DirectClass 63.2K
EDIT3 : I tried another solution :
$ convert -page A4 -rotate 90 A4R_Scanned.jpg A4R_Scanned2A4.pdf
This gives a satisfying A4 document with no visible quality loss but I need to rotate it back to have an A4R (landscape).
When I do that, more quality is lost and that's visible :
$ convert -rotate -90 A4R_Scanned2A4.pdf A4R_Scanned2A4R.pdf
Now, my question is : How do I rotate the document back without loosing too much quality ?
END OF EDIT3
EDIT4 : Thanks to dirkt, the conversion can be done in one step and the quality is good :-) :
$ convert -page 842x595 A4R_Scanned.jpg A4R_Scanned2A4R.pdf
END OF EDIT4