2
$\begingroup$

In attempting to create a PDF from a series of HEIC files created on my iPhone, I did the following after loading them into a directory on my Windows computer:

SetDirectory["F:\\Test"]
FileNames[]
input = Import[#, "HEIF"] & /@ FileNames[];
names=Table["Test1"<>ToString@i<>".pdf",{i,Length@input}]
MapThread[Export,{names,input}]

taking advantage of a previous stackExchange post. I then used Acrobat to combine these into a single PDF file. This got me thinking of how to create a single PDF file directly, which was accomplished using another StackExchange post.

nb = Notebook[
Table[Cell[BoxData[ToBoxes@Show[g, ImageSize -> Full]], "Output", 
  PageBreakBelow -> True], {g, input}]];
Export["test2.pdf",input,"PDF"]

This worked, but extraneous pagination and margins appear in the resultant file.

Is there another way to create the single pdf that does not generate the unnecessary pagination and white border?

Ideally, it would be helpful to make each HEIC file smaller before combining while still being able to read the text, since the resultant output is about 713 MB given the large file sizes of the individual HEIC files.

$\endgroup$
2
  • 1
    $\begingroup$ Currently it isn't possible using only built-in functionality. Here I propose another way: mathematica.stackexchange.com/a/262512/280 $\endgroup$ Commented Jul 13, 2022 at 5:59
  • $\begingroup$ BTW, my galaxy s21 fe also does heic photos but not with display p3 profile. And latest iOS will do AVIF photos maybe finally with PQ, so true HDR. Chrome supports Avif wih PQ. $\endgroup$ Commented Jul 13, 2022 at 6:08

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.